Skip to content

Add trigger-qe-tests Claude Code skill - #4322

Closed
rrasouli wants to merge 1 commit into
openshift:masterfrom
rrasouli:add-trigger-qe-tests-skill
Closed

Add trigger-qe-tests Claude Code skill#4322
rrasouli wants to merge 1 commit into
openshift:masterfrom
rrasouli:add-trigger-qe-tests-skill

Conversation

@rrasouli

@rrasouli rrasouli commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Adds a Claude Code slash command /trigger-qe-tests [version] that automates creating DEBUG PRs in openshift/release to trigger WMCO QE z-stream tests via /pj-rehearse.

The skill:

  • Accepts OCP (4.xx, 5.x) or WMCO (10.xx, 11.x) version numbers
  • Renames winc periodic job names to make Prow treat them as new jobs
  • Creates a non-draft PR in openshift/release (draft blocks pj-rehearse)
  • Triggers /pj-rehearse and reports job names

Reference: openshift/release#81646

Summary by CodeRabbit

  • New Features
    • Added instructions for triggering Windows Container QE Z-Stream tests through a temporary pull request workflow.
    • Supports selecting specific test jobs or running all available jobs for a chosen version.
    • Includes guidance for preparing the pull request and initiating test rehearsals.

@openshift-ci

openshift-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rrasouli
Once this PR has been reviewed and has the lgtm label, please assign jrvaldes for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 49d2351e-954b-41b5-ad9f-042e2ce70768

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a Claude command for triggering WMCO Windows Container QE Z-Stream tests. It validates and normalizes a release version, selects winc periodic jobs, creates a release repository worktree and branch, renames job aliases, regenerates manifests, and opens a temporary non-draft PR. After the rehearsal notifier comment, it posts /pj-rehearse or /pj-rehearse max and documents cleanup and non-merge requirements.

🚥 Pre-merge checks | ✅ 19 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Platform-Specific Requirements ⚠️ Warning The new command lists platform variants but omits the required vSphere, AWS, Azure, and GCP checks/limitations from repo guidance. Add a preflight section that documents and validates each platform-specific constraint (vSphere name limits, AWS EC2LaunchV2, Azure cloud-node-manager, GCP hostname script).
✅ Passed checks (19 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a new Claude Code skill for triggering QE tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Go Best Practices & Build Tags ✅ Passed Only a markdown Claude command was added; no Go sources or build tags were changed, so the Go best-practices/build-tags check is not applicable.
Security: Secrets, Ssh & Csr ✅ Passed This PR only adds a markdown Claude command; it contains no credential, SSH, or CSR handling paths to violate the check.
Kubernetes Controller Patterns ✅ Passed Docs-only markdown command; no Kubernetes controller code or reconciliation logic changed, so the controller-pattern check is not applicable.
Windows Service Management ✅ Passed PR only adds a Claude command doc for triggering WMCO QE tests; no service ordering, dependencies, cleanup, reboot, or SCM handling exists.
Stable And Deterministic Test Names ✅ Passed The only changed file is a markdown Claude command; no Ginkgo test declarations appear in the patch, so there are no test titles to evaluate.
Test Structure And Quality ✅ Passed PR only adds a Claude command markdown file; no Ginkgo test code or test patterns were changed.
Microshift Test Compatibility ✅ Passed The only changed file is a Claude command markdown doc; no Go/Ginkgo e2e tests were added, so MicroShift compatibility review is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only a markdown Claude command was added; no Go/e2e test code or Ginkgo specs changed, so SNO compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only a Claude command markdown file changed; no deployment manifests, operator code, or controllers were modified.
Ote Binary Stdout Contract ✅ Passed PR only adds a markdown Claude command; no Go/test binaries or process-level stdout code changed.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Documentation-only PR: the only changed file is a Claude command markdown, with no new Ginkgo e2e tests or network-facing test code.
No-Weak-Crypto ✅ Passed The new markdown command only documents PR automation; it contains no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB usage, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed Only a markdown Claude command was added; no container/K8s manifests or privilege settings were changed.
No-Sensitive-Data-In-Logs ✅ Passed The new command doc contains no password/token/PII logging; it only reports PR URLs and job names, which are not sensitive data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@rrasouli
rrasouli force-pushed the add-trigger-qe-tests-skill branch from bc67b47 to 564a9cc Compare July 13, 2026 18:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 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 @.claude/commands/trigger-qe-tests.md:
- Around line 48-53: Update both fenced code blocks in the command documentation
to declare the bash language, including the block showing the config path and
the block containing the grep command; leave their contents unchanged.
- Line 4: Constrain the tool permissions declared by the trigger-qe-tests
command, especially unrestricted Bash and Edit access, to the narrowest
supported scopes for its required operations. Update the workflow instructions
to require explicit user confirmation immediately before every external
mutation, including repository changes, pushes, pull requests, and Prow
commands.
- Around line 93-101: Update Step 5 to poll the specific PR for a
REHEARSALNOTIFIER comment at a defined interval until a bounded deadline; if the
deadline expires, fail clearly instead of continuing. Validate both the author
and presence of the expected rehearsal job list before posting /pj-rehearse, and
only report triggered jobs after a successful post.
- Around line 67-72: Update the release-repository workflow in the worktree
setup and related commands to verify the repository root and remote URLs before
any fetch, edit, or push; require the source checkout to be clean, create the
parent worktree directory, and abort when the target branch or worktree already
exists. Preserve existing resources unless explicit, verified confirmation
authorizes reuse or deletion, including the related sections at the referenced
command steps.
- Around line 73-78: The workflow around the worktree job renaming and `make
update` must make manifest regeneration a mandatory gate: require `make update`
to exit successfully, verify the resulting diff contains the selected `winc-fNN`
to `winc-zstream-fNN` renames, and abort before commit or PR creation if either
check fails. Apply the same validation to the related workflow section
referenced by the comment.
- Around line 19-33: Update the version-handling instructions to validate the
input before using it in paths, branch names, or commands: accept only supported
numeric OCP/WMCO forms, reject malformed or unsupported values, and derive
RELEASE and WMCO_VERSION from parsed components rather than string
interpolation. Require shell-quoting for every version expansion used in
generated commands, while preserving the existing OCP/WMCO mapping and prompt
behavior for missing input.
🪄 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: 22958147-7e7f-4223-89aa-8a602b058953

📥 Commits

Reviewing files that changed from the base of the PR and between d6aac66 and bc67b47.

📒 Files selected for processing (1)
  • .claude/commands/trigger-qe-tests.md

Comment thread .claude/commands/trigger-qe-tests.md Outdated
---
description: Create a DEBUG PR to trigger WMCO QE z-stream tests via /pj-rehearse
args: "[version]"
allowed-tools: Read, Edit, Bash, Grep, Glob, AskUserQuestion

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Constrain the command’s mutation authority.

Bash and Edit are granted without scope restrictions, while this command can fetch repositories, modify files, push branches, create PRs, and post Prow commands. For this high-risk .claude workflow, narrow tool scopes where supported and require explicit confirmation immediately before each external mutation.

🤖 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 @.claude/commands/trigger-qe-tests.md at line 4, Constrain the tool
permissions declared by the trigger-qe-tests command, especially unrestricted
Bash and Edit access, to the narrowest supported scopes for its required
operations. Update the workflow instructions to require explicit user
confirmation immediately before every external mutation, including repository
changes, pushes, pull requests, and Prow commands.

Source: Path instructions

Comment on lines +19 to +33
The version argument is required and must be an explicit release number (e.g., `5.0`, `4.21`, `4.20`, `10.21`, `11.0`).
If no version is provided, ask the user for one. Do not guess or resolve from branch names.

The user may pass either the OCP version or the WMCO version. The mapping is:
- WMCO `10.xx` = OCP `4.xx` (e.g., WMCO 10.20 = OCP 4.20)
- WMCO `11.x` = OCP `5.x` (e.g., WMCO 11.0 = OCP 5.0)

Normalize input to derive both versions:
- If user passes `10.xx` -> RELEASE=`4.xx`, WMCO_VERSION=`10.xx`
- If user passes `11.x` -> RELEASE=`5.x`, WMCO_VERSION=`11.x`
- If user passes `4.xx` -> RELEASE=`4.xx`, WMCO_VERSION=`10.xx`
- If user passes `5.x` -> RELEASE=`5.x`, WMCO_VERSION=`11.x`

Use `RELEASE` (OCP version) for config file paths and branch names.
Use `WMCO_VERSION` in the PR title and body.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Validate version before interpolating it into paths and commands.

The instructions require an “explicit release number” but define no validation step. Reject anything outside the supported numeric forms, derive the normalized versions from parsed components, and shell-quote every expansion; otherwise malformed input can select unintended files/worktrees or become command syntax when substituted into generated shell commands.

🤖 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 @.claude/commands/trigger-qe-tests.md around lines 19 - 33, Update the
version-handling instructions to validate the input before using it in paths,
branch names, or commands: accept only supported numeric OCP/WMCO forms, reject
malformed or unsupported values, and derive RELEASE and WMCO_VERSION from parsed
components rather than string interpolation. Require shell-quoting for every
version expansion used in generated commands, while preserving the existing
OCP/WMCO mapping and prompt behavior for missing input.

Source: Path instructions

Comment thread .claude/commands/trigger-qe-tests.md Outdated
Comment on lines +48 to +53
```
~/Documents/GitHub/release/ci-operator/config/openshift/openshift-tests-private/openshift-openshift-tests-private-release-{RELEASE}__amd64-nightly.yaml
```
2. Confirm it exists and contains `winc` jobs:
```bash
grep 'as:.*winc.*f[0-9]' <config-file>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add languages to both fenced code blocks.

This is reported by markdownlint MD040. Mark both fences as bash.

Proposed fix
-   ```
+   ```bash
...
-   ```
+   ```bash

Also applies to: 97-100

🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 48-48: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 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 @.claude/commands/trigger-qe-tests.md around lines 48 - 53, Update both
fenced code blocks in the command documentation to declare the bash language,
including the block showing the config path and the block containing the grep
command; leave their contents unchanged.

Source: Linters/SAST tools

Comment thread .claude/commands/trigger-qe-tests.md Outdated
Comment on lines +67 to +72
1. In the release repo, fetch upstream and create a worktree:
```bash
cd ~/Documents/GitHub/release
git fetch upstream
git worktree add ../worktrees/winc-zstream-{RELEASE} -b winc-zstream-{RELEASE} upstream/main
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Verify repository identity and state before fetching, editing, or pushing.

These commands assume the fixed path, upstream, origin, branch, and worktree are all correct. Check the repository root and remote URLs, require a clean source checkout, create the parent worktree directory, and abort if the branch or worktree already exists. Never interpret “ask before overwriting” as permission to delete or reuse an existing branch without an explicit, verified confirmation.

Also applies to: 83-90, 110-110

🤖 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 @.claude/commands/trigger-qe-tests.md around lines 67 - 72, Update the
release-repository workflow in the worktree setup and related commands to verify
the repository root and remote URLs before any fetch, edit, or push; require the
source checkout to be clean, create the parent worktree directory, and abort
when the target branch or worktree already exists. Preserve existing resources
unless explicit, verified confirmation authorizes reuse or deletion, including
the related sections at the referenced command steps.

Source: Path instructions

Comment thread .claude/commands/trigger-qe-tests.md Outdated
Comment on lines +73 to +78
2. In the worktree config file, for each selected job, rename the `as:` field:
- Pattern: `winc-fNN` -> `winc-zstream-fNN`
- Example: `aws-ipi-ovn-winc-f14` -> `aws-ipi-ovn-winc-zstream-f14`
- Only rename jobs that do NOT already contain `zstream`
3. Run `make update` to regenerate the Prow job files (ask user to run this).
4. Show the diff for review.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Make manifest regeneration a mandatory success gate.

make update produces the generated ci-operator/jobs/ files required by the PR, but the workflow only asks the user to run it and does not require a successful exit or verify that the expected generated file changed. Abort before commit/PR creation unless regeneration succeeds and the resulting diff contains the selected job renames.

Also applies to: 82-90

🤖 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 @.claude/commands/trigger-qe-tests.md around lines 73 - 78, The workflow
around the worktree job renaming and `make update` must make manifest
regeneration a mandatory gate: require `make update` to exit successfully,
verify the resulting diff contains the selected `winc-fNN` to `winc-zstream-fNN`
renames, and abort before commit or PR creation if either check fails. Apply the
same validation to the related workflow section referenced by the comment.

Comment thread .claude/commands/trigger-qe-tests.md Outdated
Comment on lines +93 to +101
### Step 5: Trigger rehearsals

1. Wait for the REHEARSALNOTIFIER bot comment (poll PR comments).
2. Once the rehearsal list appears, post:
```
/pj-rehearse
```
This triggers up to 5 rehearsals. If more than 5 jobs, use `/pj-rehearse max`.
3. Report the PR URL and triggered job names.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Bound notifier polling and fail closed.

“Wait” has no timeout, polling interval, or failure path, so the command can hang indefinitely. Poll the specific PR with a bounded deadline, verify the comment is from REHEARSALNOTIFIER, and only post /pj-rehearse once the expected job list is present.

🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 97-97: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 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 @.claude/commands/trigger-qe-tests.md around lines 93 - 101, Update Step 5 to
poll the specific PR for a REHEARSALNOTIFIER comment at a defined interval until
a bounded deadline; if the deadline expires, fail clearly instead of continuing.
Validate both the author and presence of the expected rehearsal job list before
posting /pj-rehearse, and only report triggered jobs after a successful post.

@rrasouli
rrasouli force-pushed the add-trigger-qe-tests-skill branch 2 times, most recently from 0f6fa13 to a7b48e6 Compare July 13, 2026 19:18

@jrvaldes jrvaldes 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.

@rrasouli thanks for proposing this.

I'd prefer to see a bash script under e.g. hack/trigger-qe-tests.sh that:

Uses the GitHub CLI (gh) for the PR/comment operations instead of hand-rolled shell snippets in a command manifest.

Lets the caller pass the path to their local openshift/release checkout as an argument or env var, falling back to cloning in a temp dir.

Validates the version, checks repo/remotes, renames the jobs, runs make update, creates the PR, and posts /pj-rehearse in one reproducible flow.

It's also much cheaper for the team, since it doesn't burn tokens on AI usage every time someone needs to trigger the QE jobs.

Comment thread .claude/commands/trigger-qe-tests.md Outdated

Show the diff and ask the user for explicit confirmation before committing, pushing, or creating the PR.
```bash
cd ~/Documents/GitHub/worktrees/winc-zstream-{RELEASE}

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.

assumes the openshift/release repo always lives at ~/Documents/GitHub/release. That path is specific to one person's laptop setup and won't work for anyone who keeps their repos elsewhere (e.g. ~/git/, ~/src/, /var/home/..., or a non-macOS layout).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jrvaldes Great catch!

@rrasouli
rrasouli force-pushed the add-trigger-qe-tests-skill branch from a7b48e6 to f638d76 Compare July 14, 2026 04:19
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@rrasouli: 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.

@rrasouli

Copy link
Copy Markdown
Contributor Author

/close in favor #4324 we will run hack script instead of Claude skill

1 similar comment
@rrasouli

Copy link
Copy Markdown
Contributor Author

/close in favor #4324 we will run hack script instead of Claude skill

@rrasouli rrasouli closed this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants