Skip to content

jira: include rejected payloads when verifying payload component bugs#751

Open
rioliu-rh wants to merge 4 commits intoopenshift:mainfrom
rioliu-rh:jira-verify-rejected-payloads
Open

jira: include rejected payloads when verifying payload component bugs#751
rioliu-rh wants to merge 4 commits intoopenshift:mainfrom
rioliu-rh:jira-verify-rejected-payloads

Conversation

@rioliu-rh
Copy link
Copy Markdown

@rioliu-rh rioliu-rh commented Apr 3, 2026

Summary

Previously, payload component bugs were only moved to VERIFIED when the fix landed in an accepted release payload. This change also considers rejected payloads, so bugs can be verified as soon as blocking tests complete — regardless of whether they pass or fail.

  • Bugs fixed in payload components are pre-merge verified by QA on ephemeral clusters via qe-approved/verified PR labels
  • The payload phase check is only used to confirm blocking tests have executed and the fix is present — not as an additional QA gate
  • Both Accepted and Rejected payload phases satisfy this condition: all blocking tests have run and the fix is confirmed in the payload
  • This reduces noise in QE tracking queues and allows release leads to focus escalations on genuinely unresolved issues

Jira: OCPERT-358

Summary by CodeRabbit

  • Bug Fixes

    • Release verification now considers both accepted and rejected release tags when determining Jira issue verification status.
    • Jira notification text simplified by removing the redundant "accepted" qualifier for clearer messaging.
  • Tests

    • Updated tests to match the revised Jira notification format and added a test ensuring legacy comment deduplication.

Previously, bugs were only moved to VERIFIED when the fix was included
in an accepted release payload. This change also considers rejected
payloads, so bugs can be verified as soon as blocking tests complete,
regardless of whether they pass or fail.

Bugs fixed in payload components are pre-merge verified by QA on
ephemeral clusters via qe-approved/verified PR labels. The payload
phase check is only used to confirm blocking tests have executed and
the fix is present — not as an additional QA gate.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 187b7a72-b935-43e6-952a-a86873781566

📥 Commits

Reviewing files that changed from the base of the PR and between 0a648f6 and 1a690e6.

📒 Files selected for processing (2)
  • cmd/release-controller/jira.go
  • pkg/jira/jira_test.go
✅ Files skipped from review due to trivial changes (1)
  • cmd/release-controller/jira.go

📝 Walkthrough

Walkthrough

syncJira now considers both ReleasePhaseAccepted and ReleasePhaseRejected tags when selecting release tags for Jira verification. The verifier's default PR/ticket comment text was changed from "Fix included in accepted release " to "Fix included in release ", and comment deduplication now recognizes a legacy phrasing. Tests updated accordingly.

Changes

Cohort / File(s) Summary
Release controller
cmd/release-controller/jira.go
syncJira now merges ReleasePhaseAccepted and ReleasePhaseRejected tags when computing non-verified tag pairs; debug log message updated to state "accepted/rejected" coverage.
Jira verifier logic
pkg/jira/jira.go
Default comment text changed to Fix included in release <tag>; commentOnPR dedupe now treats a legacy message variant (substitution of "in release ""in accepted release ") as equivalent to the new message.
Tests
pkg/jira/jira_test.go
Added TestCommentOnPRLegacyDedupe; updated expected comment bodies and a fixture to remove "accepted" from "Fix included in …" across relevant tests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibbled through comments, old and new,
Accepted, rejected — every tag I knew.
"Fix included in release" I proudly sing,
No duplicate notes, just one tidy string. 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title mentions 'rejected payloads' but the main change is expanding tag selection to include both accepted AND rejected payloads for verification purposes, not primarily about 'payload component bugs'. Consider revising the title to better reflect the main change, such as: 'jira: verify payload component bugs when accepted or rejected payloads received' or 'jira: expand verification to include rejected release payloads'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

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

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
cmd/release-controller/jira.go (1)

220-223: Consider renaming acceptedTags to reflect mixed phases.

Now that the slice includes accepted + rejected tags, the local name is a bit misleading.

♻️ Small clarity diff
-	acceptedTags := releasecontroller.SortedRawReleaseTags(release, releasecontroller.ReleasePhaseAccepted, releasecontroller.ReleasePhaseRejected)
-	tag, prevTag := getNonVerifiedTagsJira(acceptedTags)
+	phaseFilteredTags := releasecontroller.SortedRawReleaseTags(release, releasecontroller.ReleasePhaseAccepted, releasecontroller.ReleasePhaseRejected)
+	tag, prevTag := getNonVerifiedTagsJira(phaseFilteredTags)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmd/release-controller/jira.go` around lines 220 - 223, The local variable
acceptedTags is misleading because it actually contains both accepted and
rejected phases; rename it (for example to acceptedAndRejectedTags or
mixedPhaseTags) wherever it is declared and used (the call to
releasecontroller.SortedRawReleaseTags and the subsequent getNonVerifiedTagsJira
invocation and any log messages) to make intent clear and update the log message
that references it (e.g., in klog.V(6).Infof) so names remain consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@cmd/release-controller/jira.go`:
- Around line 220-223: The local variable acceptedTags is misleading because it
actually contains both accepted and rejected phases; rename it (for example to
acceptedAndRejectedTags or mixedPhaseTags) wherever it is declared and used (the
call to releasecontroller.SortedRawReleaseTags and the subsequent
getNonVerifiedTagsJira invocation and any log messages) to make intent clear and
update the log message that references it (e.g., in klog.V(6).Infof) so names
remain consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1ef6272c-15a0-492a-a6ab-12dd49690d6b

📥 Commits

Reviewing files that changed from the base of the PR and between 6dda498 and 35f5074.

📒 Files selected for processing (1)
  • cmd/release-controller/jira.go

@bradmwilliams
Copy link
Copy Markdown
Collaborator

/hold
I have concerns that need to be discussed/addressed before this can merge

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 3, 2026
The message 'Fix included in accepted release X' was inaccurate when
the fix is included in a rejected payload. Changed to 'Fix included
in release X' which is correct for both accepted and rejected payloads.
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/jira/jira.go`:
- Line 110: The new message variable (message := fmt.Sprintf("Fix included in
release %s", tagName)) uses updated wording but commentOnPR's dedupe only
matches the new literal, so existing comments using the legacy "accepted
release" wording can cause duplicate bot comments; update the dedupe logic in
commentOnPR (or the dedupe helper it calls) to consider both the new and legacy
message variants (e.g., by checking a regex or normalizing content) or normalize
existing comments before comparison so that messages containing either "Fix
included in release %s" or the prior "accepted release" phrasing with tagName
are treated as identical.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f0939932-f4e1-4a12-a19e-ed44411fb962

📥 Commits

Reviewing files that changed from the base of the PR and between 35f5074 and d808751.

📒 Files selected for processing (2)
  • pkg/jira/jira.go
  • pkg/jira/jira_test.go
✅ Files skipped from review due to trivial changes (1)
  • pkg/jira/jira_test.go

After renaming 'Fix included in accepted release' to 'Fix included in
release', the commentOnPR dedupe check would no longer match existing
comments using the old wording, causing duplicate bot comments on reruns.
Check both the new and legacy message variants to avoid duplicates.
// confirms that all blocking tests have been executed (accepted or rejected) and that the code
// fix is present in the payload, allowing the bug status to be automatically transitioned to
// VERIFIED and notifying assignees which payload contains their fix.
acceptedTags := releasecontroller.SortedRawReleaseTags(release, releasecontroller.ReleasePhaseAccepted, releasecontroller.ReleasePhaseRejected)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer just acceptedTags

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to completedTags to better reflect that both accepted and rejected phase tags are included.

Comment on lines +97 to +99
legacyMessage := strings.Replace(message, "in release ", "in accepted release ", 1)
for _, comment := range comments {
if strings.Contains(comment.Body, message) {
if strings.Contains(comment.Body, message) || strings.Contains(comment.Body, legacyMessage) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a test for this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added TestCommentOnPRLegacyDedupe to verify that commentOnPR does not post a duplicate comment when an existing PR comment uses the legacy "Fix included in accepted release" wording.

- Rename acceptedTags to completedTags to better reflect that the slice
  contains both accepted and rejected phase tags (i.e. tags that have
  completed their blocking test cycle)
- Add TestCommentOnPRLegacyDedupe to verify that commentOnPR does not
  post duplicate comments when an existing comment uses the legacy
  'Fix included in accepted release' wording
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 4, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rioliu-rh
Once this PR has been reviewed and has the lgtm label, please ask for approval from bradmwilliams. 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
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 4, 2026

@rioliu-rh: 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.

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants