Repository navigation
OSAC-2162: Update create-caas to use --version instead of --release-image - #317
Conversation
…mage OSAC-2162 renamed the CLI's --release-image flag to --version, which takes a ClusterVersion identifier (e.g. "4.22.0") instead of an OCI image pullspec. Update the create-caas role and its variable to match. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Dan Manor <dmanor@redhat.com>
|
@danmanor: This pull request references OSAC-2162 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 story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danmanor The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
WalkthroughThe CaaS configuration now derives ChangesCaaS and workflow updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (10 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 `@infra/netris/inventory/group_vars/all.yml`:
- Around line 83-85: Normalize or validate ocp_version before deriving
caas_cluster_version so patch-qualified values such as 4.22.0 do not become
4.22.0.0. Update the caas_cluster_version configuration to append .0 only for a
major.minor value, while preserving the existing 4.22.0 result for the default.
🪄 Autofix
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: CHILL
Plan: Pro Plus
Run ID: 4cbf1889-9662-420d-8462-eefc6ffa1cbe
📒 Files selected for processing (2)
infra/netris/inventory/group_vars/all.ymlinfra/netris/roles/create-caas/tasks/main.yml
| # CaaS cluster version -- must match a ClusterVersion present in the | ||
| # deployed fulfillment-service (metadata.name or spec.version). | ||
| caas_cluster_version: "{{ ocp_version }}.0" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
rg -n -C 3 '\bocp_version\b' \
--glob '*.yml' --glob '*.yaml' --glob '*.j2' --glob '*.ini' --glob '*.sh' .Repository: osac-project/osac-test-infra
Length of output: 4839
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf 'Tracked files containing ocp_version/caas_cluster_version:\n'
git ls-files | xargs rg -l '\bocp_version\b|\bcaas_cluster_version\b' || true
printf '\nRelevant source snippets:\n'
for f in infra/netris/inventory/group_vars/all.yml infra/netris/playbooks/post-osac.yml infra/netris/roles/prep-osac/tasks/main.yml infra/netris/roles/discover-caas/templates/infraenv.yml.j2; do
if [ -f "$f" ]; then
echo "--- $f"
rg -n -C 3 '\bocp_version\b|\bcaas_cluster_version\b' "$f" || true
fi
done
printf '\nStatic verifier: if ocp_version already contains 3 dotted numeric components, the derived variable is 4 dotted numeric components.\n'
python3 - <<'PY'
import re
pats = ["4.22", "4.22.0"]
for v in pats:
derived = v + ".0"
segs = derived.split(".")
print(f"ocp_version={v!r} -> {derived!r}, numeric_segments={sum(bool(re.fullmatch(r'\\d+', s)) for s in segs)}")
print("Current tracked default:", "4.22")
PYRepository: osac-project/osac-test-infra
Length of output: 3660
Validate ocp_version before deriving caas_cluster_version.
The current inventory default is 4.22, so the derived 4.22.0 is valid. Any ocp_version override that already includes the patch, such as 4.22.0, produces 4.22.0.0. Add validation or normalize the value before appending .0.
🤖 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 `@infra/netris/inventory/group_vars/all.yml` around lines 83 - 85, Normalize or
validate ocp_version before deriving caas_cluster_version so patch-qualified
values such as 4.22.0 do not become 4.22.0.0. Update the caas_cluster_version
configuration to append .0 only for a major.minor value, while preserving the
existing 4.22.0 result for the default.
Remove the if-guard that skipped the job for fork PRs. The vmaas and bmaas callers already run for all PRs without this restriction. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Dan Manor <dmanor@redhat.com>
Based on observed timings from production runs, add timeout-minutes to each step that was missing one: Install prerequisites: 30m (observed ~10m) Deploy Netris lab: 45m (observed ~17m) Build and load components: 30m (observed ~13m) Deploy OSAC: 90m (already had this) Deploy OCP from snapshot: 60m (already had this) Setup CaaS hosts/catalog: 30m (observed ~7m) Deploy CaaS cluster: 90m (includes up to 60m wait for ready) Gather diagnostics: 10m each Cleanup DNS: 5m Prevents hung steps from burning the full 6h job timeout. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Dan Manor <dmanor@redhat.com>
Summary
osac create clusterCLI flag from--release-image(OCI pullspec) to--version(ClusterVersion identifier like4.22.0)create-caasrole still used--release-image, causing the CaaS Netris E2E workflow to fail withError: unknown flag: --release-imagecaas_release_image(full image URL) tocaas_cluster_version(version string) to matchFixes the failure in osac-project/osac#110: https://github.com/osac-project/osac/actions/runs/30980298429/job/92224031785
Test plan
osac create cluster --version 4.22.0works against a deployed fulfillment-service🤖 Generated with Claude Code
Summary by CodeRabbit