Skip to content

NO-JIRA: replace container image with workflow-step plugin setup - #8611

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
bryan-cox:test-arc-runners
May 27, 2026
Merged

NO-JIRA: replace container image with workflow-step plugin setup#8611
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
bryan-cox:test-arc-runners

Conversation

@bryan-cox

@bryan-cox bryan-cox commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove container: block from Claude WIF test workflow — ARC runners don't support container mode without anyuid SCC and a long-running entrypoint
  • Install Claude Code and clone ai-helpers repo directly in workflow steps
  • Set up plugin config (settings.json, known_marketplaces.json) pointing at the cloned ai-helpers path

Test plan

  • Merge to main (issue_comment runs from default branch)
  • Post /test-wif on any PR to trigger the workflow
  • Verify Claude invokes the hello-world plugin successfully

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated CI workflow to run directly on the runner instead of a job-level container.
    • Added a test setup step that installs AI-helper plugins and configures the test environment to enable the hello-world, jira, and ci plugins and point marketplace sources for testing.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

  • Remove container: block from Claude WIF test workflow — ARC runners don't support container mode without anyuid SCC and a long-running entrypoint
  • Install Claude Code and clone ai-helpers repo directly in workflow steps
  • Set up plugin config (settings.json, known_marketplaces.json) pointing at the cloned ai-helpers path

Test plan

  • Merge to main (issue_comment runs from default branch)
  • Post /test-wif on any PR to trigger the workflow
  • Verify Claude invokes the hello-world plugin successfully

🤖 Generated with Claude Code

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.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 3c7df1b1-9403-401e-9afc-e618a031cbd5

📥 Commits

Reviewing files that changed from the base of the PR and between 212495a and 9dda6ec.

📒 Files selected for processing (1)
  • .github/workflows/claude-wif-test.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/claude-wif-test.yaml

📝 Walkthrough

Walkthrough

This PR modifies the Claude Code WIF authentication test workflow by removing the job-level container image so the test-wif job runs on the arc-runner-set runner, and adds a "Set up ai-helpers plugins" step that clones openshift-eng/ai-helpers into /tmp/ai-helpers and writes Claude configuration files under $HOME/.claude/ to enable selected ai-helpers plugins before running the Claude Code test.

Possibly related PRs

  • openshift/hypershift#8598: Also modifies .github/workflows/claude-wif-test.yaml, changing how the test-wif workflow is configured for ARC/Claude Code.
  • openshift/hypershift#8600: Also updates Claude configuration under $HOME/.claude/ for the workflow; related to HOME handling and config file setup.
  • openshift/hypershift#8609: Alters how ai-helpers/Claude Code are provided in the test-wif job; closely related to provisioning and setup approach.

Suggested reviewers

  • cblecker
  • muraee

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Stable And Deterministic Test Names ❌ Error PR adds Ginkgo test with dynamic name using fmt.Sprintf in test/envtest/generator.go: It(fmt.Sprintf("should install all CRDs for feature set %q", featureSet)...). Replace fmt.Sprintf with static test name; move featureSet variable logic into test body, not title.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: replacing a container image approach with workflow-step plugin setup in the Claude WIF test workflow.
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.
Test Structure And Quality ✅ Passed This PR modifies GitHub Actions workflows and configuration files, not Ginkgo test code. The custom check for Ginkgo test quality is not applicable to this PR.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only a GitHub Actions workflow file, not deployment manifests, operator code, or controllers. The topology-aware scheduling check does not apply to workflow configurations.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR modifies .github/workflows/claude-wif-test.yaml, a GitHub Actions workflow file, not Ginkgo e2e tests. No new test code with IPv4 or external connectivity assumptions added.
No-Weak-Crypto ✅ Passed PR modifies only a GitHub workflow file with steps for cloning a repo and writing JSON configuration; no weak cryptography, custom crypto implementations, or insecure comparisons detected.
Container-Privileges ✅ Passed PR removes container directive and adds only standard workflow steps. No privileged settings or K8s container configurations introduced.
No-Sensitive-Data-In-Logs ✅ Passed Workflow properly handles sensitive data: github.token uses silent curl with file redirection, only public fields echoed, all env vars are non-sensitive project IDs/paths/flags.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
openshift-ci Bot requested review from cblecker and csrwng May 27, 2026 19:59
@openshift-ci

openshift-ci Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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

The container: directive requires containerMode on ARC runners which
needs anyuid SCC and a long-running process. Replace it by installing
Claude and cloning ai-helpers directly in workflow steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 27, 2026
Comment on lines +54 to +60
- name: Set up ai-helpers plugins
run: |
git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git /tmp/ai-helpers
mkdir -p "$HOME/.claude/plugins"
printf '%s\n' '{"enabledPlugins":{"hello-world@ai-helpers":true,"jira@ai-helpers":true,"ci@ai-helpers":true}}' > "$HOME/.claude/settings.json"
printf '%s\n' '{"ai-helpers":{"source":{"source":"directory","path":"/tmp/ai-helpers"},"installLocation":"/tmp/ai-helpers","lastUpdated":"2025-10-27T12:00:00.000Z"}}' > "$HOME/.claude/plugins/known_marketplaces.json"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we use the claude cli command for this?

Suggested change
- name: Set up ai-helpers plugins
run: |
git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git /tmp/ai-helpers
mkdir -p "$HOME/.claude/plugins"
printf '%s\n' '{"enabledPlugins":{"hello-world@ai-helpers":true,"jira@ai-helpers":true,"ci@ai-helpers":true}}' > "$HOME/.claude/settings.json"
printf '%s\n' '{"ai-helpers":{"source":{"source":"directory","path":"/tmp/ai-helpers"},"installLocation":"/tmp/ai-helpers","lastUpdated":"2025-10-27T12:00:00.000Z"}}' > "$HOME/.claude/plugins/known_marketplaces.json"
- name: Set up ai-helpers plugins
run: |
claude plugin marketplace add openshift-eng/ai-helpers
claude plugin install hello-world@ai-helpers
claude plugin install jira@ai-helpers
claude plugin install ci@ai-helpers

@csrwng csrwng added the area/ai Indicates the PR includes changes related to AI - Claude agents, Cursor rules, etc. label May 27, 2026
@csrwng csrwng added lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria labels May 27, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

No second-stage tests were triggered for this PR.

This can happen when:

  • The changed files don't match any pipeline_run_if_changed patterns
  • All files match pipeline_skip_if_only_changed patterns
  • No pipeline-controlled jobs are defined for the main branch

Use /test ? to see all available tests.

@coderabbitai coderabbitai Bot left a comment

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.

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 @.github/workflows/claude-wif-test.yaml:
- Line 56: The workflow currently clones openshift-eng/ai-helpers without
pinning to an immutable revision; add an input/env variable AI_HELPERS_SHA,
clone the repo into /tmp/ai-helpers, then explicitly fetch and checkout that SHA
(use git fetch + git checkout of AI_HELPERS_SHA or clone the specific commit)
before any plugin setup or usage; ensure the workflow errors if AI_HELPERS_SHA
is unset or the checkout fails so CI never runs against an unpinned tip.
🪄 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: 8abe3238-e1c0-4f19-9a59-433a699b341d

📥 Commits

Reviewing files that changed from the base of the PR and between 9142d96 and 212495a.

📒 Files selected for processing (1)
  • .github/workflows/claude-wif-test.yaml


- name: Set up ai-helpers plugins
run: |
git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git /tmp/ai-helpers

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== clone command =="
rg -n -C2 'git clone .*openshift-eng/ai-helpers' .github/workflows/claude-wif-test.yaml

echo
echo "== pinning evidence (should match after fix) =="
rg -n -C2 'AI_HELPERS_SHA|git -C /tmp/ai-helpers (fetch|checkout).*' .github/workflows/claude-wif-test.yaml || true

Repository: openshift/hypershift

Length of output: 493


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== clone command =="
rg -n -C2 'git clone .*openshift-eng/ai-helpers' .github/workflows/claude-wif-test.yaml

echo
echo "== pinning evidence (should match after fix) =="
rg -n -C2 'AI_HELPERS_SHA|git -C /tmp/ai-helpers (fetch|checkout).*' .github/workflows/claude-wif-test.yaml || true

Repository: openshift/hypershift

Length of output: 493


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== clone command =="
rg -n -C2 'git clone .*openshift-eng/ai-helpers' .github/workflows/claude-wif-test.yaml

echo
echo "== pinning evidence (should match after fix) =="
rg -n -C2 'AI_HELPERS_SHA|git -C /tmp/ai-helpers (fetch|checkout).*' .github/workflows/claude-wif-test.yaml || true

Repository: openshift/hypershift

Length of output: 493


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== clone command =="
rg -n -C2 'git clone .*openshift-eng/ai-helpers' .github/workflows/claude-wif-test.yaml

echo
echo "== pinning evidence (should match after fix) =="
rg -n -C2 'AI_HELPERS_SHA|git -C /tmp/ai-helpers (fetch|checkout).*' .github/workflows/claude-wif-test.yaml || true

Repository: openshift/hypershift

Length of output: 493


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== clone command =="
rg -n -C2 'git clone .*openshift-eng/ai-helpers' .github/workflows/claude-wif-test.yaml

echo
echo "== pinning evidence (should match after fix) =="
rg -n -C2 'AI_HELPERS_SHA|git -C /tmp/ai-helpers (fetch|checkout).*' .github/workflows/claude-wif-test.yaml || true

Repository: openshift/hypershift

Length of output: 493


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== clone command =="
rg -n -C2 'git clone .*openshift-eng/ai-helpers' .github/workflows/claude-wif-test.yaml

echo
echo "== pinning evidence (should match after fix) =="
rg -n -C2 'AI_HELPERS_SHA|git -C /tmp/ai-helpers (fetch|checkout).*' .github/workflows/claude-wif-test.yaml || true

Repository: openshift/hypershift

Length of output: 493


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C2 'git clone .*openshift-eng/ai-helpers' .github/workflows/claude-wif-test.yaml
rg -n -C2 'AI_HELPERS_SHA|git -C /tmp/ai-helpers (fetch|checkout).*' .github/workflows/claude-wif-test.yaml || true

Repository: openshift/hypershift

Length of output: 424


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== clone command =="
rg -n -C2 'git clone .*openshift-eng/ai-helpers' .github/workflows/claude-wif-test.yaml

echo
echo "== pinning evidence (should match after fix) =="
rg -n -C2 'AI_HELPERS_SHA|git -C /tmp/ai-helpers (fetch|checkout).*' .github/workflows/claude-wif-test.yaml || true

Repository: openshift/hypershift

Length of output: 493


Pin openshift-eng/ai-helpers to an immutable commit SHA before using it in CI (line 56)

.github/workflows/claude-wif-test.yaml clones https://github.com/openshift-eng/ai-helpers.git at runtime (--depth 1) without any commit SHA pinning, and there is no subsequent fetch/checkout to an immutable revision before plugin setup. Pin to a reviewed commit SHA (e.g., via an AI_HELPERS_SHA variable) and fetch+checkout that SHA.

🔒 Suggested hardening diff
       - name: Set up ai-helpers plugins
         run: |
-          git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git /tmp/ai-helpers
+          AI_HELPERS_SHA="REPLACE_WITH_REVIEWED_COMMIT_SHA"
+          git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git /tmp/ai-helpers
+          git -C /tmp/ai-helpers fetch --depth 1 origin "$AI_HELPERS_SHA"
+          git -C /tmp/ai-helpers checkout --detach "$AI_HELPERS_SHA"
           mkdir -p "$HOME/.claude/plugins"
           cat > "$HOME/.claude/settings.json" << 'SETTINGS'
🤖 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/claude-wif-test.yaml at line 56, The workflow currently
clones openshift-eng/ai-helpers without pinning to an immutable revision; add an
input/env variable AI_HELPERS_SHA, clone the repo into /tmp/ai-helpers, then
explicitly fetch and checkout that SHA (use git fetch + git checkout of
AI_HELPERS_SHA or clone the specific commit) before any plugin setup or usage;
ensure the workflow errors if AI_HELPERS_SHA is unset or the checkout fails so
CI never runs against an unpinned tip.

@openshift-ci

openshift-ci Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: all tests passed!

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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 0aa20fc into openshift:main May 27, 2026
18 checks passed
@bryan-cox

Copy link
Copy Markdown
Member Author

/test-wif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ai Indicates the PR includes changes related to AI - Claude agents, Cursor rules, etc. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants