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

🌱 Separate upgrade plan from upgrade test #1637

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jackjii79
Copy link

What this PR does / why we need it:

Generalize upgrade test procedure by extracting common procedure as independent flow to be reusable for more complex upgrading test scenarios.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1626

Signed-off-by: jackjii79 <peterhan1987@gmail.com>
@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 27, 2024
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zaneb for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 27, 2024
@metal3-io-bot
Copy link
Contributor

Hi @jackjii79. Thanks for your PR.

I'm waiting for a metal3-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@metal3-io-bot metal3-io-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 27, 2024
@metal3-io-bot
Copy link
Contributor

@jackjii79: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test metal3-bmo-e2e-test-pull
/test metal3-bmo-e2e-test-optional-pull

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tuminoid
Copy link
Member

/ok-to-test
/cc @lentzi90

@metal3-io-bot metal3-io-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 27, 2024
Copy link
Member

@lentzi90 lentzi90 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 working on this!

I see many great things here, but I do think it goes a bit too far in what can be changed in the test. If I understand this correctly, it would be possible to even swap out the BMOUpgradePlanner to some custom implementation that could do the upgrade in a completely different way.
What I would like to see is that this part (what BMOUpgradePlanner does) would be the test spec itself, similar to this in CAPI. It would then be called like this.

There seems to be some issue with the code currently. Could you take a look at why the E2E fixture test failed and try to fix that?

@jackjii79 jackjii79 force-pushed the issue-1626/extract-upgrade-procedure branch from 3fc1aac to 9504318 Compare March 27, 2024 23:12
…stage

Signed-off-by: jackjii79 <peterhan1987@gmail.com>
@jackjii79
Copy link
Author

like this

Thanks for working on this!

I see many great things here, but I do think it goes a bit too far in what can be changed in the test. If I understand this correctly, it would be possible to even swap out the BMOUpgradePlanner to some custom implementation that could do the upgrade in a completely different way. What I would like to see is that this part (what BMOUpgradePlanner does) would be the test spec itself, similar to this in CAPI. It would then be called like this.

There seems to be some issue with the code currently. Could you take a look at why the E2E fixture test failed and try to fix that?

thanks @lentzi90 to the hint, i get a much clearer picture now, will make some updates

…led from upgrade_test

Signed-off-by: jackjii79 <peterhan1987@gmail.com>
@jackjii79
Copy link
Author

jackjii79 commented Mar 29, 2024

@lentzi90 refactor is ready to review, however i have some problem setting up the minikube with kvm driver in my local environment to test, so i do not have a chance to run the e2e in my local to give it a shot in advance. The make test-e2e is also not easy to use in my local as some testing logic is trying to post requests to the service and i do not know which service/port might need port forward before the e2e even started.

@jackjii79 jackjii79 marked this pull request as ready for review March 29, 2024 05:47
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 29, 2024
@jackjii79 jackjii79 marked this pull request as draft March 29, 2024 06:13
@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 29, 2024
@jackjii79 jackjii79 requested a review from lentzi90 March 29, 2024 06:13
@jackjii79 jackjii79 marked this pull request as ready for review April 1, 2024 02:28
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2024
@jackjii79
Copy link
Author

@lentzi90 Should we proceed with this PR ?

@metal3-io-bot metal3-io-bot added the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Apr 10, 2024
@metal3-io-bot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lentzi90
Copy link
Member

Sorry for the delay. I have a lot of PRs to review...
If you could rebase this I would be happy to take another look!

@metal3-io-bot
Copy link
Contributor

@jackjii79: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
unit 653f349 link true /test unit
manifestlint 653f349 link true /test manifestlint
gomod 653f349 link true /test gomod
generate 653f349 link true /test generate

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@metal3-io-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues will close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@metal3-io-bot metal3-io-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Status: BMO on hold / blocked
Development

Successfully merging this pull request may close these issues.

Split BMO e2e tests into separate spec and test files
4 participants