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

OSAC-1409: Read component versions from Chart.yaml on tag push - #266

Closed
eliorerz wants to merge 2 commits into
osac-project:mainfrom
eliorerz:fix/publish-charts-read-versions-from-chart-yaml
Closed

eliorerz wants to merge 2 commits into
osac-project:mainfrom
eliorerz:fix/publish-charts-read-versions-from-chart-yaml

Conversation

@eliorerz

@eliorerz eliorerz commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When triggered by tag push, the publish workflow now reads dependency versions from charts/osac/Chart.yaml instead of defaulting all components to the umbrella version
  • All workflow_dispatch inputs changed from required to optional, falling back to Chart.yaml values when omitted
  • Updated Chart.yaml dependency versions from 0.0.0 placeholders to current published versions (fulfillment-service 0.0.64, osac-operator 0.0.1, osac-operator-crds 0.0.1, osac-aap 0.0.3)

Summary by CodeRabbit

  • New Features

    • Added flexible umbrella chart publishing with optional component version inputs and defaults from the chart configuration.
    • Pinned core chart dependency versions for more predictable releases.
  • Bug Fixes

    • Improved Helm dependency builds and deployments by aligning local dependency versions automatically.
    • Added a clear error when the required yq tool is unavailable.
  • Documentation

    • Expanded release guidance for publishing, tagging, verifying, and deploying Helm charts.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The PR pins selected umbrella chart dependencies, normalizes dependency versions during Helm builds, adds Chart.yaml-based publish version fallbacks, verifies yq for Helm deployments, and documents component and umbrella chart release procedures.

Changes

Helm Chart Dependency Management and Release Process

Layer / File(s) Summary
Chart dependency version pinning
charts/osac/Chart.yaml
Pins four umbrella chart dependency versions while preserving their repositories and aliases.
CI workflow dependency rewriting
.github/workflows/helm-lint.yaml, .github/workflows/integration-tests.yml, scripts/setup.sh
Uses yq to set dependency versions to 0.0.0 before Helm dependency operations and requires yq in Helm deployment mode.
Publish workflow version resolution
.github/workflows/publish-charts.yaml
Makes component inputs optional and reads missing versions from charts/osac/Chart.yaml.
Release process documentation
docs/releasing.md
Documents component and umbrella chart publishing, version resolution, tagging, verification, and operational release steps.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Dispatch as workflow_dispatch
  participant Publish as publish-charts.yaml
  participant Yq as yq
  participant Chart as charts/osac/Chart.yaml
  participant Helm as Helm packaging

  Dispatch->>Publish: optional component versions
  Publish->>Yq: resolve missing versions
  Yq->>Chart: read dependency versions
  Chart-->>Yq: pinned versions
  Yq-->>Publish: resolved versions
  Publish->>Chart: rewrite OCI repositories and versions
  Publish->>Helm: package umbrella chart
Loading

Possibly related PRs

Suggested reviewers: rgolangh, danmanor

🚥 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 clearly describes the main change: tag-push publishing now reads component versions from Chart.yaml.
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 API keys/tokens/passwords/private keys or credentialed URLs were added; secret-like vars are populated from runtime secrets/files.
No-Weak-Crypto ✅ Passed PR only changes Helm workflows/docs and chart versions; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret-comparison code was added.
No-Injection-Vectors ✅ Passed No flagged injection patterns were introduced; added shell/yq uses are static or semver-validated, and targeted searches found no eval/os.system/yaml.load/shell:true usage.
Container-Privileges ✅ Passed The PR only changes workflows, docs, scripts, and Chart.yaml; the diff has no privileged/hostPID/hostNetwork/hostIPC/SYS_ADMIN/allowPrivilegeEscalation settings in manifests.
No-Sensitive-Data-In-Logs ✅ Passed New logging only prints setup status, resolved chart versions, and a yq install error; no passwords, tokens, PII, or customer data are echoed.
Ai-Attribution ✅ Passed HEAD-only commit and changed files contain no AI-tool mention or Co-Authored-By; no Red Hat attribution trailer was needed.
✨ 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.

