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

🌱 Add BMO e2e upgrade test #1451

Merged
merged 1 commit into from Jan 19, 2024

Conversation

mquhuy
Copy link
Member

@mquhuy mquhuy commented Nov 20, 2023

Fixes #1430

@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 20, 2023
@mquhuy
Copy link
Member Author

mquhuy commented Nov 20, 2023

/metal3-bmo-e2e-test

1 similar comment
@mquhuy
Copy link
Member Author

mquhuy commented Nov 20, 2023

/metal3-bmo-e2e-test

test/e2e/config/ironic.yaml Outdated Show resolved Hide resolved
test/e2e/config/fixture.yaml Outdated Show resolved Hide resolved
test/e2e/upgrade_test.go Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
@mquhuy mquhuy force-pushed the mquhuy/e2e-upgrade-test branch 3 times, most recently from 545e205 to 216772a Compare November 22, 2023 13:01
@metal3-io-bot metal3-io-bot added needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 22, 2023
@mquhuy mquhuy force-pushed the mquhuy/e2e-upgrade-test branch 5 times, most recently from cd4830e to ad37ef2 Compare November 23, 2023 10:29
@metal3-io-bot metal3-io-bot removed the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Nov 23, 2023
@mquhuy mquhuy force-pushed the mquhuy/e2e-upgrade-test branch 2 times, most recently from d1215ff to 9336c5b Compare November 23, 2023 10:51
@mquhuy
Copy link
Member Author

mquhuy commented Nov 23, 2023

/metal3-bmo-e2e-test

@mquhuy
Copy link
Member Author

mquhuy commented Nov 23, 2023

/override test-centos-e2e-integration-main
/override test-ubuntu-integration-main

@metal3-io-bot
Copy link
Contributor

@mquhuy: mquhuy unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file.

In response to this:

/override test-centos-e2e-integration-main
/override test-ubuntu-integration-main

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.

@mquhuy
Copy link
Member Author

mquhuy commented Nov 23, 2023

/metal3-bmo-e2e-test

hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
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.

Good progress!
I hope all my comments are not discouraging!

Makefile Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/e2e/ensure_kustomization_paths.sh Outdated Show resolved Hide resolved
hack/e2e/ensure_kustomization_paths.sh Outdated Show resolved Hide resolved
hack/e2e/ensure_kustomization_paths.sh Outdated Show resolved Hide resolved
test/e2e/e2e_suite_test.go Outdated Show resolved Hide resolved
test/e2e/upgrade_test.go Outdated Show resolved Hide resolved
@mquhuy mquhuy force-pushed the mquhuy/e2e-upgrade-test branch 3 times, most recently from b96c192 to e52d63d Compare November 28, 2023 11:04
@mquhuy
Copy link
Member Author

mquhuy commented Nov 28, 2023

/metal3-bmo-e2e-test

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.

This looks pretty good now!
Could you set up a pipeline for this upgrade job also? Then we could test it from this PR before we merge 🙂

test/e2e/config/fixture.yaml Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it is worth it to have a separate file for this. Is it more than just the *DEPLOY_* variables that differ?
If it is just them I think we can just override them in ci-e2e.sh (e.g. export DEPLOY_BMO=false).

@mquhuy mquhuy force-pushed the mquhuy/e2e-upgrade-test branch 3 times, most recently from 437df13 to bb0d40e Compare January 16, 2024 09:23
@mquhuy
Copy link
Member Author

mquhuy commented Jan 16, 2024

This looks pretty good now! Could you set up a pipeline for this upgrade job also? Then we could test it from this PR before we merge 🙂

Sure. I added the pipeline in these commits:
metal3-io/project-infra#617
https://gerrit.nordix.org/c/infra/cicd/+/20387/1/jjb/metal3/baremetal-operator/jjb-bmo-e2e.yaml

And I updated this PR with your suggested changes: the two jobs are now differentiated by GINKGO_FOCUS. If "upgrade" is in the focus list, it will be the only test, otherwise it will not be tested.

hack/ci-e2e.sh Outdated
*)
echo "'upgrade' not found in env var GINKGO_FOCUS. Will NOT run upgrade tests."
export GINKGO_SKIP="upgrade ${GINKGO_SKIP:-}"
;;
Copy link
Member

Choose a reason for hiding this comment

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

The less logic we have here the better. If someone wants to try to run upgrade together with the rest of the tests that is allowed. Maybe they have a configuration that works?

Suggested change
*)
echo "'upgrade' not found in env var GINKGO_FOCUS. Will NOT run upgrade tests."
export GINKGO_SKIP="upgrade ${GINKGO_SKIP:-}"
;;

hack/ci-e2e.sh Outdated
@@ -142,6 +157,14 @@ echo "${IRONIC_PASSWORD}" > "${BMO_OVERLAY}/ironic-password"
echo "${IRONIC_INSPECTOR_USERNAME}" > "${BMO_OVERLAY}/ironic-inspector-username"
echo "${IRONIC_INSPECTOR_PASSWORD}" > "${BMO_OVERLAY}/ironic-inspector-password"

