Skip to content

Map OKD stream names to canonical types for autodl JSON - #82266

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
pskrbasu:fix-okd-stream-type-mapping
Jul 23, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
pskrbasu:fix-okd-stream-type-mapping

Conversation

@pskrbasu

@pskrbasu pskrbasu commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds STREAM_TYPE mapping to convert OKD stream names to canonical BigQuery values (nightly / ci)
  • OKD streams use names like okd-scos-nightly and okd-scos, but the autodl JSON schema requires canonical nightly or ci
  • OCP streams already produce canonical values and are unaffected (pass-through via wildcard case)

Why this is needed

The payload agent job for OKD SCOS (#80392, #81940) runs successfully but fails validation at the end. The autodl JSON validator rejects stream: "okd-scos-nightly" because it only accepts "nightly" or "ci". See the failed run: Prow logs

FAIL: 1 error(s)
  - rows[0] invalid stream 'okd-scos-nightly' (must be 'ci' or 'nightly')

This fixes the generate_accepted_autodl() function in the shell script (accepted payload path). For rejected payloads, Claude generates the autodl JSON independently — the companion PR openshift-eng/ai-helpers#636 updates the SKILL.md docs so Claude applies the same mapping.

Companion PR

What changed

Added a case statement after STREAM extraction that maps OKD stream names to canonical types:

  • okd-scos-nightlynightly
  • okd-scosci
  • All other values (OCP) pass through unchanged

Backward compatibility

OCP payloads produce STREAM=nightly or STREAM=ci, which hit the *) wildcard and pass through as-is. No change in behavior for OCP.

Summary by CodeRabbit

Updates the OpenShift CI infrastructure used for Claude’s accepted-payload generation. The openshift-claude-payload-agent-commands.sh script now normalizes OKD stream identifiers extracted from payload tags to match the autodl JSON schema:

  • okd-scos-nightlynightly
  • okd-scosci
  • any other stream value → unchanged

This avoids autodl validation failures caused by OKD stream names, while leaving existing OCP behavior unchanged.

@coderabbitai

coderabbitai Bot commented Jul 22, 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: 0e320a73-d1f8-4788-85c3-a8e0b15d1f31

📥 Commits

Reviewing files that changed from the base of the PR and between d547cbd and db0808e.

📒 Files selected for processing (1)
  • ci-operator/step-registry/openshift/claude/payload/agent/openshift-claude-payload-agent-commands.sh

Walkthrough

The payload agent maps okd-scos-nightly to nightly and okd-scos to ci before accepted-payload autodl JSON generation, while preserving other stream values.

Changes

Canonical stream mapping

Layer / File(s) Summary
Canonicalize payload stream values
ci-operator/step-registry/openshift/claude/payload/agent/openshift-claude-payload-agent-commands.sh
Maps selected OKD stream identifiers to canonical values and passes the result to accepted-payload JSON generation.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: stbenjam, petr-muller

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: canonicalizing OKD stream names for autodl JSON.
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.
Stable And Deterministic Test Names ✅ Passed Only a shell script changed; no Ginkgo test titles were added or modified.
Test Structure And Quality ✅ Passed No Ginkgo test files were changed; the PR only updates a shell script, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests were added or modified; the PR only changes a shell script, so MicroShift test compatibility is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only changes a shell script mapping stream values.
Topology-Aware Scheduling Compatibility ✅ Passed Only a shell script changed; no manifests, controllers, or scheduling constraints were introduced.
Ote Binary Stdout Contract ✅ Passed PR only changes a ci-operator shell script; no OTE binary entrypoints or stdout-unsafe Go logging changes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only a shell script changed; no new Ginkgo e2e tests or network-sensitive test code were added.
No-Weak-Crypto ✅ Passed PASS: The changed shell script only remaps stream names; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons appear.
Container-Privileges ✅ Passed The PR only changes a shell script's stream mapping; no container/K8s manifests or privileged settings were added.
No-Sensitive-Data-In-Logs ✅ Passed Patch only remaps STREAM values; no new logging of secrets, tokens, PII, or internal hostnames was added.
✨ 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.

@Prashanth684

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-release-main-payload-agent-analyze

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@Prashanth684: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

# Canonical stream type for BigQuery autodl schema (must be "nightly" or "ci")
# OCP streams already use canonical names; OKD streams need mapping.
case "${STREAM}" in
okd-scos-nightly) STREAM_TYPE="nightly" ;;

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.

we could just reassign to STREAM rather than a new var

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.

Yes, makes sense. Made the changes @Prashanth684

@pskrbasu
pskrbasu force-pushed the fix-okd-stream-type-mapping branch from d547cbd to db0808e Compare July 22, 2026 16:35
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@pskrbasu: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-eng-ai-helpers-main-payload-agent openshift-eng/ai-helpers presubmit Registry content changed
periodic-ci-openshift-release-main-payload-agent-analyze N/A periodic Registry content changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@pskrbasu

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-openshift-release-main-payload-agent-analyze

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@pskrbasu: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@Prashanth684 Prashanth684 added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. rehearsals-ack Signifies that rehearsal jobs have been acknowledged labels Jul 23, 2026
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: pskrbasu

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

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@pskrbasu: 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 910ca78 into openshift:main Jul 23, 2026
11 checks passed
apahim pushed a commit to apahim/release that referenced this pull request Jul 24, 2026
mrniranjan pushed a commit to mrniranjan/release that referenced this pull request Jul 28, 2026
amp-rh pushed a commit to amp-rh/openshift-release that referenced this pull request Jul 29, 2026
amogh-redhat pushed a commit to amogh-redhat/release that referenced this pull request Aug 5, 2026
TimurMP pushed a commit to TimurMP/release that referenced this pull request Sep 5, 2026
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. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants