ci: install Claude Code plugins in hypershift agent workflows#80294
ci: install Claude Code plugins in hypershift agent workflows#80294enxebre wants to merge 1 commit into
Conversation
Add plugin install commands for ai-helpers utils, golang, and enxebre/ai-scripts git plugin to both the review-agent and jira-agent process steps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WalkthroughTwo HyperShift agent scripts are updated to add prerequisite tool installations. The Jira agent and review agent scripts now install Go language tooling (gopls), Python pre-commit, and Claude Code plugins before executing their respective workflows. ChangesTool and Plugin Setup for HyperShift Agents
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre 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 |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
There was a problem hiding this comment.
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
`@ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.sh`:
- Around line 36-48: Pin all tool and plugin versions to ensure deterministic
CI: replace the floating gopls@latest in the go install call with a specific
module version (e.g., gopls@vX.Y.Z), change pip install pre-commit to pip
install pre-commit==X.Y.Z, and update each claude plugin marketplace add /
claude plugin install invocation to include explicit version identifiers using
the correct claude CLI syntax (e.g., repo@version or --version) for
openshift-eng/ai-helpers, utils@ai-helpers, golang@ai-helpers,
enxebre/ai-scripts and git@enxebre so the install lines in the script are
deterministic and reproducible.
In
`@ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh`:
- Around line 9-21: Pin all tool versions instead of using floating tags: change
the go install invocation that currently uses gopls@latest to a specific
validated version (replace gopls@latest), pin pip install pre-commit to a
specific release (e.g., pre-commit==X.Y.Z), and include explicit version
arguments when adding/installing Claude plugins (replace the marketplace
add/install calls for openshift-eng/ai-helpers, utils@ai-helpers,
golang@ai-helpers, enxebre/ai-scripts, and git@enxebre with the correct CLI
syntax and concrete versions per the claude plugin install --help), leaving the
PATH export unchanged; ensure you use the correct flag (e.g., --version or the
CLI-supported mechanism) for each claude command and document the chosen
versions in the script comment.
🪄 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: 4b7560e1-d888-4cbe-86a0-dd17c7aa08a4
📒 Files selected for processing (2)
ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.shci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh
| # Install tool dependencies | ||
| echo "Installing tool dependencies..." | ||
| go install golang.org/x/tools/gopls@latest | ||
| export PATH="${GOPATH:-$HOME/go}/bin:$PATH" | ||
| pip install pre-commit | ||
|
|
||
| # Install plugins | ||
| echo "Installing Claude Code plugins..." | ||
| claude plugin marketplace add openshift-eng/ai-helpers | ||
| claude plugin install utils@ai-helpers | ||
| claude plugin install golang@ai-helpers | ||
| claude plugin marketplace add enxebre/ai-scripts | ||
| claude plugin install git@enxebre |
There was a problem hiding this comment.
Pin versions for all installed dependencies.
Installing gopls@latest, pre-commit without a version specifier, and Claude plugins without explicit versions creates non-deterministic CI behavior. If any of these tools release breaking changes, the CI job will fail unpredictably. For reproducible builds, pin all tool versions:
🔒 Proposed fix to pin dependency versions
# Install tool dependencies
echo "Installing tool dependencies..."
-go install golang.org/x/tools/gopls@latest
+go install golang.org/x/tools/gopls@v0.16.1
export PATH="${GOPATH:-$HOME/go}/bin:$PATH"
-pip install pre-commit
+pip install pre-commit==3.8.0
# Install plugins
echo "Installing Claude Code plugins..."
claude plugin marketplace add openshift-eng/ai-helpers
-claude plugin install utils@ai-helpers
-claude plugin install golang@ai-helpers
+claude plugin install utils@ai-helpers --version v1.0.0
+claude plugin install golang@ai-helpers --version v1.0.0
claude plugin marketplace add enxebre/ai-scripts
-claude plugin install git@enxebre
+claude plugin install git@enxebre --version v1.0.0Note: Replace the example version numbers with the current stable versions that have been validated. Check the actual claude plugin install CLI syntax for version specification—the --version flag shown above is illustrative; consult claude plugin install --help for the correct syntax.
🤖 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
`@ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.sh`
around lines 36 - 48, Pin all tool and plugin versions to ensure deterministic
CI: replace the floating gopls@latest in the go install call with a specific
module version (e.g., gopls@vX.Y.Z), change pip install pre-commit to pip
install pre-commit==X.Y.Z, and update each claude plugin marketplace add /
claude plugin install invocation to include explicit version identifiers using
the correct claude CLI syntax (e.g., repo@version or --version) for
openshift-eng/ai-helpers, utils@ai-helpers, golang@ai-helpers,
enxebre/ai-scripts and git@enxebre so the install lines in the script are
deterministic and reproducible.
| # Install tool dependencies | ||
| echo "Installing tool dependencies..." | ||
| go install golang.org/x/tools/gopls@latest | ||
| export PATH="${GOPATH:-$HOME/go}/bin:$PATH" | ||
| pip install pre-commit | ||
|
|
||
| # Install plugins | ||
| echo "Installing Claude Code plugins..." | ||
| claude plugin marketplace add openshift-eng/ai-helpers | ||
| claude plugin install utils@ai-helpers | ||
| claude plugin install golang@ai-helpers | ||
| claude plugin marketplace add enxebre/ai-scripts | ||
| claude plugin install git@enxebre |
There was a problem hiding this comment.
Pin versions for all installed dependencies.
Installing gopls@latest, pre-commit without a version specifier, and Claude plugins without explicit versions creates non-deterministic CI behavior. If any of these tools release breaking changes, the CI job will fail unpredictably. For reproducible builds, pin all tool versions:
🔒 Proposed fix to pin dependency versions
# Install tool dependencies
echo "Installing tool dependencies..."
-go install golang.org/x/tools/gopls@latest
+go install golang.org/x/tools/gopls@v0.16.1
export PATH="${GOPATH:-$HOME/go}/bin:$PATH"
-pip install pre-commit
+pip install pre-commit==3.8.0
# Install plugins
echo "Installing Claude Code plugins..."
claude plugin marketplace add openshift-eng/ai-helpers
-claude plugin install utils@ai-helpers
-claude plugin install golang@ai-helpers
+claude plugin install utils@ai-helpers --version v1.0.0
+claude plugin install golang@ai-helpers --version v1.0.0
claude plugin marketplace add enxebre/ai-scripts
-claude plugin install git@enxebre
+claude plugin install git@enxebre --version v1.0.0Note: Replace the example version numbers with the current stable versions that have been validated. Check the actual claude plugin install CLI syntax for version specification—the --version flag shown above is illustrative; consult claude plugin install --help for the correct syntax.
🤖 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
`@ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh`
around lines 9 - 21, Pin all tool versions instead of using floating tags:
change the go install invocation that currently uses gopls@latest to a specific
validated version (replace gopls@latest), pin pip install pre-commit to a
specific release (e.g., pre-commit==X.Y.Z), and include explicit version
arguments when adding/installing Claude plugins (replace the marketplace
add/install calls for openshift-eng/ai-helpers, utils@ai-helpers,
golang@ai-helpers, enxebre/ai-scripts, and git@enxebre with the correct CLI
syntax and concrete versions per the claude plugin install --help), leaving the
PATH export unchanged; ensure you use the correct flag (e.g., --version or the
CLI-supported mechanism) for each claude command and document the chosen
versions in the script comment.
|
/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-jira-agent |
|
@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@enxebre: The following test failed, say
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 plugin install commands for ai-helpers utils, golang, and enxebre/ai-scripts git plugin to both the review-agent and jira-agent process steps.
Summary by CodeRabbit
This PR adds tool and plugin installation steps to the HyperShift CI agent workflows. The changes enhance two critical agent scripts in the OpenShift CI infrastructure that handle automated issue and pull request processing:
Modified Files:
ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.shci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.shChanges:
Both scripts now include initialization steps that install additional dependencies before their main processing logic:
gopls(Go language server) viago install golang.org/x/tools/gopls@latestwith appropriate PATH updatespre-commitframework viapipclaude pluginCLI:ai-helpersutilities plugingolangplugin for Go language supportenxebre/ai-scriptsgit plugin for custom scripting capabilitiesThese installations ensure that the jira-agent and review-agent have access to code analysis tools, language servers, and custom automation scripts needed for their CI tasks.
Impact:
The changes enable the HyperShift CI agents to leverage Go-specific code analysis (via gopls), automated code style checking (via pre-commit), and custom OpenShift automation scripts (via Claude plugins), improving the quality and automation of issue resolution and code review workflows in the HyperShift CI infrastructure.
(+14/-0 per file, Medium code review effort)