if [[ "${GINKGO_FOCUS:-}" == "upgrade" ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if [[ "${GINKGO_FOCUS:-}" == "upgrade" ]]; then
if [[ "${GINKGO_FOCUS:-}" == *"upgrade"* ]]; then

I'm not sure it is really worth it to have the if statement here at all. It does not cost much to add the passwords regardless if we use them or not.

hack/ci-e2e.sh Outdated
Comment on lines 22 to 23
echo "'upgrade' found in env var GINKGO_FOCUS. Will ONLY run upgrade tests."
export GINKGO_FOCUS="upgrade"
Copy link
Member

Choose a reason for hiding this comment

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

We should not change the variable. If someone has a reason to set this to something more than just upgrade, we just accept it.

Suggested change
echo "'upgrade' found in env var GINKGO_FOCUS. Will ONLY run upgrade tests."
export GINKGO_FOCUS="upgrade"
echo "'upgrade' found in env var GINKGO_FOCUS. Will ONLY deploy 'upgrade from' versions of BMO and Ironic."

@mquhuy mquhuy force-pushed the mquhuy/e2e-upgrade-test branch 2 times, most recently from f48d684 to 90e3930 Compare January 17, 2024 11:59
@mquhuy
Copy link
Member Author

mquhuy commented Jan 17, 2024

/metal3-bmo-e2e-test

1 similar comment
@mquhuy
Copy link
Member Author

mquhuy commented Jan 17, 2024

/metal3-bmo-e2e-test

Signed-off-by: Huy Mai <huy.mai@est.tech>
@mquhuy
Copy link
Member Author

mquhuy commented Jan 18, 2024

/metal3-bmo-e2e-test

2 similar comments
@mquhuy
Copy link
Member Author

mquhuy commented Jan 18, 2024

/metal3-bmo-e2e-test

@mquhuy
Copy link
Member Author

mquhuy commented Jan 18, 2024

/metal3-bmo-e2e-test

@lentzi90
Copy link
Member

/metal3-bmo-e2e-optional-test

@mquhuy
Copy link
Member Author

mquhuy commented Jan 18, 2024

/metal3-bmo-e2e-test

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.

Awesome job @mquhuy !
Thanks for the patience through all those comments 😅
/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 18, 2024
@mquhuy
Copy link
Member Author

mquhuy commented Jan 18, 2024

/cc @kashifest

Copy link
Member

@kashifest kashifest left a comment

Choose a reason for hiding this comment

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

Few questions/comments in line

@@ -0,0 +1,10 @@
HTTP_PORT=6180
Copy link
Member

Choose a reason for hiding this comment

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

The name of the directory could be ironic-release-0.4 or e2e-ironic-release-0.4, otherwise having e2e- in one and fixture- in another seems a bit out of convention.

Copy link
Member Author

Choose a reason for hiding this comment

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

The name of these directories are to aligned with the equivalent from main: fixtures and e2e. I think your naming convention makes senses, but do you think we should change these original names (fixtures and e2e) as well? What about you @lentzi90 ?

Copy link
Member

Choose a reason for hiding this comment

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

I don't have a strong preference. It looks alright like this to me.
My reasoning when I named the folders e2e and fixture is that they are used for the e2e and fixture tests respectively. So I think it also makes sense then with e2e-release-04 and fixture-release-0.4

Copy link
Member

Choose a reason for hiding this comment

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

Ok. I dont have a strong opinion either. This is certainly not a blocker for the tests to go in.

/approve

@@ -0,0 +1,24 @@
apiVersion: kustomize.config.k8s.io/v1beta1
Copy link
Member

Choose a reason for hiding this comment

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

Same comment, the name of the directory could be e2e-fixture-release-0.4 or we can keep it as it is and then add ironic- in the other directory name

Copy link
Member Author

Choose a reason for hiding this comment

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

My answer to this one would be the same as in the other kustomization, so let's continue the discussion there.

case "${GINKGO_FOCUS:-}" in
*upgrade*)
export DEPLOY_IRONIC="false"
export DEPLOY_BMO="false"
Copy link
Member

Choose a reason for hiding this comment

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

I dont understand this, by default we dont deploy BMO even in upgrade test?

Copy link
Member Author

Choose a reason for hiding this comment

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

The upgrade test has its own logic to install all these components, and they follow the UPGRADE_DEPLOY_* configs instead. The reason for that is because we use a different BMO version for upgrade test than the rest of the suite.
In the fixtures setup, we use two separate clusters for this purpose, so we could run all tests in the same run, but in ci-e2e.sh, we have only 1 cluster, so if we run upgrade test, we don't install anything in the BeforeSuite and leave these installations to the test setup.

@mquhuy mquhuy requested a review from kashifest January 18, 2024 14:37
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kashifest

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 18, 2024
@lentzi90
Copy link
Member

/test-centos-e2e-integration-main
/test-ubuntu-integration-main

@metal3-io-bot metal3-io-bot merged commit e6bb1d6 into metal3-io:main Jan 19, 2024
24 checks passed
@metal3-io-bot metal3-io-bot deleted the mquhuy/e2e-upgrade-test branch January 19, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BMO e2e upgrade test
6 participants