Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ST] Fix StrimziUpgradeST.testUpgradeAcrossVersionsWithUnsupportedKafkaVersion test to run only when there is really an unsupported Kafka version across versions #10496

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

egyedt
Copy link
Contributor

@egyedt egyedt commented Aug 26, 2024

#10495

Type of change

  • Enhancement / Bug

Description

It is described in #10495.
The problem is that StrimziUpgradeST.testUpgradeAcrossVersionsWithUnsupportedKafkaVersion is use a supported Kafka version from start so the required test with an unsupported Kafka version is not happen. We should use unsupported Kafka version in the test.

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Check RBAC rights for Kubernetes / OpenShift roles
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging
  • Update CHANGELOG.md
  • Supply screenshots for visual changes, such as Grafana dashboards

@egyedt egyedt force-pushed the fix-testUpgradeAcross-timing_issue branch from a23110f to 3cd49a8 Compare August 26, 2024 15:58
@scholzj scholzj added this to the 0.44.0 milestone Aug 26, 2024
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Could you please:

  • Fix the DCO signoff? The instructions should be under the Details link next to the DCO status in the Pr status section.
  • Can you please update the PR description? Issues have often a long discussions and in general describe a problem. The PR description should have an explanation what does the PR do and why. Just linking to an issue is not really the same.

Comment on lines 177 to 179
controllerPods = RollingUpdateUtils.waitTillComponentHasRolledAndPodsReady(TestConstants.CO_NAMESPACE, controllerSelector, 3, controllerPods);
brokerPods = RollingUpdateUtils.waitTillComponentHasRolledAndPodsReady(TestConstants.CO_NAMESPACE, brokerSelector, 3, brokerPods);
eoPods = DeploymentUtils.waitTillDepHasRolled(TestConstants.CO_NAMESPACE, KafkaResources.entityOperatorDeploymentName(clusterName), 1, eoPods);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect that this will not work if the Kafka version is unsupported? You have to first change the Kafka version before waiting for a rolling update. Or how does it handle such a situation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I explained what is wrong with the test here: #10495 (comment)

The parsing of Kafka version needs to be fixed, so the test will not be "flaky" and it will test exactly what it should.
In case that this check will be there, it will somehow work now, but when the real unsupported Kafka version will be parsed there, it will fail the test.

@scholzj
Copy link
Member

scholzj commented Sep 5, 2024

@egyedt Any chance to get back to this? Thanks.

@egyedt
Copy link
Contributor Author

egyedt commented Sep 5, 2024

@scholzj
Thanks for pinging me. I think, I will be able to work on this in the next week or the week after. Thanks.

@egyedt egyedt force-pushed the fix-testUpgradeAcross-timing_issue branch from 3cd49a8 to 5ef7836 Compare September 19, 2024 09:56
@egyedt egyedt changed the title Make StrimziUpgradeST.testUpgradeAcrossVersionsWithUnsupportedKafkaVersion more robust Fix StrimziUpgradeST.testUpgradeAcrossVersionsWithUnsupportedKafkaVersion test to run only when there is really an unsupported Kafka version across versions Sep 19, 2024
@egyedt egyedt force-pushed the fix-testUpgradeAcross-timing_issue branch 3 times, most recently from d4e5960 to e3bf6cc Compare September 19, 2024 11:49
Copy link
Member

@im-konge im-konge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, they look good to me. Only thing is the removal of this and final from the places you are editing in this PR. Could you return them back? I know that there are various code styles that we can use (or you prefer), but we are trying to standardize the final for the stuff that will not be changed and the this in the objects classes. Thanks

@egyedt egyedt force-pushed the fix-testUpgradeAcross-timing_issue branch from e3bf6cc to ef91327 Compare September 19, 2024 14:08
@egyedt
Copy link
Contributor Author

egyedt commented Sep 19, 2024

@im-konge
Thanks for the review, I reverted the not necessary changes. Could you please have a look again?
Thanks.

Copy link
Member

@im-konge im-konge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 🙂 thanks a lot for the PR 🚀

@im-konge im-konge requested a review from a team September 19, 2024 16:10
@im-konge im-konge changed the title Fix StrimziUpgradeST.testUpgradeAcrossVersionsWithUnsupportedKafkaVersion test to run only when there is really an unsupported Kafka version across versions [ST] Fix StrimziUpgradeST.testUpgradeAcrossVersionsWithUnsupportedKafkaVersion test to run only when there is really an unsupported Kafka version across versions Sep 19, 2024
@im-konge
Copy link
Member

/azp run upgrade

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@im-konge
Copy link
Member

I checked the failures in the pipeline, but FMPOV they are not relevant to this PR. Maybe @henryZrncik knows more what can be problem here?

@im-konge
Copy link
Member

@egyedt because of the logic we have there now, the tests are failing when they are skipped by the assumption -> @henryZrncik is currently working on a fix, once his PR is merged, could you please rebase this PR, so we can run the tests? I will let you know. Thanks!

Copy link
Contributor

@henryZrncik henryZrncik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for PR @egyedt. The mentioned PR to wait for is here #10634

@im-konge
Copy link
Member

@egyedt the PR from @henryZrncik is merged, could you please rebase the PR, so I can trigger the tests? Thanks a lot!

…only when there is really an unsupported Kafka version across versions

Signed-off-by: Egyed Tamas <egyed.t@cloudera.com>
Signed-off-by: Tamas Barnabas Egyed <egyed.t@gmail.com>
@egyedt egyedt force-pushed the fix-testUpgradeAcross-timing_issue branch from ef91327 to 4630c73 Compare September 25, 2024 08:12
@egyedt
Copy link
Contributor Author

egyedt commented Sep 25, 2024

Thanks @henryZrncik.
@im-konge I rebased onto the top of the main branch.

@see-quick
Copy link
Member

/azp run upgrade

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@egyedt
Copy link
Contributor Author

egyedt commented Sep 25, 2024

@im-konge It looks like all tests are green now!

@see-quick
Copy link
Member

@im-konge It looks like all tests are green now!

Thanks for working on this @egyedt . If nothing is on @scholzj mind we are good at merging this PR 💯.

@see-quick see-quick added System tests ready for merge Label for PRs which are ready for merge labels Sep 25, 2024
@see-quick see-quick merged commit b2c9639 into strimzi:main Sep 25, 2024
17 checks passed
@im-konge
Copy link
Member

Thanks a lot for the fix @egyedt ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for merge Label for PRs which are ready for merge System tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants