Skip to content

WIP: add openperouter deploy-verify test on AWS - #82873

Closed
oribon wants to merge 1 commit into
openshift:mainfrom
oribon:perouter_deploy_debug
Closed

WIP: add openperouter deploy-verify test on AWS#82873
oribon wants to merge 1 commit into
openshift:mainfrom
oribon:perouter_deploy_debug

Conversation

@oribon

@oribon oribon commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Add a lightweight test that deploys openperouter via OLM on an AWS cluster and verifies operator, controller, and router pods come up healthy. Uses the optional-operators-ci-operator-sdk-aws workflow following the MetalLB operator-e2e pattern.

Changes:

  • Switch bundle to simple bundle.Dockerfile (no submodule dependency)
  • Substitute raw CSV pullspecs (quay.io/openperouter/router:main)
  • Add operator-deploy-verify test with cluster_profile: openshift-org-aws
  • Add openperouter to aws cluster profile owners
  • Add cli-operator-sdk base image

Summary by CodeRabbit

  • Updates OpenPERouter CI to build with bundle.Dockerfile, use raw CSV pullspecs, and add the cli-operator-sdk base image.
  • Adds an AWS operator-deploy-verify test that installs OpenPERouter, creates an OpenPERouter resource, and verifies healthy controller and router pods.
  • Registers OpenPERouter as an owner of the AWS cluster profile.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 4, 2026
@openshift-ci
openshift-ci Bot requested review from dgoodwin and maiqueb August 4, 2026 10:26
@coderabbitai

coderabbitai Bot commented Aug 4, 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: Pro Plus

Run ID: 99d2b880-79bb-4fb8-abe9-a32be72d452b

📥 Commits

Reviewing files that changed from the base of the PR and between 1dec90a and 3c22504.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/openshift-kni/openperouter/openshift-kni-openperouter-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (2)
  • ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml
  • ci-operator/step-registry/cluster-profiles/cluster-profiles-config.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • ci-operator/step-registry/cluster-profiles/cluster-profiles-config.yaml
  • ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml

Walkthrough

This pull request configures continuous integration for the OpenPERouter operator. The changes add build image specifications, update the bundle Dockerfile configuration, set the container image pullspec, and implement AWS-based deployment verification that validates operator installation and pod health.

Changes

OpenPERouter CI Integration

Layer / File(s) Summary
Operator SDK and bundle build setup
ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml
The CI configuration adds the CLI operator SDK base image at version v1.31.0, updates the bundle build to use operator/bundle.Dockerfile, and sets quay.io/openperouter/router:main as the bundle substitution pullspec.
AWS deployment verification and cluster ownership
ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml, ci-operator/step-registry/cluster-profiles/cluster-profiles-config.yaml
The AWS cluster profile adds OpenPERouter to the repositories owned by openshift-kni. The deployment verification test installs the operator, labels the namespace for privilege escalation, creates an OpenPERouter resource, waits for controller and router DaemonSets to be ready, verifies pod health, and emits diagnostics on failure.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels: rehearsals-ack

Suggested reviewers: dgoodwin, maiqueb

Sequence Diagram(s)

sequenceDiagram
  participant AWSCluster
  participant OperatorDeployment
  participant OpenPERouterResource
  participant ControllerDaemonSet
  participant RouterDaemonSet
  AWSCluster->>OperatorDeployment: Install OpenPERouter operator
  OperatorDeployment-->>AWSCluster: Operator ready
  AWSCluster->>OpenPERouterResource: Create OpenPERouter resource
  OpenPERouterResource->>ControllerDaemonSet: Trigger deployment
  OpenPERouterResource->>RouterDaemonSet: Trigger deployment
  AWSCluster->>ControllerDaemonSet: Wait and check pod health
  AWSCluster->>RouterDaemonSet: Wait and check pod health
  ControllerDaemonSet-->>AWSCluster: Health status
  RouterDaemonSet-->>AWSCluster: Health status
Loading
🚥 Pre-merge checks | ✅ 5 | ❌ 10

❌ Failed checks (10 inconclusive)

Check name Status Explanation Resolution
Stable And Deterministic Test Names ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test Structure And Quality ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Microshift Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Single Node Openshift (Sno) Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Topology-Aware Scheduling Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ote Binary Stdout Contract ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ipv6 And Disconnected Network Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Weak-Crypto ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Container-Privileges ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Sensitive-Data-In-Logs ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding an OpenPERouter deploy-and-verify test on AWS.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

@openshift-ci

openshift-ci Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: oribon
Once this PR has been reviewed and has the lgtm label, please assign hector-vido 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

@oribon

oribon commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@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: 3

🤖 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/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml`:
- Around line 110-119: Update the rollout verification around the pod readiness
check to validate every DaemonSet’s status.desiredNumberScheduled and
status.numberReady, failing when no targets are scheduled or the ready count is
insufficient. After excluding Completed pods, also reject empty or non-ready
readiness output so pods reporting 0/N READY cannot pass; preserve the existing
diagnostics before exiting.
- Around line 95-105: Bound the DaemonSet creation loops for controller and
router so they cannot run indefinitely before rollout status begins. Add a
finite timeout and failure diagnostics to each wait, while preserving the
existing 300-second oc rollout status timeout for availability and progress.
- Line 65: Update the OO_INSTALL_MODE configuration to AllNamespaces so the
operator-sdk run bundle invocation matches the install mode supported by the
built bundle CSV; leave other CI settings unchanged.
🪄 Autofix

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: Pro Plus

Run ID: ab710965-ab27-445e-bfd6-74b7714f65df

📥 Commits

Reviewing files that changed from the base of the PR and between 40b7bf5 and 1dec90a.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/openshift-kni/openperouter/openshift-kni-openperouter-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (2)
  • ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml
  • ci-operator/step-registry/cluster-profiles/cluster-profiles-config.yaml

Comment on lines +95 to +105
echo "### Wait for controller daemonset"
until oc get daemonset controller -n openshift-openperouter-system &>/dev/null; do
sleep 5
done
oc rollout status daemonset/controller -n openshift-openperouter-system --timeout=300s

echo "### Wait for router daemonset"
until oc get daemonset router -n openshift-openperouter-system &>/dev/null; do
sleep 5
done
oc rollout status daemonset/router -n openshift-openperouter-system --timeout=300s

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== file exists and relevant lines =="
if [ -f ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml ]; then
  sed -n '1,140p' ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml | nl -ba | sed -n '80,115p'
else
  echo "missing target file"
fi

echo
echo "== kubectl/oc wait help if available =="
command -v oc || true
if command -v oc >/dev/null 2>&1; then
  oc wait --help | sed -n '1,160p'
fi
command -v kubectl || true
if command -v kubectl >/dev/null 2>&1; then
  kubectl wait --help | sed -n '1,160p'
fi

echo
echo "== search for wait_for_daemonset in repo =="
rg -n "wait_for_daemonset|for=create|oc wait" ci-operator/config/openshift-kni/openperouter ci-operator/config || true

Repository: openshift/release

Length of output: 232


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate target file =="
git ls-files | grep -F 'ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml' || true

echo
echo "== relevant target lines =="
awk '{printf "%4d\t%s\n", NR, $0}' ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml | sed -n '80,115p'

Repository: openshift/release

Length of output: 1879


🌐 Web query:

kubectl wait --for=create Kubernetes condition create support

💡 Result:

Yes, kubectl wait supports the --for=create option to wait for a resource to be created [1][2]. When you use kubectl wait --for=create [resource], the command will wait until the specified resource exists or until the defined timeout is reached [1][2]. This is particularly useful for workflows where you need to ensure a resource exists before proceeding to check its status [3]. Key details include: - Usage: You can combine it with other --for flags. For example, kubectl wait --for=create --for=condition=Ready [resource] will wait for the resource to be created and then for it to reach the Ready condition [1][3]. - Execution Order: If both --for=create and other conditions (like --for=condition=...) are provided, --for=create is always processed first [1][4]. - Label Selectors: The functionality supports label selectors, allowing you to wait for resources that match specific labels to be created [5]. - Default Behavior: If you do not provide --for=create, kubectl wait generally expects the target resource to already exist and may return an error if it cannot be found [5]. This feature was added to improve the reliability of scripts and CI/CD pipelines that depend on resources that might not be immediately available [6][3].

Citations:


Bound both DaemonSet creation waits.

Both until oc get daemonset loops can run indefinitely if the DaemonSet is not created. The 300-second oc rollout status timeout only starts after creation succeeds. Use a bounded creation wait with diagnostics on failure, and keep the rollout timeout for availability/progress.

🤖 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/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml`
around lines 95 - 105, Bound the DaemonSet creation loops for controller and
router so they cannot run indefinitely before rollout status begins. Add a
finite timeout and failure diagnostics to each wait, while preserving the
existing 300-second oc rollout status timeout for availability and progress.

Comment on lines +110 to +119
echo "### Verify all containers are ready"
NOT_READY=$(oc get pods -n openshift-openperouter-system --no-headers \
| grep -v Completed | grep -v "Running" || true)
if [ -n "$NOT_READY" ]; then
echo "ERROR: Some pods are not healthy:"
echo "$NOT_READY"
oc describe pods -n openshift-openperouter-system
oc logs -n openshift-openperouter-system -l app=router --all-containers --tail=50
exit 1
fi

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.

🎯 Functional Correctness | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## Locate CI config"
git ls-files | rg 'ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml' || true

echo "## Relevant lines"
if [ -f ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml ]; then
  nl -ba ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml | sed -n '80,145p'
fi

echo "## Search rollout/status/health related patterns"
rg -n "rollout status|Verify all containers|openshift-openperouter-system|daemonset|desire|numberReady|desiredNumberScheduled|grep -v Running" ci-operator/config/openshift-kni/openperouter -S || true

echo "## Programmatic probe: current grep behavior for representative statuses"
python3 - <<'PY'
from subprocess import run

cases = {
    "empty": "",
    "running_ok": "openshift-openperouter-controller-controller-abcde   1/1     2/2     2     20s       Running",
    "running_unready": "openshift-openperouter-controller-controller-abcde   0/1     2/2     2     20s       Running",
    "mixed": """openshift-openperouter-controller-controller-abcde   0/1     2/2     2     20s       Running
openshift-openperouter-router-router-fghij   1/1     2/2     2     20s       Running""".replace("\n", " | "),
}
for name, lines in cases.items():
    args = ["grep", "-v", "Completed"]
    import pathlib
    p = pathlib.Path(f"/tmp/cases-{name}.txt")
    p.write_text(lines + "\n")
    # Simulate exactly the shell pipeline after file read, no oc/run outside.
    print(f"\nCASE {name}:")
    print("lines:", repr(lines))
    for label, cmd in [
        ("grep -v Completed", ["grep", "-v", "Completed"]),
        ("grep -v Running", ["grep", "-v", "Running"]),
        ("merged grep -v Completed | grep -v Running", ["bash", "-c", "grep -v Completed /tmp/cases-{}.txt | grep -v Running".format(name)]),
    ]:
        proc = run(cmd, text=True, input=lines if label.startswith("merged") else lines, capture_output=True)
        print(f"{label} => NOT_READY={bool(proc.stdout.strip())} stdout={proc.stdout.strip()!r}")
PY

echo "## Check git diff stat/name only for context"
git diff --stat || true

Repository: openshift/release

Length of output: 316


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## Relevant lines"
if [ -f ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml ]; then
  cat -n ci-operator/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml | sed -n '1,160p'
fi

echo "## Search health/status patterns"
rg -n "rollout status|Verify all containers|openshift-openperouter-system|daemonset|desiredNumberScheduled|numberReady|grep -v Running|grep -v Completed" ci-operator/config/openswitch-kni/openperouter ci-operator/config/openshift-kni/openperouter -S || true

echo "## Programmatic probe: current grep behavior for representative statuses"
python3 - <<'PY'
from pathlib import Path
cases = {
    "empty": "",
    "running_ok": "openshift-openperouter-controller-controller-abcde   1/1     2/2     2     20s       Running",
    "running_unready": "openshift-openperouter-controller-controller-abcde   0/1     2/2     2     20s       Running",
    "mixed": """openshift-openperouter-controller-controller-abcde   0/1     2/2     2     20s       Running
openshift-openperouter-router-router-fghij   1/1     2/2     2     20s       Running""".replace("\n", " | "),
}
for name, lines in cases.items():
    print(f"\nCASE {name}:")
    print("lines:", repr(lines))
    import subprocess
    for label, cmd in [
        ("grep -v Completed", ["grep", "-v", "Completed"]),
        ("grep -v Running", ["grep", "-v", "Running"]),
    ]:
        proc = subprocess.run(cmd, text=True, input=lines, capture_output=True)
        print(f"{label} => stdout={proc.stdout.strip()!r}, exit={proc.returncode}")
PY

Repository: openshift/release

Length of output: 8905


Fail when DaemonSet Pods are not Ready or have no targets.

oc rollout status accepts a DaemonSet with desiredNumberScheduled=0, and the pod check only filters by Running; a pod with 0/1 READY passes. Check status.desiredNumberScheduled and status.numberReady for each DaemonSet, then reject empty readiness output after excluding Completed pods.

[low_effort_and_high_reward+]

🤖 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/config/openshift-kni/openperouter/openshift-kni-openperouter-main.yaml`
around lines 110 - 119, Update the rollout verification around the pod readiness
check to validate every DaemonSet’s status.desiredNumberScheduled and
status.numberReady, failing when no targets are scheduled or the ready count is
insufficient. After excluding Completed pods, also reject empty or non-ready
readiness output so pods reporting 0/N READY cannot pass; preserve the existing
diagnostics before exiting.

Add a lightweight test that deploys openperouter via OLM on an AWS
cluster and verifies operator, controller, and router pods come up
healthy. Uses the optional-operators-ci-operator-sdk-aws workflow
following the MetalLB operator-e2e pattern.

Changes:
- Switch bundle to simple bundle.Dockerfile (no submodule dependency)
- Substitute raw CSV pullspecs (quay.io/openperouter/router:main)
- Add operator-deploy-verify test with cluster_profile: openshift-org-aws
- Add openperouter to aws cluster profile owners
- Add cli-operator-sdk base image

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@oribon
oribon force-pushed the perouter_deploy_debug branch from 1dec90a to 3c22504 Compare August 4, 2026 12:58
@oribon

oribon commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@oribon: 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-kni-openperouter-main-operator-deploy-verify openshift-kni/openperouter presubmit Presubmit changed
pull-ci-openshift-kni-openperouter-main-ci-bundle-operator-bundle openshift-kni/openperouter presubmit Ci-operator config changed
pull-ci-openshift-kni-openperouter-main-images openshift-kni/openperouter presubmit Ci-operator config 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.

@oribon

oribon commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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

@oribon oribon closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant