-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 feat: add check version against metadata utility #12529
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
base: main
Are you sure you want to change the base?
🌱 feat: add check version against metadata utility #12529
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
846c0e4
to
12b25d6
Compare
have you consider to add this to hack tools like we have for other tools we are using in CI or during release? |
I hadn't to be honest. I thought it would be mostly used by providers and may be easier from clusterctl. But thinking about it a single responsibility cli tool in hack/tools may be better and providers can Moving to WIP whilst i make the change. |
Thanks, |
12b25d6
to
54ea9cc
Compare
This adds a CLI utility which given a version number will check that there is a release series defined in a metadata file for that version. The main use case for this is a CI check. When building a release of a provider that is for a new major or minor version its required that a new release series is added to the providers metadata file. This ensures that the correct version of the provider is installed when initializing a management cluster. A common failure for release pipelines is that the metadata file hasn't been updated. Signed-off-by: Richard Case <[email protected]>
54ea9cc
to
3dbd25b
Compare
/remove-area clusterctl |
Changed so this is now in |
Then run the binary to check a version: | ||
|
||
```bash | ||
bin/metadata-version-validator --file ../../cluster-api-provider-aws/metadata.yaml --version v2.8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bin/metadata-version-validator --file ../../cluster-api-provider-aws/metadata.yaml --version v2.8.0 | |
bin/metadata-version-validator --file ../../metadata.yaml --version v1.11.0 |
Maybe it's better to reference a file in CAPI so the docs example is self-contained? That is, I got an error trying to follow this doc naively.
What this PR does / why we need it:
This adds a new command to clusterctl which given a version number will check that there is a release series defined in a metadata file for that version.
The main use case for this is a CI check. When building a release of a provider that is for a new major or minor version, it's required that a new release series is added to the providers' metadata file. This ensures that the correct version of the provider is installed when initializing a management cluster.
A common failure for release pipelines is that the metadata file hasn't been updated and it's only found out when someone tries to deploy the new version.
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 #
/area util