Add RedHatQE/firewatch-granular CI config and step registry#80862
Add RedHatQE/firewatch-granular CI config and step registry#80862amp-rh wants to merge 1 commit into
Conversation
Adds CI pipeline for firewatch-granular, a Go tool that parses JUnit XML from CI artifacts and extracts operator/component/location metadata as Jira labels for the existing firewatch reporting step. Includes: - ci-operator config with image build, unit tests, lint, and integration tests - Step registry entry (firewatch-granular-analysis) for use in post chains - Presubmit and postsubmit job definitions The step enriches firewatch Jira tickets with granular labels like operator:etcd, component:kube-apiserver, location:file.go:42 by analyzing JUnit failure messages and stack traces.
|
@amp-rh: GitHub didn't allow me to request PR reviews from the following users: CSPI-QE. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
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. |
WalkthroughAdds a new OpenShift CI operator configuration for the Changesfirewatch-granular CI onboarding
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@amp-rh, Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amp-rh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
The OWNERS file contains untrusted users, which makes it INVALID. The following users are mentioned in OWNERS file(s) but are untrusted for the following reasons. One way to make the user trusted is to add them as members of the openshift org. You can then trigger verification by writing
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ci-operator/step-registry/firewatch/granular-analysis/firewatch-granular-analysis-commands.sh (1)
3-5: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winEnable default
errexitbehavior in the step script.This script should default to
set -euo pipefail; currently-eis missing. You can still preserve the explicit analyzer exit-code handling by temporarily disabling-eonly around that call.Proposed patch
-set -o nounset -set -o pipefail +set -o errexit +set -o nounset +set -o pipefail @@ -firewatch-granular analyze \ +set +e +firewatch-granular analyze \ --artifact-dir "${artifact_dir}" \ --output-dir "${output_dir}" exit_code=$? +set -eAs per coding guidelines, step-registry command scripts should use default
set -euo pipefail(without-x).Also applies to: 17-21
🤖 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/firewatch/granular-analysis/firewatch-granular-analysis-commands.sh` around lines 3 - 5, Add `set -o errexit` to the set commands at the beginning of the firewatch-granular-analysis-commands.sh script to comply with coding guidelines requiring `set -euo pipefail`. Additionally, review the code around lines 17-21 to identify any explicit analyzer exit-code handling that needs special treatment; if present, temporarily disable `-e` only around those specific calls using `set +e` before the call and `set -e` after it to preserve the intended behavior while maintaining the default errexit behavior for the rest of the script.Source: Coding guidelines
🤖 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.
Nitpick comments:
In
`@ci-operator/step-registry/firewatch/granular-analysis/firewatch-granular-analysis-commands.sh`:
- Around line 3-5: Add `set -o errexit` to the set commands at the beginning of
the firewatch-granular-analysis-commands.sh script to comply with coding
guidelines requiring `set -euo pipefail`. Additionally, review the code around
lines 17-21 to identify any explicit analyzer exit-code handling that needs
special treatment; if present, temporarily disable `-e` only around those
specific calls using `set +e` before the call and `set -e` after it to preserve
the intended behavior while maintaining the default errexit behavior for the
rest of the script.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: e9c392ca-c57e-459d-ae36-f2b3ef55cbfe
⛔ Files ignored due to path filters (3)
ci-operator/jobs/RedHatQE/firewatch-granular/OWNERSis excluded by!ci-operator/jobs/**ci-operator/jobs/RedHatQE/firewatch-granular/RedHatQE-firewatch-granular-main-postsubmits.yamlis excluded by!ci-operator/jobs/**ci-operator/jobs/RedHatQE/firewatch-granular/RedHatQE-firewatch-granular-main-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (4)
ci-operator/config/RedHatQE/firewatch-granular/RedHatQE-firewatch-granular-main.yamlci-operator/step-registry/firewatch/granular-analysis/OWNERSci-operator/step-registry/firewatch/granular-analysis/firewatch-granular-analysis-commands.shci-operator/step-registry/firewatch/granular-analysis/firewatch-granular-analysis-ref.yaml
|
@amp-rh: 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
Adds CI pipeline for RedHatQE/firewatch-granular, a Go tool that parses JUnit XML from CI artifacts and extracts granular metadata (operator names, component names, file:line locations) as Jira labels for the existing firewatch reporting step.
Included in this PR:
ci-operator/config/RedHatQE/firewatch-granular/- Image build, unit tests, lint, and 4 integration testsci-operator/step-registry/firewatch/granular-analysis/- Step ref for use in post chains beforefirewatch-report-issuesci-operator/jobs/RedHatQE/firewatch-granular/- Presubmit and postsubmit job definitionsHow it works:
The
firewatch-granular-analysisstep runs after tests complete and beforefirewatch-report-issues. It reads JUnit XML from${ARTIFACT_DIR}, extracts operator/component/location information from failure messages and stack traces, and appends labels to${SHARED_DIR}/firewatch-additional-labels. The existing firewatch step already reads this file and applies the labels to Jira tickets.Labels produced:
operator:etcd,operator:kube-apiserver, etc. (capped at 5)component:security-authorization,component:traffic-ingress, etc. (capped at 3)location:tcp_test.go:103, etc. (capped at 3)Testing:
/cc @CSPI-QE
Summary by CodeRabbit
This PR adds OpenShift CI infrastructure configuration for the RedHatQE/firewatch-granular project, enabling it to be built, tested, and integrated into CI pipelines across the OpenShift infrastructure.
What's Being Added
CI Operator Configuration (
ci-operator/config/RedHatQE/firewatch-granular/main.yaml)firewatch-granularunit: runsmake test(unit tests)lint: runsmake lint(code quality checks)integration-fixtures: validates label extraction (operator/component/file location) against test XML fixtures, enforcing label count capsintegration-no-failures: ensures no labels file is created for passing tests, but JSON report is still writtenintegration-empty-dir: validates graceful behavior when artifact directory is missingintegration-append-mode: confirms pre-existing labels aren't overwritten when new labels are appendedfirewatchnamespace/tagmainfor distributionStep Registry Entry (
ci-operator/step-registry/firewatch/granular-analysis/)firewatch-granular-analysis) that other jobs can include in their post chainsfirewatch-report-issuesstep so labels can be applied to ticketsJob Definitions (
ci-operator/jobs/RedHatQE/firewatch-granular/)firewatch-granularrepository on themainbranchPractical Impact
The firewatch-granular tool can now be built and validated as part of the OpenShift CI infrastructure, and other job configurations can use the
firewatch-granular-analysisstep to automatically extract metadata from test failures and enhance Jira ticket reporting with structured labels (operators, components, file locations).