@openshift-ci-robot

openshift-ci-robot commented Jun 11, 2026

Copy link
Copy Markdown

@eliorerz: This pull request references OSAC-1409 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

  • When triggered by tag push, the publish workflow now reads dependency versions from charts/osac/Chart.yaml instead of defaulting all components to the umbrella version
  • All workflow_dispatch inputs changed from required to optional, falling back to Chart.yaml values when omitted
  • Updated Chart.yaml dependency versions from 0.0.0 placeholders to current published versions (fulfillment-service 0.0.64, osac-operator 0.0.1, osac-operator-crds 0.0.1, osac-aap 0.0.3)

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 danmanor and rgolangh June 11, 2026 19:29
@openshift-ci

openshift-ci Bot commented Jun 11, 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

@eliorerz
eliorerz force-pushed the fix/publish-charts-read-versions-from-chart-yaml branch 2 times, most recently from d0c9063 to 1a2ebb4 Compare June 11, 2026 19:40
Comment thread scripts/setup.sh Outdated
echo "Deploying OSAC using Helm..."
# Chart.yaml has real published versions for the release workflow, but
# file:// deps require versions to match the submodule Chart.yaml (0.0.0).
yq -i '(.dependencies[].version) = "0.0.0"' charts/osac/Chart.yaml

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.

this needs yq installed in the osac installer dockerfile in release, please create such pr before merging this pr

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, Why won't we keep the dockerfile in this repository?

@eliorerz
eliorerz force-pushed the fix/publish-charts-read-versions-from-chart-yaml branch 2 times, most recently from 6f9005d to 056dbf9 Compare June 12, 2026 07:03

@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: 2

🤖 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 `@docs/releasing.md`:
- Around line 103-104: The docs incorrectly state that workflow_dispatch falls
back to `published-versions.yaml`; update the text to state that missing
component versions are read from `charts/osac/Chart.yaml` instead, and mention
`workflow_dispatch` as the workflow that uses this fallback so operators are
directed to the correct source of truth (`charts/osac/Chart.yaml`) for manual
publishes rather than `published-versions.yaml`.

In `@scripts/setup.sh`:
- Around line 327-330: The script currently mutates the tracked
charts/osac/Chart.yaml in place using "yq -i" and never restores it; change the
flow to operate on a temporary copy instead: copy charts/osac/Chart.yaml to a
temp file, run yq to set .dependencies[].version="0.0.0" against that temp file,
then run helm dependency build pointing at the temp chart directory (or temp
Chart.yaml) and finally delete the temp; ensure functions/commands referenced
(yq usage, charts/osac/Chart.yaml, helm dependency build) are updated so the
repository file is never modified in place.
🪄 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: a77f5584-f862-42c7-b8c0-eaf78adee055

📥 Commits

Reviewing files that changed from the base of the PR and between bffd729 and 056dbf9.

📒 Files selected for processing (6)
  • .github/workflows/helm-integration.yaml
  • .github/workflows/helm-lint.yaml
  • .github/workflows/publish-charts.yaml
  • charts/osac/Chart.yaml
  • docs/releasing.md
  • scripts/setup.sh

Comment thread docs/releasing.md Outdated
Comment thread scripts/setup.sh Outdated
Comment on lines 327 to 330
# Chart.yaml has real published versions for the release workflow, but
# file:// deps require versions to match the submodule Chart.yaml (0.0.0).
yq -i '(.dependencies[].version) = "0.0.0"' charts/osac/Chart.yaml
helm dependency build charts/osac/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Major risk: don’t rewrite the release source-of-truth Chart.yaml in place.

Lines 327-329 permanently mutate the tracked charts/osac/Chart.yaml to fake 0.0.0 dependency versions and never restore it. Because this file now drives tag-based umbrella releases, a local ./scripts/setup.sh run leaves the repo dirty with incorrect versions that are easy to commit or tag by accident.

Suggested fix
-    # Chart.yaml has real published versions for the release workflow, but
-    # file:// deps require versions to match the submodule Chart.yaml (0.0.0).
-    yq -i '(.dependencies[].version) = "0.0.0"' charts/osac/Chart.yaml
-    helm dependency build charts/osac/
-    helm upgrade --install osac charts/osac/ \
+    # Chart.yaml has real published versions for the release workflow, but
+    # file:// deps require versions to match the submodule Chart.yaml (0.0.0).
+    tmp_chart_dir="$(mktemp -d)"
+    trap 'rm -rf "${tmp_chart_dir}"' EXIT
+    cp -R charts/osac/. "${tmp_chart_dir}/"
+    yq -i '(.dependencies[].version) = "0.0.0"' "${tmp_chart_dir}/Chart.yaml"
+    helm dependency build "${tmp_chart_dir}/"
+    helm upgrade --install osac "${tmp_chart_dir}/" \
         --namespace "${INSTALLER_NAMESPACE}" \
         --values "${VALUES_FILE}" \
         --timeout 40m \
         --wait
🤖 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 `@scripts/setup.sh` around lines 327 - 330, The script currently mutates the
tracked charts/osac/Chart.yaml in place using "yq -i" and never restores it;
change the flow to operate on a temporary copy instead: copy
charts/osac/Chart.yaml to a temp file, run yq to set
.dependencies[].version="0.0.0" against that temp file, then run helm dependency
build pointing at the temp chart directory (or temp Chart.yaml) and finally
delete the temp; ensure functions/commands referenced (yq usage,
charts/osac/Chart.yaml, helm dependency build) are updated so the repository
file is never modified in place.

@eliorerz

Copy link
Copy Markdown
Contributor Author

/retest

@eliorerz
eliorerz force-pushed the fix/publish-charts-read-versions-from-chart-yaml branch from 056dbf9 to 0702f33 Compare June 17, 2026 15:59

@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: 2

🤖 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 `@docs/releasing.md`:
- Around line 103-104: The current documentation at line 103 incorrectly states
that all `workflow_dispatch` inputs fall back to `charts/osac/Chart.yaml`, but
this is misleading because the `version` input actually falls back to the
selected git ref/tag name instead. Update the documentation to clarify that only
component versions fall back to `charts/osac/Chart.yaml`, while the `version`
input has a different fallback behavior (the git ref/tag name). This distinction
is important for users performing manual releases to understand the actual
behavior.

In `@scripts/setup.sh`:
- Around line 361-364: Add a prerequisite check for the yq command at the
beginning of the setup.sh script, before any cluster modifications are made.
This check should validate that yq is available and provide a clear, actionable
error message if it is not found. Since the script uses yq in the yq -i command
that modifies charts/osac/Chart.yaml, performing this check upfront prevents the
script from failing mid-run after substantial cluster changes have already
occurred, rather than relying solely on the generic "command not found" error
from set -o errexit.
🪄 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: b08b07dd-9cdc-4b09-bd5e-d5c9efff976c

📥 Commits

Reviewing files that changed from the base of the PR and between 056dbf9 and 0702f33.

📒 Files selected for processing (6)
  • .github/workflows/helm-integration.yaml
  • .github/workflows/helm-lint.yaml
  • .github/workflows/publish-charts.yaml
  • charts/osac/Chart.yaml
  • docs/releasing.md
  • scripts/setup.sh

Comment thread docs/releasing.md Outdated
Comment thread scripts/setup.sh Outdated
@omer-vishlitzky

Copy link
Copy Markdown
Contributor

🔴 CI Triage: pr_issue | Category: BUILD

Root cause: The PR has a git merge conflict with the main branch in scripts/setup.sh.

Explanation: During the initial source cloning step, Prow's clonerefs utility attempts to merge the PR's head commit into the base branch commit to create the test environment. This git merge operation failed with a content conflict in scripts/setup.sh, causing the build to fail early before any tests could run.

Evidence:

build-log.txt:

CONFLICT (content): Merge conflict in scripts/setup.sh

Suggestion: Rebase the PR on top of the latest main branch and resolve the merge conflicts in scripts/setup.sh.


Prow job | Build 2068687609932025856 | 🤖 triagent

For deeper investigation, use the /osac-debug-e2e skill with this build ID.

@eliorerz
eliorerz force-pushed the fix/publish-charts-read-versions-from-chart-yaml branch from 0702f33 to ee05ef7 Compare July 2, 2026 22:37
@eliorerz
eliorerz force-pushed the fix/publish-charts-read-versions-from-chart-yaml branch from ee05ef7 to 881dda3 Compare July 2, 2026 23:15
When triggered by tag push, the publish workflow now reads dependency
versions from charts/osac/Chart.yaml instead of defaulting all
components to the umbrella version. This allows tag-based releases
to work correctly when component charts have different versions.

All workflow_dispatch inputs are now optional, falling back to
Chart.yaml values when omitted. Chart.yaml dependency versions
updated from 0.0.0 placeholders to current published versions.
@eliorerz
eliorerz force-pushed the fix/publish-charts-read-versions-from-chart-yaml branch from 881dda3 to 36eb4e7 Compare July 3, 2026 16:06

@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: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/publish-charts.yaml (1)

89-129: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Downstream of unpinned Chart.yaml deps.

bmf_crds_ver, bmf_ver, and ui_ver fall back to reading .version from charts/osac/Chart.yaml, which currently still holds ">=0.0.0" for these three dependencies (see comment on charts/osac/Chart.yaml). The semver validation loop at Line 122 will reject these and abort the release. Either pin all seven deps in Chart.yaml, or exclude disabled/optional components (bmf, ui) from this unconditional resolve+validate flow.

🤖 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 89 - 129, The version
resolution in the publish-charts workflow is still unconditionally reading and
validating optional component versions from Chart.yaml, which causes the release
to fail when those deps are left as >=0.0.0. Update the version handling in the
workflow step that sets crds_ver, operator_ver, service_ver, aap_ver,
bmf_crds_ver, bmf_ver, and ui_ver so that either all Chart.yaml dependencies are
pinned to real semver values or the disabled/optional components (especially
bare-metal-fulfillment-operator-crds, bare-metal-fulfillment-operator, and
osac-ui) are skipped from the fallback read and semver validation path.
🤖 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/helm-integration.yaml:
- Around line 40-45: The chart dependency version rewrite is duplicated in this
workflow and the same logic also exists in helm-lint.yaml and scripts/setup.sh.
Extract the shared `yq`-based pinning behavior into a single helper such as
`scripts/pin-chart-deps-to-local.sh`, then update the workflow step that runs
`helm dependency build` to call that helper instead of inlining the rewrite.
Make sure the shared script preserves the current `Chart.yaml` adjustment for
`charts/osac/Chart.yaml` so all call sites use one source of truth.

In @.github/workflows/publish-charts.yaml:
- Around line 212-224: The Create GitHub Release step in publish-charts is
currently gated with always(), which allows it to run after earlier failures;
change the step condition to require overall success so it only executes when
the publish flow has completed successfully. Update the if expression on the
Create GitHub Release step to use success() instead of always(), keeping the
existing versions step check intact.
- Around line 248-254: The release step in publish-charts.yaml is interpolating
github.repository directly inside the run script; move that value into env
variables like VERSION is already done, then reference the env variable in both
gh release create and gh release edit inside the release creation step. Keep the
fix local to the step that uses gh release create/edit so the shell script no
longer contains inline ${{ github.repository }} expansion.

In `@charts/osac/Chart.yaml`:
- Around line 24-37: The remaining dependencies in Chart.yaml are still using
open-ended version constraints, which will fail the release job’s strict semver
validation. Update the version fields for bare-metal-fulfillment-operator-crds,
bare-metal-fulfillment-operator, and osac-ui to pinned release versions that
match the published charts, keeping the existing aliases and conditions intact.
Use the dependency entries in the osac chart manifest to locate and adjust these
values before publish-charts.yaml runs.

---

Outside diff comments:
In @.github/workflows/publish-charts.yaml:
- Around line 89-129: The version resolution in the publish-charts workflow is
still unconditionally reading and validating optional component versions from
Chart.yaml, which causes the release to fail when those deps are left as
>=0.0.0. Update the version handling in the workflow step that sets crds_ver,
operator_ver, service_ver, aap_ver, bmf_crds_ver, bmf_ver, and ui_ver so that
either all Chart.yaml dependencies are pinned to real semver values or the
disabled/optional components (especially bare-metal-fulfillment-operator-crds,
bare-metal-fulfillment-operator, and osac-ui) are skipped from the fallback read
and semver validation path.
🪄 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: 49d126dd-01c9-4afd-87e6-d3fd5d6150f8

📥 Commits

Reviewing files that changed from the base of the PR and between 0702f33 and 36eb4e7.

📒 Files selected for processing (6)
  • .github/workflows/helm-integration.yaml
  • .github/workflows/helm-lint.yaml
  • .github/workflows/publish-charts.yaml
  • charts/osac/Chart.yaml
  • docs/releasing.md
  • scripts/setup.sh

@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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/publish-charts.yaml (1)

89-129: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Downstream of unpinned Chart.yaml deps.

bmf_crds_ver, bmf_ver, and ui_ver fall back to reading .version from charts/osac/Chart.yaml, which currently still holds ">=0.0.0" for these three dependencies (see comment on charts/osac/Chart.yaml). The semver validation loop at Line 122 will reject these and abort the release. Either pin all seven deps in Chart.yaml, or exclude disabled/optional components (bmf, ui) from this unconditional resolve+validate flow.

🤖 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 89 - 129, The version
resolution in the publish-charts workflow is still unconditionally reading and
validating optional component versions from Chart.yaml, which causes the release
to fail when those deps are left as >=0.0.0. Update the version handling in the
workflow step that sets crds_ver, operator_ver, service_ver, aap_ver,
bmf_crds_ver, bmf_ver, and ui_ver so that either all Chart.yaml dependencies are
pinned to real semver values or the disabled/optional components (especially
bare-metal-fulfillment-operator-crds, bare-metal-fulfillment-operator, and
osac-ui) are skipped from the fallback read and semver validation path.
🤖 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/helm-integration.yaml:
- Around line 40-45: The chart dependency version rewrite is duplicated in this
workflow and the same logic also exists in helm-lint.yaml and scripts/setup.sh.
Extract the shared `yq`-based pinning behavior into a single helper such as
`scripts/pin-chart-deps-to-local.sh`, then update the workflow step that runs
`helm dependency build` to call that helper instead of inlining the rewrite.
Make sure the shared script preserves the current `Chart.yaml` adjustment for
`charts/osac/Chart.yaml` so all call sites use one source of truth.

In @.github/workflows/publish-charts.yaml:
- Around line 212-224: The Create GitHub Release step in publish-charts is
currently gated with always(), which allows it to run after earlier failures;
change the step condition to require overall success so it only executes when
the publish flow has completed successfully. Update the if expression on the
Create GitHub Release step to use success() instead of always(), keeping the
existing versions step check intact.
- Around line 248-254: The release step in publish-charts.yaml is interpolating
github.repository directly inside the run script; move that value into env
variables like VERSION is already done, then reference the env variable in both
gh release create and gh release edit inside the release creation step. Keep the
fix local to the step that uses gh release create/edit so the shell script no
longer contains inline ${{ github.repository }} expansion.

In `@charts/osac/Chart.yaml`:
- Around line 24-37: The remaining dependencies in Chart.yaml are still using
open-ended version constraints, which will fail the release job’s strict semver
validation. Update the version fields for bare-metal-fulfillment-operator-crds,
bare-metal-fulfillment-operator, and osac-ui to pinned release versions that
match the published charts, keeping the existing aliases and conditions intact.
Use the dependency entries in the osac chart manifest to locate and adjust these
values before publish-charts.yaml runs.

---

Outside diff comments:
In @.github/workflows/publish-charts.yaml:
- Around line 89-129: The version resolution in the publish-charts workflow is
still unconditionally reading and validating optional component versions from
Chart.yaml, which causes the release to fail when those deps are left as
>=0.0.0. Update the version handling in the workflow step that sets crds_ver,
operator_ver, service_ver, aap_ver, bmf_crds_ver, bmf_ver, and ui_ver so that
either all Chart.yaml dependencies are pinned to real semver values or the
disabled/optional components (especially bare-metal-fulfillment-operator-crds,
bare-metal-fulfillment-operator, and osac-ui) are skipped from the fallback read
and semver validation path.
🪄 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: 49d126dd-01c9-4afd-87e6-d3fd5d6150f8

📥 Commits

Reviewing files that changed from the base of the PR and between 0702f33 and 36eb4e7.

📒 Files selected for processing (6)
  • .github/workflows/helm-integration.yaml
  • .github/workflows/helm-lint.yaml
  • .github/workflows/publish-charts.yaml
  • charts/osac/Chart.yaml
  • docs/releasing.md
  • scripts/setup.sh
🛑 Comments failed to post (4)
.github/workflows/helm-integration.yaml (1)

40-45: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated yq rewrite logic across three files.

This exact yq -i '(.dependencies[].version) = "0.0.0"' + comment block is repeated verbatim in helm-lint.yaml and scripts/setup.sh. Any future change to the rewrite logic (e.g. adding a new file:// dependency exception) risks drifting out of sync across the three copies.

Consider extracting this into a small shared script (e.g. scripts/pin-chart-deps-to-local.sh) invoked from all three call sites.

🤖 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/helm-integration.yaml around lines 40 - 45, The chart
dependency version rewrite is duplicated in this workflow and the same logic
also exists in helm-lint.yaml and scripts/setup.sh. Extract the shared
`yq`-based pinning behavior into a single helper such as
`scripts/pin-chart-deps-to-local.sh`, then update the workflow step that runs
`helm dependency build` to call that helper instead of inlining the rewrite.
Make sure the shared script preserves the current `Chart.yaml` adjustment for
`charts/osac/Chart.yaml` so all call sites use one source of truth.
.github/workflows/publish-charts.yaml (2)

212-224: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file=".github/workflows/publish-charts.yaml"

echo "=== file outline ==="
python3 - <<'PY'
from pathlib import Path
p = Path(".github/workflows/publish-charts.yaml")
lines = p.read_text().splitlines()
for i,l in enumerate(lines,1):
    if 180 <= i <= 260:
        print(f"{i:4d}: {l}")
PY

echo
echo "=== locate jobs and relevant if conditions ==="
rg -n "^(jobs:|  [A-Za-z0-9_-]+:|      if: |      - name: )" "$file"

Repository: osac-project/osac-installer

Length of output: 3953


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
p = Path(".github/workflows/publish-charts.yaml")
lines = p.read_text().splitlines()
for i,l in enumerate(lines,1):
    if 1 <= i <= 180:
        print(f"{i:4d}: {l}")
PY

Repository: osac-project/osac-installer

Length of output: 9371


Gate the release step on publish success
always() lets this run after a failed build, package, or push, so the workflow can still create/edit a GitHub Release for a chart that never reached GHCR. Use if: success() here instead.

🤖 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 212 - 224, The Create
GitHub Release step in publish-charts is currently gated with always(), which
allows it to run after earlier failures; change the step condition to require
overall success so it only executes when the publish flow has completed
successfully. Update the if expression on the Create GitHub Release step to use
success() instead of always(), keeping the existing versions step check intact.

248-254: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Prefer env vars over inline ${{ }} expansion in run: scripts.

${{ github.repository }} is expanded directly into the shell script twice here rather than passed via env:, which zizmor flags as a template-injection pattern (expression text is substituted into the script before the shell parses it). github.repository itself isn't attacker-controllable, but following the safer pattern (already used for VERSION in this same step) avoids setting a bad precedent for later edits that might interpolate less-trusted values.

🔧 Proposed fix
       env:
         GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         VERSION: ${{ steps.versions.outputs.version }}
+        REPO: ${{ github.repository }}
         ...
       run: |
         ...
         gh release create "v${VERSION}" \
-          --repo "${{ github.repository }}" \
+          --repo "${REPO}" \
           --title "OSAC v${VERSION}" \
           --notes-file "$BODY" \
         || gh release edit "v${VERSION}" \
-          --repo "${{ github.repository }}" \
+          --repo "${REPO}" \
           --notes-file "$BODY"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      env:
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        VERSION: ${{ steps.versions.outputs.version }}
        REPO: ${{ github.repository }}
      run: |
        gh release create "v${VERSION}" \
          --repo "${REPO}" \
          --title "OSAC v${VERSION}" \
          --notes-file "$BODY" \
        || gh release edit "v${VERSION}" \
          --repo "${REPO}" \
          --notes-file "$BODY"
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 249-249: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 249-249: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 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 248 - 254, The release
step in publish-charts.yaml is interpolating github.repository directly inside
the run script; move that value into env variables like VERSION is already done,
then reference the env variable in both gh release create and gh release edit
inside the release creation step. Keep the fix local to the step that uses gh
release create/edit so the shell script no longer contains inline ${{
github.repository }} expansion.

Source: Linters/SAST tools

charts/osac/Chart.yaml (1)

24-37: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== Chart.yaml ==\n'
cat -n charts/osac/Chart.yaml | sed -n '1,120p'

printf '\n== publish-charts workflow files ==\n'
fd -a 'publish-charts.yaml' .github . || true
fd -a 'publish-charts.yml' .github . || true

printf '\n== Search for version resolution / semver validation ==\n'
rg -n --hidden -S 'Resolve versions|Invalid semver|bmf_crds_version|bmf_version|ui_version|Chart\.yaml|>=0\.0\.0' .github charts -g '!**/node_modules/**'

Repository: osac-project/osac-installer

Length of output: 5893


🏁 Script executed:

#!/bin/bash
set -euo pipefail

cat -n .github/workflows/publish-charts.yaml | sed -n '55,140p'

Repository: osac-project/osac-installer

Length of output: 4707


Pin the remaining chart versions before release

publish-charts.yaml reads bare-metal-fulfillment-operator-crds, bare-metal-fulfillment-operator, and osac-ui from charts/osac/Chart.yaml on tag pushes, then validates every dependency against a strict semver regex. With ">=0.0.0" still in this file, the release job will fail on those entries and block chart publishing.

🤖 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 `@charts/osac/Chart.yaml` around lines 24 - 37, The remaining dependencies in
Chart.yaml are still using open-ended version constraints, which will fail the
release job’s strict semver validation. Update the version fields for
bare-metal-fulfillment-operator-crds, bare-metal-fulfillment-operator, and
osac-ui to pinned release versions that match the published charts, keeping the
existing aliases and conditions intact. Use the dependency entries in the osac
chart manifest to locate and adjust these values before publish-charts.yaml
runs.

@openshift-ci

openshift-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown

@eliorerz: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-vmaas 36eb4e7 link true /test e2e-vmaas

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

…read-versions-from-chart-yaml

# Conflicts:
#	.github/workflows/publish-charts.yaml
#	scripts/setup.sh

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
.github/workflows/integration-tests.yml (2)

40-45: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Same Chart.yaml-rewrite snippet is duplicated across scripts/setup.sh, this workflow, and (per stack context) helm-lint.yaml.

Consider extracting the yq -i '(.dependencies[].version) = "0.0.0"' charts/osac/Chart.yaml patch into a single shared script (e.g. scripts/patch-chart-deps.sh) invoked from all three call sites. The build vs update inconsistency flagged above is exactly the kind of drift this duplication invites.

🤖 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/integration-tests.yml around lines 40 - 45, Extract the
duplicated Chart.yaml dependency-version rewrite into a shared script, such as
scripts/patch-chart-deps.sh, and update the setup script plus the
integration-test and helm-lint workflows to invoke it. Keep the existing yq
behavior centralized and ensure each call site uses the same patch before its
Helm dependency operation.

1-45: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Workflow lacks an explicit permissions: block.

Static analysis flags default (broad) GITHUB_TOKEN permissions for this workflow. As per path instructions, CI/CD workflows should follow "Least privilege: minimize GITHUB_TOKEN permissions." Add an explicit top-level or job-level permissions: block scoped to only what's needed (likely contents: read for an integration-test job).

🤖 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/integration-tests.yml around lines 1 - 45, Add an explicit
least-privilege permissions block to the integration-test workflow, preferably
at the job level for integration-test, granting only contents: read required by
checkout and submodule access. Do not grant broader token permissions.

Sources: Path instructions, Linters/SAST tools

scripts/setup.sh (1)

31-36: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Initialize DEPLOY_MODE before the nounset check

DEPLOY_MODE is referenced here without a default, so set -o nounset will abort ./scripts/setup.sh for the documented invocation unless the caller exports it explicitly. Default it up front (for example, DEPLOY_MODE=${DEPLOY_MODE:-"helm"}) or make the script tolerate an unset value.

🤖 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 `@scripts/setup.sh` around lines 31 - 36, Initialize DEPLOY_MODE before the
Helm-mode check so set -o nounset cannot abort when callers omit it. Use the
script’s documented default, preserving explicitly provided values, then keep
the existing yq validation in the DEPLOY_MODE conditional unchanged.

Source: Coding guidelines

🤖 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.

Outside diff comments:
In @.github/workflows/integration-tests.yml:
- Around line 40-45: Extract the duplicated Chart.yaml dependency-version
rewrite into a shared script, such as scripts/patch-chart-deps.sh, and update
the setup script plus the integration-test and helm-lint workflows to invoke it.
Keep the existing yq behavior centralized and ensure each call site uses the
same patch before its Helm dependency operation.
- Around line 1-45: Add an explicit least-privilege permissions block to the
integration-test workflow, preferably at the job level for integration-test,
granting only contents: read required by checkout and submodule access. Do not
grant broader token permissions.

In `@scripts/setup.sh`:
- Around line 31-36: Initialize DEPLOY_MODE before the Helm-mode check so set -o
nounset cannot abort when callers omit it. Use the script’s documented default,
preserving explicitly provided values, then keep the existing yq validation in
the DEPLOY_MODE conditional unchanged.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 091b0f4a-5b7a-4d2e-935b-288a4b938265

📥 Commits

Reviewing files that changed from the base of the PR and between 36eb4e7 and d2eada4.

📒 Files selected for processing (3)
  • .github/workflows/integration-tests.yml
  • .github/workflows/publish-charts.yaml
  • scripts/setup.sh

@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

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 kubernetes-sigs/prow repository.

@eliorerz eliorerz closed this Jul 21, 2026
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