Skip to content

aro-hcp: update makefile target for prometheus generation#81408

Open
bennerv wants to merge 1 commit into
openshift:mainfrom
bennerv:run-promrules-test-and-generate
Open

aro-hcp: update makefile target for prometheus generation#81408
bennerv wants to merge 1 commit into
openshift:mainfrom
bennerv:run-promrules-test-and-generate

Conversation

@bennerv

@bennerv bennerv commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

In Azure/ARO-HCP#5900, a split of the generation and testing was added. Test now generates and tests the alerts, but alerts itself will generate the alerts only and not test them.

Prefer make test-alerts, but support fallback to make alerts until 5900 is merged.

Summary by CodeRabbit

This update changes the aro-hcp observability Prometheus CI step to prefer upstream’s new make test-alerts workflow, which both generates and validates alert rules. If that target isn’t available yet, the step falls back to the older make alerts behavior.

In practice, this keeps the aro-hcp CI job aligned with the upstream split between alert generation and alert testing, while preserving compatibility until the new target is fully available. It also improves the failure message so it tells contributors to rerun whichever alert target was actually used.

@coderabbitai

coderabbitai Bot commented Jul 2, 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: abf184c4-d1ae-49f6-a851-a40c0f0768c9

📥 Commits

Reviewing files that changed from the base of the PR and between 38bf911 and 64c0009.

📒 Files selected for processing (1)
  • ci-operator/step-registry/aro-hcp/observability-prometheus/aro-hcp-observability-prometheus-commands.sh

Walkthrough

The observability-prometheus CI step script was modified to conditionally select between "make test-alerts" and "make alerts" based on target availability, storing the selected target in ALERT_TARGET and using it in the uncommitted-changes error message.

Changes

Alert Target Selection

Layer / File(s) Summary
Conditional make target selection
ci-operator/step-registry/aro-hcp/observability-prometheus/aro-hcp-observability-prometheus-commands.sh
Checks for "make test-alerts" target existence via make -n test-alerts, runs it if available or falls back to make alerts, tracks the executed target in ALERT_TARGET, and updates the rerun instructions in the uncommitted-changes error message.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 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 matches the main change: updating the aro-hcp Prometheus alert generation target with a test-alerts preference and fallback.
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 PR only changes a shell script; no Ginkgo test titles or dynamic test-name strings were added or modified.
Test Structure And Quality ✅ Passed Not applicable: this PR only changes a shell script and adds no Ginkgo tests or cluster interactions to review.
Microshift Test Compatibility ✅ Passed PR only changes a shell script in ci-operator; no new Ginkgo e2e tests were added, so the MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only changes a shell script for alert generation; no Ginkgo e2e tests or cluster-topology assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed PASS: The PR only changes a CI shell script for alert generation/testing; it does not add or modify manifests, controllers, or any scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR only changes a ci-operator shell step; no OTE main/init/TestMain code or stdout contract violation was introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR changes only ARO-HCP CI shell/config files; no Go/Ginkgo e2e tests were added or modified, so IPv6/disconnected compatibility checks are not applicable.
No-Weak-Crypto ✅ Passed The only touched script contains no MD5/SHA1/DES/RC4/ECB/custom-crypto or secret-comparison code; it just switches Make targets.
Container-Privileges ✅ Passed PR only changes a shell script; the related step-registry YAML has no privileged/securityContext fields or container settings to flag.
No-Sensitive-Data-In-Logs ✅ Passed The updated script only logs command flow and alert target names; it does not print passwords, tokens, PII, hostnames, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bennerv
Once this PR has been reviewed and has the lgtm label, please assign janboll 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 janboll and mmazur July 2, 2026 15:14
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@bennerv: 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-Azure-ARO-HCP-main-observability-prometheus Azure/ARO-HCP presubmit Registry content 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.

@bennerv

bennerv commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse auto-ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@bennerv: 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 added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant