Skip to content

feat(tkn): add operator-channel param to infra-aws-ocp-snc task - #873

Merged
ppitonak merged 1 commit into
redhat-developer:mainfrom
amastbau:feat/tkn-operator-channel
Jul 30, 2026
Merged

feat(tkn): add operator-channel param to infra-aws-ocp-snc task#873
ppitonak merged 1 commit into
redhat-developer:mainfrom
amastbau:feat/tkn-operator-channel

Conversation

@amastbau

@amastbau amastbau commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Exposes the `--operator-channel` CLI flag (added in #806) as a Tekton task param so callers can override OLM subscription channels per operator without rebuilding the image.

Use case: pass `rhods-operator=stable-3.x` to install RHOAI 3.x instead of the default `stable` channel (RHOAI 2.25.x).

Changes

  • `tkn/infra-aws-ocp-snc.yaml` + `tkn/template/infra-aws-ocp-snc.yaml`: new `operator-channel` param (default empty = use mapt default channel). Comma-separated `package=channel` pairs each passed as `--operator-channel` to mapt. Input validated against `^[a-zA-Z0-9_-]+=[a-zA-Z0-9._-]+$` and shell-escaped before eval to prevent injection.
  • Fixed: `mapt aws ocp-snc` → `mapt aws openshift-snc` (current binary uses `openshift-snc`, alias not yet available).

Example

- name: operator-channel
  value: "rhods-operator=stable-3.x"`

E2E Test Results (2026-07-30) ✅

Validated via RHAIIS-on-RHOAI ITS pipeline run `rhaiis-rhoai-e2e-3x-test6` on OCP 4.21.14:

Task Status Duration
create-snc-cluster (RHOAI 3.3.x via stable-3.x) ✅ Succeeded 20m54s
deploy-and-test-kserve ✅ Succeeded 5m19s
delete-snc-cluster ✅ Succeeded 4m15s
✓ Verification PASSED: Response contains 'Paris'
=== RHAIIS on RHOAI smoke test PASSED ===

RHOAI 3.x confirmed by presence of `llminferenceservices` (llmisvc) CRD, which is new in 3.x and absent in 2.25.x. Related: AIPCC-28556, konflux-data MR !447.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@amastbau, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f63af812-363c-4a31-9a4b-0a755c475825

📥 Commits

Reviewing files that changed from the base of the PR and between 367dabf and 327d741.

📒 Files selected for processing (10)
  • tkn/infra-aws-fedora.yaml
  • tkn/infra-aws-kind.yaml
  • tkn/infra-aws-ocp-snc.yaml
  • tkn/infra-aws-rhel-ai.yaml
  • tkn/infra-aws-rhel.yaml
  • tkn/template/infra-aws-fedora.yaml
  • tkn/template/infra-aws-kind.yaml
  • tkn/template/infra-aws-ocp-snc.yaml
  • tkn/template/infra-aws-rhel-ai.yaml
  • tkn/template/infra-aws-rhel.yaml
📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added support for specifying custom OLM operator channels during OpenShift cluster provisioning.
    • You can now provide multiple overrides as comma-separated package=channel values, which are applied to the provisioning command.
  • Bug Fixes
    • Updated provisioning to use the correct OpenShift cluster type identifier.
    • Added validation for the package=channel override format before applying overrides.

Walkthrough

The Tekton infra-aws-ocp-snc tasks add an operator-channel parameter, use the openshift-snc mapt subcommand, and validate and forward comma-separated operator channel overrides during creation.

Changes

OpenShift SNC provisioning

Layer / File(s) Summary
Task parameter and provisioning command
tkn/infra-aws-ocp-snc.yaml, tkn/template/infra-aws-ocp-snc.yaml
Adds the operator-channel parameter, changes the provisioning subcommand to openshift-snc, validates package=channel entries, and appends corresponding --operator-channel flags.

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

Suggested reviewers: ppitonak, jangel97

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding an operator-channel param to the infra-aws-ocp-snc Tekton task.
Description check ✅ Passed The description is clearly related to the changeset and matches the new parameter, command update, and validation behavior.
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.

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.

@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: 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 `@tkn/infra-aws-ocp-snc.yaml`:
- Around line 288-292: Remove the eval-based command construction around the
operator-channel handling and execution near the provisioner command, using a
shell array to store fixed arguments and each validated channel value, then
execute the array directly. Read the Tekton operator-channel parameter through
an environment variable rather than interpolating it into shell source,
preserving comma-separated channel handling while preventing caller input from
being reparsed as commands.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b443c821-4c9e-494e-80bd-7cde337f81cd

📥 Commits

Reviewing files that changed from the base of the PR and between 6e3cacf and fa0216c.

📒 Files selected for processing (1)
  • tkn/infra-aws-ocp-snc.yaml

Comment thread tkn/infra-aws-ocp-snc.yaml
@ppitonak

Copy link
Copy Markdown
Collaborator

Please squash the commits

@amastbau
amastbau force-pushed the feat/tkn-operator-channel branch from 910766e to 367dabf Compare July 30, 2026 11:41
@amastbau

Copy link
Copy Markdown
Author

@ppitonak I do not have sufficient permissions in this Repo
Not sure if i need to be in some group.
Could you merge this for me until i figure this out?
(commits squashed)

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

♻️ Duplicate comments (1)
tkn/infra-aws-ocp-snc.yaml (1)

288-295: ⚠️ Potential issue | 🟠 Major

Remove shell-source interpolation and eval from operator-channel handling.

The validation is too late because Tekton substitutes the parameter before the shell parses the script. Apply the same safe argument-passing implementation in both manifests:

  • tkn/infra-aws-ocp-snc.yaml#L288-L295: read the parameter from an environment variable and pass validated entries as direct arguments.
  • tkn/template/infra-aws-ocp-snc.yaml#L288-L295: apply the identical fix to keep the template secure.
🤖 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 `@tkn/infra-aws-ocp-snc.yaml` around lines 288 - 295, Replace shell-source
interpolation and eval-based operator-channel handling in both
tkn/infra-aws-ocp-snc.yaml (lines 288-295) and
tkn/template/infra-aws-ocp-snc.yaml (lines 288-295). Read operator-channel
through an environment variable, validate each comma-separated entry before use,
and pass validated entries as direct command arguments using the existing
command-building flow; apply the identical implementation in both manifests.

Source: Path instructions

🤖 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.

Duplicate comments:
In `@tkn/infra-aws-ocp-snc.yaml`:
- Around line 288-295: Replace shell-source interpolation and eval-based
operator-channel handling in both tkn/infra-aws-ocp-snc.yaml (lines 288-295) and
tkn/template/infra-aws-ocp-snc.yaml (lines 288-295). Read operator-channel
through an environment variable, validate each comma-separated entry before use,
and pass validated entries as direct command arguments using the existing
command-building flow; apply the identical implementation in both manifests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e1450f4f-8471-4e70-bffd-6c7cd6405cc7

📥 Commits

Reviewing files that changed from the base of the PR and between fa0216c and 367dabf.

📒 Files selected for processing (2)
  • tkn/infra-aws-ocp-snc.yaml
  • tkn/template/infra-aws-ocp-snc.yaml

@amastbau
amastbau force-pushed the feat/tkn-operator-channel branch from 1ddde58 to 29c0567 Compare July 30, 2026 12:56
…tically

Added operator-channel param to infra-aws-ocp-snc task for specifying
OLM operator channel overrides (e.g., "operator=channel,operator2=channel2").
Sorted VM type params (cpus, memory, compute-sizes, gpus, gpu-manufacturer,
spot params) alphabetically in all AWS Tekton tasks for consistency.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@amastbau
amastbau force-pushed the feat/tkn-operator-channel branch from 29c0567 to 327d741 Compare July 30, 2026 12:57
@ppitonak
ppitonak merged commit 7b78299 into redhat-developer:main Jul 30, 2026
11 of 14 checks passed
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