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 release 1.1 upgrade test #904

Merged
merged 1 commit into from
May 24, 2023

Conversation

mboukhalfa
Copy link
Member

@mboukhalfa mboukhalfa commented Mar 27, 2023

This PR add the changes required to be able to run upgrade tests from different releases to current release like :

  • Change current release (main) tag to x.y.99
  • Parameterize v1beta1 releases in e2e config
  • Add upgrade from 1.1 to current

@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 27, 2023
@mboukhalfa
Copy link
Member Author

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

@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

@mboukhalfa
Copy link
Member Author

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

@metal3-io-bot metal3-io-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 27, 2023
@mboukhalfa
Copy link
Member Author

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

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from 362e176 to 1dbbb6f Compare March 27, 2023 15:19
@mboukhalfa
Copy link
Member Author

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

@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from 1dbbb6f to bc0a03e Compare March 27, 2023 16:02
@mboukhalfa
Copy link
Member Author

/test-centos-e2e-integration-main

1 similar comment
@mboukhalfa
Copy link
Member Author

/test-centos-e2e-integration-main

@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

1 similar comment
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from bc0a03e to 9dda469 Compare March 31, 2023 12:41
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

2 similar comments
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from 6e889e7 to 3bb79c4 Compare March 31, 2023 14:33
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

@mboukhalfa
Copy link
Member Author

/keep-test-e2e-upgrade-main

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from 3bb79c4 to 108732e Compare March 31, 2023 17:38
@mboukhalfa
Copy link
Member Author

/keep-test-e2e-upgrade-main

1 similar comment
@mboukhalfa
Copy link
Member Author

/keep-test-e2e-upgrade-main

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from 108732e to 59682f5 Compare April 4, 2023 13:26
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch 2 times, most recently from 85fc344 to ebe8a02 Compare April 5, 2023 09:07
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-ma
/test-centos-e2e-integration-mainin
/test-ubuntu-integration-main

@mboukhalfa
Copy link
Member Author

/keep-test-e2e-upgrade-main-from-release-0-5
/keep-test-e2e-upgrade-main-from-release-1-1

1 similar comment
@mboukhalfa
Copy link
Member Author

/keep-test-e2e-upgrade-main-from-release-0-5
/keep-test-e2e-upgrade-main-from-release-1-1

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from f92a6e9 to 1f3afbd Compare May 17, 2023 11:54
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main-from-release-0-5
/test-e2e-upgrade-main-from-release-1-1

@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main-from-release-1-1

1 similar comment
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main-from-release-1-1

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from 1f3afbd to 19b34a8 Compare May 17, 2023 13:46
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main-from-release-0-5
/test-e2e-upgrade-main-from-release-1-1

cmd := exec.Command("bash", "-c", "kubectl apply -f bmhosts_crs.yaml -n metal3")
cmd.Dir = workDir
output, err := cmd.CombinedOutput()
Logf("Applying bmh to meta3 namespace : \n %v", string(output))
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
Logf("Applying bmh to meta3 namespace : \n %v", string(output))
Logf("Applying bmh to metal3 namespace : \n %v", string(output))

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from 19b34a8 to 6869d77 Compare May 17, 2023 14:19
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main-from-release-0-5
/test-e2e-upgrade-main-from-release-1-1


- **/test-e2e-upgrade-main-from-release-0-5** runs e2e upgrade tests from CAPM3 API version v1alpha5/branch release-0.5 to CAPM3 API version v1beta1/branch main on Ubuntu

- **/test-e2e-upgrade-main-from-release-1-1** runs e2e upgrade tests from CAPM3 API version v1beta1/branch release-1.1 to CAPM3 API version v1beta1/branch main on Ubuntu

Copy link
Member

Choose a reason for hiding this comment

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

should we change these phrases and add ubuntu keyword too?

Suggested change
**/test-ubuntu-e2e-upgrade-main-from-release-0-5** runs e2e upgrade tests from CAPM3 API version v1alpha5/branch release-0.5 to CAPM3 API version v1beta1/branch main on Ubuntu
- **/test-ubuntu-e2e-upgrade-main-from-release-1-1** runs e2e upgrade tests from CAPM3 API version v1beta1/branch release-1.1 to CAPM3 API version v1beta1/branch main on Ubuntu

Copy link
Member Author

Choose a reason for hiding this comment

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

it is already there on line 161

Copy link
Member

Choose a reason for hiding this comment

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

I think Adil meant adding ubuntu in phrase

Copy link
Member

Choose a reason for hiding this comment

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

yes in the phrase.

Copy link
Member Author

Choose a reason for hiding this comment

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

well this needs some changes in the JJB this just documentation of what we really have there if someone changed it he can update this docs

@adilGhaffarDev
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2023
@mboukhalfa
Copy link
Member Author

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

@mboukhalfa mboukhalfa force-pushed the Add-upgrade-versions/mohammed branch from 6869d77 to bd8cd17 Compare May 18, 2023 07:49
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label May 18, 2023
@mboukhalfa
Copy link
Member Author

/test-e2e-upgrade-main-from-release-0-5
/test-e2e-upgrade-main-from-release-1-1

@mquhuy
Copy link
Member

mquhuy commented May 19, 2023

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

@metal3-io-bot
Copy link
Contributor

@mquhuy: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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

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.

@adilGhaffarDev
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label May 19, 2023
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 comments inline, I would also like to see a matrix similar to what we have in https://github.com/metal3-io/cluster-api-provider-metal3/blob/main/docs/e2e-test.md to depict which upgrade test is testing what version wise.

# Get latest capi patch for the compatible version with capm3 $UPGRADE_FROM_RELEASE
# for example the compatible version with capm3 0.5.x is capi 0.4.y
# If we are not upgrading from v0.5 then the capi compatible has same minor version tag as capm3 e.g v1.1.x
if [[ "${UPGRADE_FROM_RELEASE:-v0.5.}" == "v0.5." ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

why do we need to default it in the if statement when we already defaulted it few lines above?

Copy link
Member Author

Choose a reason for hiding this comment

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

this variable is different from the once above

Copy link
Member

Choose a reason for hiding this comment

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

this is the same var actually. Lets check it in a followup PR then, it seems incorrect to me.

# If we are not upgrading from v0.5 then the capi compatible has same minor version tag e.g v1.1.x
CAPI_UPGRADE_FROM_RELEASE=${UPGRADE_FROM_RELEASE}
fi
export CAPI_FROM_RELEASE="${CAPI_FROM_RELEASE:-$(get_latest_release "${CAPIRELEASEPATH}" "${CAPI_UPGRADE_FROM_RELEASE}")}"
Copy link
Member

Choose a reason for hiding this comment

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

the variable names are really confusing for me, whats the difference between CAPI_FROM_RELEASE and CAPI_UPGRADE_FROM_RELEASE, can we change this something bit more clearer and less confusing ?

Copy link
Member Author

Choose a reason for hiding this comment

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

We propagate only minor version from jjb and we name it = CAPI_FROM_RELEASE then when get the patch version that we are upgrading to I used var name CAPI_UPGRADE_FROM_RELEASE I think the best way is to name the first CAPI_FROM_MINOR_RELEASE and the second CAPI_FROM_PATCH_RELEASE but that will need changes in jjb and project infra

files:
- sourcePath: "../data/shared/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/${CAPI_TO_RELEASE:0:4}/metadata.yaml"
Copy link
Member

Choose a reason for hiding this comment

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

is this variable naming convention correct ${CAPI_TO_RELEASE:0:4} ? or is the collon doing some bash trick? where is the v?

Copy link
Member Author

Choose a reason for hiding this comment

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

This just extracting sub-string

@mboukhalfa
Copy link
Member Author

/test-centos-e2e-integration-main

@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 May 24, 2023
@metal3-io-bot metal3-io-bot merged commit af71773 into metal3-io:main May 24, 2023
14 checks passed
@Sunnatillo Sunnatillo deleted the Add-upgrade-versions/mohammed branch August 15, 2023 14:03
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants