From e9c6bc8eef52f24540b062bf798beaac6935d80e Mon Sep 17 00:00:00 2001 From: Ruth Netser Date: Wed, 17 Jun 2026 13:59:27 +0300 Subject: [PATCH] fix: enforce `# ` on Jira lines in CodeRabbit config Add instruction to .coderabbit.yaml STP link check that Jira: lines in test docstrings must include `# ` inline comment so the jira-utils checker skips traceability references. Fix existing violation in test_vms_metrics.py. Closes: #5257 Signed-off-by: Ruth Netser Co-authored-by: Claude --- .coderabbit.yaml | 9 +++++++++ tests/observability/metrics/test_vms_metrics.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 6b1105ab88..c44af832df 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -121,6 +121,15 @@ reviews: newly added test functions in that same file are considered covered. The @pytest.mark.polarion decorator alone does NOT satisfy this requirement. + **Jira skip-marker enforcement:** + When a `Jira:` line appears in a test docstring for traceability, it MUST + also include `# ` as an inline comment on the same line. + This is required so the project's jira-utils checker skips traceability references. + - Correct: `Jira: https://redhat.atlassian.net/browse/CNV-87822 # ` + - Incorrect: `Jira: https://redhat.atlassian.net/browse/CNV-80580` + This does NOT apply to `STP:` or `RFE:` lines — only `Jira:` lines need the marker. + Flag a missing `# ` on a `Jira:` line as HIGH severity. + Pass if no new test files and no new test functions are added in this PR. # Auto-review configuration diff --git a/tests/observability/metrics/test_vms_metrics.py b/tests/observability/metrics/test_vms_metrics.py index 5c3fdaeac3..96f491569e 100644 --- a/tests/observability/metrics/test_vms_metrics.py +++ b/tests/observability/metrics/test_vms_metrics.py @@ -551,7 +551,7 @@ class TestVmiSyncTotal: """ Tests for kubevirt_vmi_sync_total metric. - Jira: https://redhat.atlassian.net/browse/CNV-80580 + Jira: https://redhat.atlassian.net/browse/CNV-80580 # Preconditions: - Running VM