Add a check between cr and release_versions images for release#1614
Open
eleo007 wants to merge 1 commit into
Open
Add a check between cr and release_versions images for release#1614eleo007 wants to merge 1 commit into
eleo007 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a release-branch-only GitHub Actions check to ensure the default CR (deploy/cr.yaml) uses the same container images (and operator version) as defined in e2e-tests/release_versions, preventing releases where only release_versions was updated.
Changes:
- Introduces a new workflow job that parses
deploy/cr.yamland compares key images againste2e-tests/release_versionsfor release PRs. - Fails the workflow with actionable
::error::messages when mismatches are detected.
Comment on lines
+137
to
+141
| expected_pgbouncer="${registry}/${!pgbouncer_var}" | ||
| expected_backrest="${registry}/${!backrest_var}" | ||
| expected_pmm="${registry}/${IMAGE_PMM3_CLIENT}" | ||
| expected_cr_version="${IMAGE_OPERATOR##*:}" | ||
|
|
egegunes
approved these changes
May 26, 2026
Comment on lines
+142
to
+146
| spec_image=$(grep -E '^ image: ' deploy/cr.yaml | head -1 | awk '{print $2}') | ||
| pgbouncer_image=$(sed -n '/^ pgBouncer:/,/^ image:/p' deploy/cr.yaml | grep -E '^ image: ' | head -1 | awk '{print $2}') | ||
| backrest_image=$(sed -n '/^ pgbackrest:/,/^ image:/p' deploy/cr.yaml | grep -E '^ image: ' | head -1 | awk '{print $2}') | ||
| pmm_image=$(sed -n '/^ pmm:/,/^ image:/p' deploy/cr.yaml | grep -E '^ image: ' | head -1 | awk '{print $2}') | ||
| cr_version=$(grep -E '^[[:space:]]*crVersion:' deploy/cr.yaml | head -1 | awk '{print $2}') |
Contributor
There was a problem hiding this comment.
i wonder if using yq would be simpler?
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
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.
CHANGE DESCRIPTION
Problem:
During the release there are cases when only the release_versions file is updated when the images are changed but images in default cr stay old ones. This PR introduces a check for release branch that the images in release_versions and in default cr are the same.
Checked PR with release branch: https://github.com/percona/percona-postgresql-operator/actions/runs/26392941587/job/77686723126?pr=1613
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability