Skip to content

Inlcude troubleshooting panel cypress tests into rhobs release pipelines#80279

Open
DavidRajnoha wants to merge 1 commit into
openshift:mainfrom
DavidRajnoha:troubleshooting-panel-tests-integration
Open

Inlcude troubleshooting panel cypress tests into rhobs release pipelines#80279
DavidRajnoha wants to merge 1 commit into
openshift:mainfrom
DavidRajnoha:troubleshooting-panel-tests-integration

Conversation

@DavidRajnoha

@DavidRajnoha DavidRajnoha commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

This PR integrates Cypress UI test execution for the TroubleshootingPanel console plugin into the RHOBS (Red Hat Observability Stack) observability operator's release pipelines.

Changes made:

  1. New CI Step Registry Definition (ci-operator/step-registry/troubleshooting-panel/tests/ui/):

    • Created a new step troubleshooting-panel-tests-ui that runs Cypress acceptance tests
    • The step validates cluster access and required credentials, sets up the TroubleshootingPanel UIPlugin resource, clones the troubleshooting-panel-console-plugin repository, configures Cypress environment variables, and executes the test suite
    • Configured with a 30-minute timeout, running in the ci namespace using the cypress-base:latest image
    • Includes OWNERS file defining approvers and reviewers for the test step
  2. Pipeline Integration (4 CI configuration files):

    • Added the troubleshooting-panel-tests-ui test reference to the coo-stage workflow in observability operator configurations for:
      • OCP 4.19 (GCP)
      • OCP 4.20 (Azure)
      • OCP 4.21 (Azure)
      • OCP 4.22 (GCP)

Impact:
The TroubleshootingPanel UI tests will now run as part of the RHOBS observability operator's CI/CD pipeline across multiple Kubernetes versions and cloud providers, ensuring the console plugin functions correctly in the release process.

@DavidRajnoha

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR introduces a new CI test step troubleshooting-panel-tests-ui that runs Cypress acceptance tests for the TroubleshootingPanel console plugin. The change establishes the test registry definition, implementation script, and ownership, then wires the test into four observability operator CI pipelines across different OCP platform variants.

Changes

Troubleshooting Panel UI Test Integration

Layer / File(s) Summary
Test step registry definition and ownership
ci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-ref.yaml, OWNERS, troubleshooting-panel-tests-ui-ref.metadata.json
Declares the new troubleshooting-panel-tests-ui CI step with Cypress container image, 30-minute timeout, resource requests/limits, a configurable namespace environment variable, and documentation. Establishes approvers and reviewers for the step directory.
Test command script implementation
ci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-commands.sh
Script validates prerequisites (console resource and kubeadmin credentials), optionally loads proxy config, sets up artifact collection, ensures monitoring and troubleshooting-panel UIPlugins exist, clones the console plugin repository, configures Cypress environment variables (kubeconfig, console route, OpenShift version), installs dependencies, and runs the Cypress acceptance test suite with graceful failure handling.
CI pipeline integrations
ci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.*.yaml (4 files)
Adds troubleshooting-panel-tests-ui test reference to the coo-stage workflow in CI configurations for OCP 4.19 GCP, 4.20 Azure, 4.21 Azure, and 4.22 GCP observability operator variants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • openshift/release#80023: Modifies the same OCP 4.22 GCP CI configuration file; establishes the initial coo-stage workflow that this PR extends with the troubleshooting-panel-tests-ui test reference.

Suggested labels

ok-to-test, rehearsals-ack

Suggested reviewers

  • jgbernalp
🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title contains a typo ('Inlcude' instead of 'Include') but accurately describes the main change: adding troubleshooting panel cypress tests to release pipelines. Fix the typo: change 'Inlcude' to 'Include' in the pull request title.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 PR contains no Ginkgo tests. Changes add Cypress (JavaScript) test integration via CI config and step registry files, not Go test definitions.
Test Structure And Quality ✅ Passed No Ginkgo test code exists in this PR; it contains CI config YAML, bash scripts, and metadata files. The custom check for Ginkgo test quality is not applicable.
Microshift Test Compatibility ✅ Passed The custom check applies only to new Ginkgo e2e tests. This PR adds Cypress UI tests via a shell script, not Ginkgo tests, so the check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR adds no Ginkgo e2e tests. The test step runs Cypress UI tests (JavaScript), not Go-based Ginkgo tests, so the SNO compatibility check does not apply.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds only CI test infrastructure (step registry and pipeline configs), not deployment manifests or operator code with scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The custom check is inapplicable: this PR adds Cypress UI test CI configuration (YAML, bash, JSON), not Go/Ginkgo OTE binary code that the check targets.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds Cypress UI tests (TypeScript), not Ginkgo e2e tests. Custom check only applies to Ginkgo tests, so it is not applicable.
No-Weak-Crypto ✅ Passed No weak cryptography patterns (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom implementations, or non-constant-time secret comparisons) detected in any PR files.
Container-Privileges ✅ Passed No privileged container settings found: troubleshooting-panel-tests-ui-ref.yaml lacks privileged:true, hostPID/Network/IPC, SYS_ADMIN, allowPrivilegeEscalation, or root-without-justification settings.
No-Sensitive-Data-In-Logs ✅ Passed Password is read but never echoed or printed. All echo statements log only namespace names and exit codes—no credentials, tokens, PII, or sensitive data exposed in logs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 9, 2026
@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@DavidRajnoha DavidRajnoha marked this pull request as ready for review June 9, 2026 08:45
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 9, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@DavidRajnoha: 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
periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.21-azure-coo-stage N/A periodic Ci-operator config changed
periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.20-azure-coo-stage N/A periodic Ci-operator config changed
periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.22-gcp-coo-stage N/A periodic Ci-operator config changed
periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.19-gcp-coo-stage N/A periodic Ci-operator config changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

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.

@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@openshift-ci openshift-ci Bot requested review from PeterYurkovich and stbenjam June 9, 2026 08:48

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

🧹 Nitpick comments (1)
ci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-ref.yaml (1)

20-24: ⚡ Quick win

Update documentation to reflect actual behavior.

The documentation states the step "Expects COO and the Monitoring UIPlugin to already be present," but the commands script (lines 35-51 of troubleshooting-panel-tests-ui-commands.sh) creates the Monitoring UIPlugin if it's missing. Update the documentation to accurately reflect that the step will create the Monitoring UIPlugin as a fallback.

📝 Suggested documentation fix
   documentation: |-
     The troubleshooting-panel-tests-ui step executes the troubleshooting-panel-console-plugin
-    Cypress acceptance tests. Expects COO and the Monitoring UIPlugin to already be present
-    (installed by a preceding monitoring-plugin-tests-monitoring-incidents-ui-integration step).
-    Creates the TroubleshootingPanel UIPlugin and runs the acceptance test suite.
+    Cypress acceptance tests. Expects COO to be present. Creates the Monitoring UIPlugin if
+    missing (normally installed by the preceding monitoring-plugin-tests-monitoring-incidents-ui-integration
+    step), then creates the TroubleshootingPanel UIPlugin and runs the acceptance test suite.
🤖 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/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-ref.yaml`
around lines 20 - 24, Update the documentation paragraph for the
troubleshooting-panel-tests-ui step to accurately state that while COO is
expected to be present, the step will create the Monitoring UIPlugin as a
fallback if it is missing (the creation logic exists in
troubleshooting-panel-tests-ui-commands.sh), and keep the description of
creating the TroubleshootingPanel UIPlugin and running the Cypress acceptance
tests; reference the monitoring UI plugin creation behavior in the documentation
string previously under the documentation key.
🤖 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/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.19-gcp.yaml`:
- Line 68: You added/updated the ref entry "troubleshooting-panel-tests-ui" in
the observability-operator main CI config but did not regenerate the downstream
ProwJob artifacts; run the repo's update step by executing "make update" to
regenerate the generated ProwJob YAMLs so the changes to the ref are reflected
in the generated job files (ensure the generated job files for
observability-operator are committed after the update).

In
`@ci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-commands.sh`:
- Line 86: The script uses a bare cd "${repo_dir}/web" which can silently fail;
change it to check the result and stop the script on failure (for example
replace cd "${repo_dir}/web" with cd "${repo_dir}/web" || { echo "Failed to
change directory to ${repo_dir}/web" >&2; exit 1; } or enable strict mode (set
-e) earlier), ensuring the directory change is validated before running
subsequent commands.

---

Nitpick comments:
In
`@ci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-ref.yaml`:
- Around line 20-24: Update the documentation paragraph for the
troubleshooting-panel-tests-ui step to accurately state that while COO is
expected to be present, the step will create the Monitoring UIPlugin as a
fallback if it is missing (the creation logic exists in
troubleshooting-panel-tests-ui-commands.sh), and keep the description of
creating the TroubleshootingPanel UIPlugin and running the Cypress acceptance
tests; reference the monitoring UI plugin creation behavior in the documentation
string previously under the documentation key.
🪄 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: b5f3a355-5826-44e5-a1b0-7bb4c0cba738

📥 Commits

Reviewing files that changed from the base of the PR and between df0ba54 and b07bc32.

📒 Files selected for processing (8)
  • ci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.19-gcp.yaml
  • ci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.20-azure.yaml
  • ci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.21-azure.yaml
  • ci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.22-gcp.yaml
  • ci-operator/step-registry/troubleshooting-panel/tests/ui/OWNERS
  • ci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-commands.sh
  • ci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-ref.metadata.json
  • ci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-ref.yaml

- ref: install-operators
- ref: distributed-tracing-tests-tracing-ui-integration
- ref: monitoring-plugin-tests-monitoring-incidents-ui-integration
- ref: troubleshooting-panel-tests-ui

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 | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that ProwJob specs have been regenerated
git diff main --name-only | rg 'ci-operator/jobs/rhobs/observability-operator/.*-main-.*-4\.(19|20|21|22)-.*\.yaml'

Repository: openshift/release

Length of output: 43


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Changed files vs main (names only):"
git diff main --name-only | sed 's|^| - |'

echo
echo "Changed CI operator config files matching the touched area:"
git diff main --name-only | rg '^ci-operator/config/rhobs/observability-operator/'

echo
echo "Changed generated CI operator jobs under this repo (if any):"
git diff main --name-only | rg '^ci-operator/jobs/rhobs/observability-operator/'

Repository: openshift/release

Length of output: 6650


Run make update for the observability-operator CI config change

This config edit (adding/updating - ref: troubleshooting-panel-tests-ui in ci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.19-gcp.yaml) should regenerate the corresponding generated ProwJob YAMLs, but no files under ci-operator/jobs/rhobs/observability-operator/ are present in the change—run make update to refresh downstream artifacts.

🤖 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/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.19-gcp.yaml`
at line 68, You added/updated the ref entry "troubleshooting-panel-tests-ui" in
the observability-operator main CI config but did not regenerate the downstream
ProwJob artifacts; run the repo's update step by executing "make update" to
regenerate the generated ProwJob YAMLs so the changes to the ref are reflected
in the generated job files (ensure the generated job files for
observability-operator are committed after the update).

Source: Coding guidelines

export CYPRESS_CACHE_FOLDER=/tmp/Cypress
export NO_COLOR=1

cd "${repo_dir}/web"

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 | 🟡 Minor | ⚡ Quick win

Add error handling for directory change.

The cd command should include error handling to prevent subsequent commands from running in the wrong directory if the change fails.

🔧 Suggested fix
-cd "${repo_dir}/web"
+cd "${repo_dir}/web" || {
+  echo "Error: failed to change to web directory, skipping tests."
+  exit 0
+}
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 86-86: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

🤖 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/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-commands.sh`
at line 86, The script uses a bare cd "${repo_dir}/web" which can silently fail;
change it to check the result and stop the script on failure (for example
replace cd "${repo_dir}/web" with cd "${repo_dir}/web" || { echo "Failed to
change directory to ${repo_dir}/web" >&2; exit 1; } or enable strict mode (set
-e) earlier), ensuring the directory change is validated before running
subsequent commands.

@DavidRajnoha

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@DavidRajnoha: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.19-gcp-coo-stage b07bc32 link unknown /pj-rehearse periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.19-gcp-coo-stage
ci/rehearse/periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.22-gcp-coo-stage b07bc32 link unknown /pj-rehearse periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.22-gcp-coo-stage
ci/rehearse/periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.20-azure-coo-stage b07bc32 link unknown /pj-rehearse periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.20-azure-coo-stage
ci/prow/owners b07bc32 link true /test owners
ci/prow/step-registry-shellcheck b07bc32 link true /test step-registry-shellcheck
ci/rehearse/periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.21-azure-coo-stage b07bc32 link unknown /pj-rehearse periodic-ci-rhobs-observability-operator-main-amd64-ocp-4.21-azure-coo-stage

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.

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.

1 participant