WIP: push to operatorhub hive skill - #652
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: miyadav The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a ChangesOperatorHub publishing workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (9 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 10
🤖 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 `@plugins/olm/skills/push-to-operatorhub/SKILL.md`:
- Around line 250-254: Update the fenced block under “Created PRs” in the
push-to-operatorhub skill documentation to specify the text or markdown language
after its opening fence, while preserving the existing PR links and content.
- Around line 136-149: Update Step 1.6 to prompt for and initialize HIVE_REPO
before evaluating the directory and bundle-gen.sh checks. Ensure the clone
instruction assigns or establishes the chosen local path in HIVE_REPO, then run
the existing validation against that variable.
- Around line 185-188: Update the git workflow around the fetch, log, diff, and
checkout commands to discover and validate the repository’s intended remote
instead of hard-coding origin. Reuse the validated remote variable consistently
for fetching and all subsequent remote references, while preserving the existing
master-branch behavior.
- Around line 204-207: Update the remediation instructions near the git checkout
command to protect local changes to hack/bundle-gen.sh and hack/version2.sh:
first check whether the worktree and these files are clean, and require user
confirmation or preserve the files before recommending replacement. Keep the
existing update recommendation only after this safeguard.
- Around line 33-44: Update the Step 1.4b Quay login flow to support
Buildah-only environments, reusing the existing tool-detection logic and
authenticating with buildah when neither docker nor podman is available;
otherwise remove buildah from the prerequisites and related checks.
- Around line 230-235: Update the publication command in the push-to-operatorhub
skill to construct its arguments from the parsed skill flags: propagate
--dry-run to bundle-gen.sh when requested, and initialize HOLD from the --hold
argument before using ${HOLD:+--hold}. Ensure dry-run execution cannot publish
images or pull requests.
- Around line 105-115: Rename “Step 1.4c — Verify push access” and its output to
describe a read-access check, since the skopeo inspect command only validates
pull access. Update the wording to avoid claiming push permission verification,
while preserving the skopeo availability handling and existing inspection
behavior.
- Around line 296-301: Update the Pipeline Summary lookup command in the
push-to-operatorhub instructions to use the repository issues comments endpoint
with the PR number, rather than the pull-request review comments endpoint.
Preserve the existing jq extraction and “Pipeline Summary” filtering behavior.
- Around line 91-99: Update both the podman and docker login branches to pass
QUAY_BOT_TOKEN through --password-stdin instead of the -p command-line option,
while preserving the existing success and failure messages.
- Around line 63-69: Update Step 1.3’s GH_USER initialization to default from
the authenticated GitHub account using gh api user --jq .login, while preserving
GITHUB_USER as the explicit override. Keep the existing display and verification
prompts unchanged.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 51fec9b9-ec5c-4f11-878c-9503312e69af
📒 Files selected for processing (1)
plugins/olm/skills/push-to-operatorhub/SKILL.md
| ```bash | ||
| cd "$HIVE_REPO" | ||
| GITHUB_TOKEN="$GITHUB_TOKEN" ./hack/bundle-gen.sh \ | ||
| --github-user "$GH_USER" \ | ||
| --commit "$COMMIT_SHA" \ | ||
| ${HOLD:+--hold} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Propagate the documented flags to the publication command.
The final command never passes --dry-run, despite documenting it as a skill argument, and $HOLD is used without showing how it is initialized from --hold. Build the command from parsed flag state so requested dry runs cannot publish images or PRs accidentally.
Suggested command shape
GITHUB_TOKEN="$GITHUB_TOKEN" ./hack/bundle-gen.sh \
--github-user "$GH_USER" \
--commit "$COMMIT_SHA" \
+ ${DRY_RUN:+--dry-run} \
${HOLD:+--hold}📝 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.
| ```bash | |
| cd "$HIVE_REPO" | |
| GITHUB_TOKEN="$GITHUB_TOKEN" ./hack/bundle-gen.sh \ | |
| --github-user "$GH_USER" \ | |
| --commit "$COMMIT_SHA" \ | |
| ${HOLD:+--hold} |
🤖 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 `@plugins/olm/skills/push-to-operatorhub/SKILL.md` around lines 230 - 235,
Update the publication command in the push-to-operatorhub skill to construct its
arguments from the parsed skill flags: propagate --dry-run to bundle-gen.sh when
requested, and initialize HOLD from the --hold argument before using
${HOLD:+--hold}. Ensure dry-run execution cannot publish images or pull
requests.
|
Per discussion, we're going to try doing this via a fully automated konflux job instead. |
@2uasimojo @dlom @suhanime PTAL , I will try it locally and test with bot token, if it looks reasonable .
Adds a new push-to-operatorhub skill to the olm plugin that guides users through publishing a Hive operator release to both Kubernetes and Red Hat OpenShift OperatorHub repositories.
The skill follows the Hive SOP (https://github.com/openshift/hive-sops/blob/master/sop/PushToOperatorHub.md) and automates what it can while clearly identifying 6 manual steps that require human intervention
(token creation, secrets retrieval, SSO login, post-merge monitoring, escalation). It uses the shared Quay.io bot account for image pushes instead of requiring individual credentials.
The workflow is organized into 5 chronological phases:
Generated by claude
Summary by CodeRabbit