mirror-gui: add catalog-sync ci-operator variant and daily promotion#79303
mirror-gui: add catalog-sync ci-operator variant and daily promotion#79303yakovbeder wants to merge 12 commits into
Conversation
Add openshift-mirror-gui-main__catalog-sync variant building mirror-gui-catalog-sync with Docker build-arg SYNC_CATALOGS=true for fresh operator catalog metadata. Regenerate presubmit/postsubmit jobs for the variant. Add a hand-maintained periodic promotion job (prowgen does not emit it); re-copy after prowgen. The default mirror-gui image tag is unchanged; the synced image is promoted as ocp/5.0:mirror-gui-catalog-sync to satisfy ci-operator duplicate-promotion checks. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a new OpenShift CI ChangesCatalog-Sync CI Job
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
/pj-rehearse max |
|
@aguidirh: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse max |
|
@yakovbeder: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
…odic sync+build Move the daily catalog refresh out of the Dockerfile and into a self-contained periodic Prow job that: 1. Mounts ci-pull-credentials for registry.redhat.io access 2. Runs sync-catalogs.sh in the checked-out workspace 3. Builds the image with buildah from the synced workspace 4. Pushes the single mirror-gui image with the push secret This avoids the oc-image-extract-inside-Dockerfile auth problem entirely, requires no manual cluster-side secret changes, and keeps local developer builds unchanged. - Delete the catalog-sync ci-operator variant config - Remove catalog-sync presubmit and postsubmit jobs - Rewrite the periodic job as a direct sync+buildah+push wrapper Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the previous catalog-sync variant (which tried oc image extract inside a Dockerfile RUN step) with a ci-operator test step that: - Runs from the built mirror-gui image (has oc, python3, jq, PyYAML) - Mounts ci-pull-credentials for registry.redhat.io auth - Executes sync-catalogs.sh and validates the output - Is rehearsable via pj-rehearse to prove sync works before merge Remove the periodic job for now; it will be re-added in a follow-up PR once the sync is confirmed working. Co-authored-by: Cursor <cursoragent@cursor.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yakovbeder 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 |
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
`@ci-operator/config/openshift/mirror-gui/openshift-mirror-gui-main__catalog-sync.yaml`:
- Around line 27-40: The verification block is fragile: add strict shell options
(set -euo pipefail) at the top of the commands, verify
/tmp/catalog-data/catalog-index.json exists and is readable before parsing, and
ensure CATALOG_COUNT is a numeric value returned by jq (e.g., validate jq output
or default to 0 on failure) so that the test fails on parse errors; specifically
update the script invoking sync-catalogs.sh and the subsequent lines that
compute CATALOG_COUNT to abort immediately on any error, treat
missing/non-numeric jq output as 0, and log an explicit error if CATALOG_COUNT <
1 (references: sync-catalogs.sh, /tmp/catalog-data/catalog-index.json,
CATALOG_COUNT, jq).
🪄 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 YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: a165433d-a0d8-490c-a147-057c07b860ec
⛔ Files ignored due to path filters (1)
ci-operator/jobs/openshift/mirror-gui/openshift-mirror-gui-main-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (1)
ci-operator/config/openshift/mirror-gui/openshift-mirror-gui-main__catalog-sync.yaml
Swap catalog-sync-catalog-sync-verify and catalog-sync-images to match prowgen expected order. Remove --target=[release:latest] from the catalog-sync-images presubmit (variant has no promotion). Co-authored-by: Cursor <cursoragent@cursor.com>
Add fail-fast shell options and safer jq parsing to prevent false passes when sync-catalogs.sh or catalog-index.json parsing fails. Addresses CodeRabbit review feedback. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@yakovbeder, Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
Co-authored-by: Cursor <cursoragent@cursor.com>
Switch from container shorthand to the steps test format so that the credentials stanza is recognized by the config metadata normalizer. Co-authored-by: Cursor <cursoragent@cursor.com>
Prowgen requires lease-server-credentials (boskos) and secret-dir mounts for steps-based tests with credentials. Match the expected generated output exactly. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/pj-rehearse max |
|
@yakovbeder: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
[REHEARSALNOTIFIER]
Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@yakovbeder: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Add openshift-mirror-gui-main__catalog-sync variant building mirror-gui-catalog-sync with Docker build-arg SYNC_CATALOGS=true for fresh operator catalog metadata.
Regenerate presubmit/postsubmit jobs for the variant. Add a hand-maintained periodic promotion job (prowgen does not emit it); re-copy after prowgen.
The default mirror-gui image tag is unchanged; the synced image is promoted as ocp/5.0:mirror-gui-catalog-sync to satisfy ci-operator duplicate-promotion checks.
This PR adds a rehearsable catalog-sync variant to OpenShift CI for the openshift/mirror-gui repository to build and verify an operator catalog image and promote the synced image into the ocp integration registry.
What changed (practical impact)
Adds a new ci-operator variant/config: ci-operator/config/openshift/mirror-gui/openshift-mirror-gui-main__catalog-sync.yaml. The variant:
Regenerated presubmits to include the catalog-sync variant and rehearsable contexts:
Notes and operational details
Files added/updated (high level)