-
Notifications
You must be signed in to change notification settings - Fork 10
[patch] Pin CLI image versions in gitops Job templates #254
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
relax-files identified by path relative to root dir
…a file, replacing need for the relax-list
2 tasks
(includes ansible-devops and python-devops fixes for 6.0.0 release)
rbinns
approved these changes
Apr 17, 2025
Contributor
rbinns
left a comment
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.
Reviewed with Tom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
https://jsw.ibm.com/browse/MASCORE-5516
Define
$_cli_image_tagas a constant in each Job file and use as the tag for the quay.io/ibmmas/cli image.This needs to be taken into account when computing job names in certain cases (where the image field is immutable for non-hook Jobs) - so it is included when computing the
adler32sumthat we append to job names.Because computing job names is getting quite complex, this PR also pulls out
$_job_name_prefix,$_job_config_valuesand$_job_versionconstants and uses them to compute$_job_hashand$_job_namein a standardised manner.Having these constants and calculations defined in a standardised way makes scripting the process of updating them (e.g. updating all
$_cli_image_tagvalues across the templates) and validating them (e.g. in a git pre-commit hook and a Githhub Action to check for conformance to the convention) feasible.PR also includes:
set-cli-image-tag.shscript to automate update across all templatesverify-job-definitions.shscript to validate that all cli image tags are parametrised correctly, and (where necessary) the constants for guarding against updates to immutable Job fields are defined and used correctly. It also runs checks that should guard against generating job names that are longer than 63 chars in length. This script is used for enforcement as a pre-commit hook and in thelintGithub Action.Testing
Migrating to these changes in an existing env with no parameterised cli image tags (noble6/mascore3763):
Updating the image tag for all Jobs in an existing env (noble6/mascore3763):
Resulting commit: 17aebf7
Deploying to a fresh environment (fvtsaas/premium)
All cluster/instance apps synced and healthy (all jobs ran successfully)
Updating the CLI image tag across all templates
All jobs reran and completed on cluster and instance apps:
Orphaned Jobs left behind as expected (



auto_delete: false), some examples:pre-commit hook
Github Action