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

OSAC-1282: sync helm values image tags with submodule commits - #227

Merged
omer-vishlitzky merged 2 commits into
osac-project:mainfrom
omer-vishlitzky:OSAC-1282-sync-helm-values
Jun 10, 2026
Merged

omer-vishlitzky merged 2 commits into
osac-project:mainfrom
omer-vishlitzky:OSAC-1282-sync-helm-values

Conversation

@omer-vishlitzky

@omer-vishlitzky omer-vishlitzky commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • sync-image-tags.sh only synced base/kustomization.yaml and overlay env vars — helm values/*.yaml files were pinned independently and had drifted
  • Extend the script to also update image SHAs in values/*.yaml, covering both the operator's tag: field and the inline image:tag format (fulfillment-service, osac-aap)
  • Skips files using :latest (e.g. development.yaml)
  • The bump-submodules workflow already calls sync-image-tags.sh --fix, so helm values will stay in sync automatically going forward

Jira: OSAC-1282

Test plan

  • sync-image-tags.sh detects all mismatches in check mode
  • sync-image-tags.sh --fix updates all values files correctly
  • Re-running check mode after fix shows all OK
  • development.yaml (uses :latest) is skipped
  • bump-submodules workflow syncs values files on next run

Summary by CodeRabbit

  • Chores
    • Optimized submodule update automation workflow to skip redundant operations when no changes are detected, reducing unnecessary commits
    • Enhanced Helm chart configuration management with automated synchronization and validation of container image version tags
    • Improved pull request handling for submodule updates with direct editing of existing PRs

@openshift-ci-robot

openshift-ci-robot commented Jun 5, 2026

Copy link
Copy Markdown

@omer-vishlitzky: This pull request references OSAC-1282 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

  • sync-image-tags.sh only synced base/kustomization.yaml and overlay env vars — helm values/*.yaml files were pinned independently and had drifted
  • Extend the script to also update image SHAs in values/*.yaml, covering both the operator's tag: field and the inline image:tag format (fulfillment-service, osac-aap)
  • Skips files using :latest (e.g. development.yaml)
  • The bump-submodules workflow already calls sync-image-tags.sh --fix, so helm values will stay in sync automatically going forward

Jira: OSAC-1282

Test plan

  • sync-image-tags.sh detects all mismatches in check mode
  • sync-image-tags.sh --fix updates all values files correctly
  • Re-running check mode after fix shows all OK
  • development.yaml (uses :latest) is skipped
  • bump-submodules workflow syncs values files on next run

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 trewest June 5, 2026 14:51
@openshift-ci openshift-ci Bot added the approved label Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@omer-vishlitzky, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 48 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 6590ee31-d4a9-4f63-b59e-83b01c6ece41

📥 Commits

Reviewing files that changed from the base of the PR and between 432cb87 and 60f68b3.

📒 Files selected for processing (2)
  • .github/workflows/bump-submodules.yaml
  • scripts/sync-image-tags.sh

Walkthrough

The PR improves submodule automation by adding an early-exit guard to prevent unnecessary commits when the branch is already up-to-date, updates PR handling to edit existing PRs in-place, and extends tag synchronization to validate and fix Helm chart values files using submodule-derived SHA tags with component-specific update logic.

Changes

Submodule Automation and Values Sync

Layer / File(s) Summary
Submodule bump workflow optimizations
.github/workflows/bump-submodules.yaml
Workflow adds a tree-comparison guard to exit early if the destination branch already matches the new tree ("branch already up to date"), preventing redundant commits. When a PR exists for the bump branch, the workflow now edits the PR body directly via gh pr edit instead of only logging the existence.
Helm values file tag synchronization
scripts/sync-image-tags.sh
Script extends tag sync to derive operator_tag, fulfillment_tag, and aap_tag from submodule commits, then iterates through values/*.yaml files containing sha- entries. For each matched component, it validates or (with --fix) updates tags: osac-operator via repository/tag: pairs, osac-fulfillment-service and osac-aap via inline component:sha-... replacements, with mismatches tracked in the existing errors counter.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • osac-project/osac-installer#80: Both PRs add and extend scripts/sync-image-tags.sh to validate and fix SHA tags derived from submodule commits, with this PR adding support for syncing values/*.yaml files.
  • osac-project/osac-installer#97: Both PRs work with the submodule-bump workflow and tag-sync logic; this PR improves bump automation efficiency and extends tag validation to values files, while the related PR updates submodule pointers and resulting image tags.

Suggested labels

lgtm

Suggested reviewers

  • adriengentil
  • trewest

Poem

🌿 Submodules march in sync, no false steps committed,
PRs edit smoothly when drift is already submitted,
Helm values now whisper in SHA-tagged harmony—
Automation thinks twice, and acts with certainty. ⚡


⚠️ Security & Risk Note: Both changes operate on CI/CD automation and infrastructure-as-code. The tree-comparison guard prevents accidental force-pushes of unchanged states (low risk, improves safety). The PR edit logic uses gh pr edit in a CI context—verify that the GitHub token has appropriate scoped permissions (should be limited to PR body updates, not force-push rights). The values file sync uses shell string substitution for YAML tag updates—confirm that the component-specific patterns (repository:, inline:, sha- prefixes) reliably match intended entries without false positives in user-provided values files. No secrets or external service calls are introduced.

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning Commit uses Co-Authored-By trailer for Claude AI tool instead of Red Hat-compliant Assisted-by or Generated-by trailers. Replace Co-Authored-By trailer with appropriate Assisted-by or Generated-by trailer to comply with Red Hat AI attribution standards.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main changes: extending sync-image-tags.sh to sync Helm values image tags with submodule commits, which is the primary objective of the PR.
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 detected. All sensitive data uses GitHub Secrets context variables; dynamic tokens obtained at runtime from public APIs.
No-Weak-Crypto ✅ Passed No weak cryptography detected. Code uses git SHAs as image tag labels and standard OAuth tokens. No MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom crypto, or insecure secret comparisons found.
No-Injection-Vectors ✅ Passed No injection vectors found. Variables come from hardcoded values or git commands. No eval, exec, shell=True, unsafe sed patterns, or dangerous constructs detected.
Container-Privileges ✅ Passed PR contains no container/Kubernetes manifests or container configurations. The check is not applicable: changes are limited to GitHub Actions workflow and bash script for image synchronization.
No-Sensitive-Data-In-Logs ✅ Passed All logging outputs contain only public data (SHAs, image names, tags). Secrets are never echoed; GHCR token used silently with -s flag and -o /dev/null.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@omer-vishlitzky

Copy link
Copy Markdown
Contributor Author

/retest

Extend sync-image-tags.sh to also update image SHAs in values/*.yaml
files. Covers both the operator's separate tag: field and the inline
image:tag format used by fulfillment-service and osac-aap. Skips files
using :latest (development.yaml). The bump-submodules workflow already
calls this script with --fix, so helm values will stay in sync
automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@omer-vishlitzky
omer-vishlitzky force-pushed the OSAC-1282-sync-helm-values branch from 288bd58 to 432cb87 Compare June 6, 2026 16:16
for pair in \
"osac-operator:tag ${operator_tag}" \
"fulfillment-service:inline ${fulfillment_tag}" \
"osac-aap:inline ${aap_tag}"; do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that this works because the overlay section runs first, but relying on that global ${aap_tag} is fragile. We might want to define it locally alongside operator_tag to keep this block self-contained.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@omer-vishlitzky
omer-vishlitzky force-pushed the OSAC-1282-sync-helm-values branch from 432cb87 to 60f68b3 Compare June 10, 2026 11:33

@eliorerz eliorerz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@openshift-ci openshift-ci Bot added the lgtm label Jun 10, 2026
@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eliorerz, omer-vishlitzky

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

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.

3 participants