Skip to content

stolostron/capi-tests: use conditional Slack report template for capz-e2e#80824

Open
RadekCap wants to merge 1 commit into
openshift:mainfrom
RadekCap:capz-slack-reporter-conditional-template
Open

stolostron/capi-tests: use conditional Slack report template for capz-e2e#80824
RadekCap wants to merge 1 commit into
openshift:mainfrom
RadekCap:capz-slack-reporter-conditional-template

Conversation

@RadekCap

@RadekCap RadekCap commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add success to job_states_to_report for the capz-e2e periodic job
  • Use Go template conditional ({{if eq .Status.State "success"}}) to show :slack-green: for success and :failed: for failure/error
  • Replaces the single static failure template with per-state messaging

🤖 Generated with Claude Code

Summary by CodeRabbit

This PR updates the Slack notification configuration for the capz-e2e periodic CI job in the stolostron/capi-tests repository to provide better visibility into job outcomes.

Changes made:

  • Modified job_states_to_report to include success state alongside existing failure/error states, enabling notifications for both successful and failed job completions
  • Replaced a static failure-only message template with a conditional Go template that dynamically displays:
    • :slack-green: emoji when the job succeeds
    • :failed: emoji when the job fails or errors

Practical impact: Team members monitoring the capz-e2e job in Slack will now receive status-specific visual indicators, making it immediately clear whether the job succeeded or failed without needing to check the detailed logs. This improves observability and makes it easier to spot job failures in busy Slack channels.

…-e2e

Add success state reporting and use Go template conditionals to show
different messages per job state: green for success, failed emoji for
failure/error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 22, 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: 76676e27-a35d-4338-bfd8-c72dd337b5d7

📥 Commits

Reviewing files that changed from the base of the PR and between a4d0d53 and cb3ce44.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/stolostron/capi-tests/stolostron-capi-tests-configure-prow-mgmt-periodics.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (1)
  • ci-operator/config/stolostron/capi-tests/stolostron-capi-tests-configure-prow-mgmt__periodics.yaml

Walkthrough

The capz-e2e periodic job configuration is updated to add success to job_states_to_report and replace the static failure-only report_template with a conditional Go template that emits a green "succeeded" Slack message on success or a "failed" message with the actual state otherwise.

Changes

Prow capz-e2e Slack Reporting

Layer / File(s) Summary
Slack report template and states
ci-operator/config/stolostron/capi-tests/stolostron-capi-tests-configure-prow-mgmt__periodics.yaml
job_states_to_report is extended with success; report_template is replaced with a conditional Go template rendering a green "succeeded" message for success and a "failed (state)" message for all other states.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 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 accurately summarizes the main change: introducing a conditional Slack report template for the capz-e2e job in the stolostron/capi-tests configuration.
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 modifies only a YAML Prow configuration file with no Ginkgo test code. The check for Ginkgo test name stability is not applicable.
Test Structure And Quality ✅ Passed PR modifies only a Prow CI/CD configuration file (YAML), not Ginkgo test code. The custom check for Ginkgo test quality is not applicable to this PR.
Microshift Test Compatibility ✅ Passed This PR modifies CI/Prow configuration only (YAML file), not adding any Ginkgo e2e tests. The MicroShift Test Compatibility check applies only to new test code.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies only Prow CI configuration YAML, not Ginkgo e2e test code. Custom check applies only when new Ginkgo tests are added; no test code changes found.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only a Prow CI job configuration file for Slack reporting, not deployment manifests, operator code, or controllers. No scheduling constraints are introduced.
Ote Binary Stdout Contract ✅ Passed PR modifies only Prow CI configuration (YAML), not test binary source code. OTE Binary Stdout Contract check applies only to Go source code patterns.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR only modifies a Prow CI configuration YAML file for Slack reporting; it does not add any Ginkgo e2e tests, so the IPv6/disconnected network compatibility check is not applicable.
No-Weak-Crypto ✅ Passed The PR modifies only a YAML Prow configuration file for Slack job reporting. It contains no cryptographic code, weak algorithms, custom crypto implementations, or secret comparisons.
Container-Privileges ✅ Passed The modified file is a Prow CI configuration, not a Kubernetes container manifest. It contains no privileged settings, hostPID/Network/IPC, SYS_ADMIN capabilities, or container privilege configurat...
No-Sensitive-Data-In-Logs ✅ Passed The Slack report template only logs safe job metadata (state, name, URL) with no passwords, tokens, PII, credentials, or customer data exposed.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2026
@openshift-ci openshift-ci Bot requested review from marek-veber and mzazrivec June 22, 2026 09:19
@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 22, 2026
@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marek-veber, mzazrivec, RadekCap

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants