Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

OSAC-2105: pin umbrella chart image tags at publish time - #394

Merged
eliorerz merged 1 commit into
osac-project:mainfrom
eliorerz:OSAC-2105-pin-umbrella-image-tags
Jul 6, 2026
Merged

eliorerz merged 1 commit into
osac-project:mainfrom
eliorerz:OSAC-2105-pin-umbrella-image-tags

Conversation

@eliorerz

@eliorerz eliorerz commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The umbrella chart's publish-charts.yaml only rewrote tag: latest via sed, which matches operator.image.tag and bmf.image.tag but misses images expressed as combined repo:tag strings (service.images.service, aap.bootstrap.image, ui.images.ui, dbMigrate.image), so those shipped :latest in every published OCI version (0.0.1-0.0.4).
  • Replaced the sed with a yq expression that stamps each image using its already-resolved per-component version (operator_ver, service_ver, aap_ver, bmf_ver, ui_ver), matching the pattern already used for the Chart.yaml dependency rewrite step.
  • Verified locally against the real charts/osac/values.yaml with fake version env vars — all previously-:latest fields resolve correctly, nothing else changes.

Fixes https://redhat.atlassian.net/browse/OSAC-2105

Test plan

  • CI passes
  • Manually trigger workflow_dispatch on Publish Helm Charts (or dry-run the step) and confirm helm template output has no :latest images

Summary by CodeRabbit

  • Chores
    • Improved the release workflow to update each component’s image tag independently, keeping published chart values aligned with the correct component versions.
    • Updated the chart values output so the resulting image and tag settings are easier to verify after publishing.

The publish-charts.yaml sed only matched 'tag: latest', missing images
expressed as repo:tag strings (service.images.service, aap.bootstrap.image,
ui.images.ui, dbMigrate.image). Replace it with a yq expression that stamps
every image using its resolved per-component version.
@openshift-ci-robot

openshift-ci-robot commented Jul 6, 2026

Copy link
Copy Markdown

@eliorerz: This pull request references OSAC-2105 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • The umbrella chart's publish-charts.yaml only rewrote tag: latest via sed, which matches operator.image.tag and bmf.image.tag but misses images expressed as combined repo:tag strings (service.images.service, aap.bootstrap.image, ui.images.ui, dbMigrate.image), so those shipped :latest in every published OCI version (0.0.1-0.0.4).
  • Replaced the sed with a yq expression that stamps each image using its already-resolved per-component version (operator_ver, service_ver, aap_ver, bmf_ver, ui_ver), matching the pattern already used for the Chart.yaml dependency rewrite step.
  • Verified locally against the real charts/osac/values.yaml with fake version env vars — all previously-:latest fields resolve correctly, nothing else changes.

Fixes https://redhat.atlassian.net/browse/OSAC-2105

Test plan

  • CI passes
  • Manually trigger workflow_dispatch on Publish Helm Charts (or dry-run the step) and confirm helm template output has no :latest images

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from adriengentil and rgolangh July 6, 2026 20:14
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eliorerz

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

The pull request process is described here

Details 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

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The publish-charts workflow's values.yaml update step was changed from a single sed-based version substitution to targeted yq commands setting individual image/tag fields for operator, bmf, fulfillment-service, osac-aap, and osac-ui components, followed by a grep to display the updated lines.

Changes

Chart Values Update Mechanism

Layer / File(s) Summary
yq-based per-component version injection
.github/workflows/publish-charts.yaml
Replaces the umbrella-version sed substitution with yq commands that set operator, bmf, service, aap, and ui image/tag fields individually, and adds a grep to verify updated tag/image lines.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: pinning umbrella chart image tags during chart publication.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets were added; the change only rewrites image/version fields and keeps existing secret references and pinned action SHAs.
No-Weak-Crypto ✅ Passed The diff only updates image-tag rewriting in a workflow; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons are present.
No-Injection-Vectors ✅ Passed No listed injection patterns were introduced; the new yq shell uses semver-validated env vars, and there’s no eval/exec/yaml.load/os.system/dangerouslySetInnerHTML usage in the diff.
Container-Privileges ✅ Passed The only changed workflow file contains no privileged, hostPID/Network/IPC, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The new log output only prints version info and public ghcr.io image refs; no passwords, tokens, PII, or internal hostnames are echoed.
Ai-Attribution ✅ Passed PASS: The PR/commit message contains no AI-tool mention, and HEAD has no Assisted-by/Generated-by or Co-Authored-By trailers.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eliorerz
eliorerz merged commit 79e7d3a into osac-project:main Jul 6, 2026
4 of 8 checks passed
@eliorerz
eliorerz deleted the OSAC-2105-pin-umbrella-image-tags branch July 6, 2026 20:19

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish-charts.yaml:
- Around line 183-190: The image tag updates in the publish-charts workflow are
using version-based refs instead of the published sha- convention. Update the yq
assignments in the chart values update step to set each image tag/reference to
the corresponding sha-${SHORT_SHA}-style tag used elsewhere in the repo, and
keep this consistent for operator, bmf, service, aap, ui, and dbMigrate so the
published chart pulls valid images.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 8c79cf3f-36ad-4b66-8b97-92f476534ca3

📥 Commits

Reviewing files that changed from the base of the PR and between 631937c and 1eba970.

📒 Files selected for processing (1)
  • .github/workflows/publish-charts.yaml

Comment on lines +183 to +190
yq -i "
.operator.image.tag = \"v${OPERATOR_VER}\" |
.bmf.image.tag = \"v${BMF_VER}\" |
.service.images.service = \"ghcr.io/osac-project/fulfillment-service:v${SERVICE_VER}\" |
.aap.bootstrap.image = \"ghcr.io/osac-project/osac-aap:v${AAP_VER}\" |
.ui.images.ui = \"ghcr.io/osac-project/osac-ui:v${UI_VER}\" |
.dbMigrate.image = \"ghcr.io/osac-project/fulfillment-service:v${SERVICE_VER}\"
" charts/osac/values.yaml

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find image build/push workflows and inspect their tag conventions
fd . .github/workflows -e yaml -e yml | xargs rg -n -i 'tag|IMAGE_TAG|docker push|buildah push' -A3 -B3

Repository: osac-project/osac-installer

Length of output: 7430


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== scripts/sync-image-tags.sh =="
if [ -f scripts/sync-image-tags.sh ]; then
  cat -n scripts/sync-image-tags.sh
else
  echo "missing"
fi

echo
echo "== charts/osac/values.yaml (image refs) =="
rg -n 'ghcr\.io/osac-project|image\.tag|dbMigrate|service:|bootstrap:' charts/osac/values.yaml -A2 -B2

echo
echo "== repository search for tag conventions =="
rg -n 'sha-\$\{|v\$\{|ghcr\.io/osac-project|IMAGE_TAG|tag:' .github scripts charts -g '!**/*.png' -g '!**/*.svg' -A2 -B2

Repository: osac-project/osac-installer

Length of output: 22616


Use the published sha- image tags here. In .github/workflows/publish-charts.yaml:183-190, these image refs should follow the same sha-<shortsha> convention used elsewhere in the repo; v${...} will not resolve to published images and will break pulls.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/publish-charts.yaml around lines 183 - 190, The image tag
updates in the publish-charts workflow are using version-based refs instead of
the published sha- convention. Update the yq assignments in the chart values
update step to set each image tag/reference to the corresponding
sha-${SHORT_SHA}-style tag used elsewhere in the repo, and keep this consistent
for operator, bmf, service, aap, ui, and dbMigrate so the published chart pulls
valid images.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants