Inlcude troubleshooting panel cypress tests into rhobs release pipelines#80279
Inlcude troubleshooting panel cypress tests into rhobs release pipelines#80279DavidRajnoha wants to merge 1 commit into
Conversation
|
/pj-rehearse |
|
@DavidRajnoha: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
WalkthroughThis PR introduces a new CI test step ChangesTroubleshooting Panel UI Test Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Skipping CI for Draft Pull Request. |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: DavidRajnoha The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
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 winUpdate 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
📒 Files selected for processing (8)
ci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.19-gcp.yamlci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.20-azure.yamlci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.21-azure.yamlci-operator/config/rhobs/observability-operator/rhobs-observability-operator-main__amd64-ocp-4.22-gcp.yamlci-operator/step-registry/troubleshooting-panel/tests/ui/OWNERSci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-commands.shci-operator/step-registry/troubleshooting-panel/tests/ui/troubleshooting-panel-tests-ui-ref.metadata.jsonci-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 |
There was a problem hiding this comment.
🧩 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" |
There was a problem hiding this comment.
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.
|
/retest |
|
@DavidRajnoha: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
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:
New CI Step Registry Definition (
ci-operator/step-registry/troubleshooting-panel/tests/ui/):troubleshooting-panel-tests-uithat runs Cypress acceptance testscinamespace using thecypress-base:latestimagePipeline Integration (4 CI configuration files):
troubleshooting-panel-tests-uitest reference to thecoo-stageworkflow in observability operator configurations for: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.