Skip to content

Fix PendingHotfixVersionReminder posting on every run#265

Merged
charlesprost merged 2 commits intomainfrom
fix/pending-hotfix-reminder-dedup
Apr 15, 2026
Merged

Fix PendingHotfixVersionReminder posting on every run#265
charlesprost merged 2 commits intomainfrom
fix/pending-hotfix-reminder-dedup

Conversation

@charlesprost
Copy link
Copy Markdown
Contributor

Summary

  • The standard dont_repeat_if_in_history dedup uses the full rendered message as the match key, which includes the active_options footer.
  • When active_options changes between runs (e.g. create_integration_branches is added), the footer differs → find_comment misses the existing comment → second post.
  • Confirmed from production logs on scality/docs-ring-s3c#3651: first post had no footer, second had *The following options are set:* **create_integration_branches**.
  • Fix: add an explicit title-prefix pre-check in _notify_pending_hotfix_if_needed using the stable heading # Pending hotfix branch, which is footer-independent.

Note: also bundles the NEVER_REPEAT=None bypass fix from main (commit 1c4f76c), since this branch diverges from that point.

Test plan

  • TestQueueing.test_dev_pr_reminder_about_pre_ga_hotfix passes
  • Full CI green
  • Verify on a real PR that the reminder only appears once even when active_options changes between runs

🤖 Generated with Claude Code

Two bugs caused the reminder to post more than once:

1. NEVER_REPEAT (None) bypassed the history check in _send_comment
   because `if None:` is falsy. Fixed with `!= 0` in the previous
   commit on main.

2. The standard dedup uses the full rendered message as the match key,
   which includes the active_options footer. When active_options changes
   between runs (e.g. create_integration_branches is added), the footer
   differs and find_comment misses the existing comment, causing a
   second post. Fixed by adding an explicit title-prefix pre-check in
   _notify_pending_hotfix_if_needed using the stable heading
   '# Pending hotfix branch', which is footer-independent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@charlesprost charlesprost requested a review from a team as a code owner April 15, 2026 11:30
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.28%. Comparing base (1c4f76c) to head (8bbb73d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #265      +/-   ##
==========================================
+ Coverage   89.19%   89.28%   +0.09%     
==========================================
  Files          77       77              
  Lines       10265    10287      +22     
==========================================
+ Hits         9156     9185      +29     
+ Misses       1109     1102       -7     
Flag Coverage Δ
integration 87.51% <50.00%> (-0.02%) ⬇️
tests 87.47% <50.00%> (-0.02%) ⬇️
tests-BuildFailedTest 26.79% <50.00%> (+<0.01%) ⬆️
tests-QuickTest 34.38% <50.00%> (-0.01%) ⬇️
tests-RepositoryTests 26.45% <50.00%> (+<0.01%) ⬆️
tests-TaskQueueTests 51.66% <50.00%> (-0.01%) ⬇️
tests-TestBertE 65.59% <50.00%> (-0.02%) ⬇️
tests-TestQueueing 53.90% <50.00%> (-0.01%) ⬇️
tests-api-mock 15.81% <0.00%> (-0.04%) ⬇️
tests-noqueue 77.63% <50.00%> (-0.02%) ⬇️
tests-noqueue-BuildFailedTest 26.79% <50.00%> (+<0.01%) ⬆️
tests-noqueue-QuickTest 34.38% <50.00%> (-0.01%) ⬇️
tests-noqueue-RepositoryTests 26.45% <50.00%> (+<0.01%) ⬆️
tests-noqueue-TaskQueueTests 51.66% <50.00%> (-0.01%) ⬇️
tests-noqueue-TestBertE 61.94% <50.00%> (-0.03%) ⬇️
tests-noqueue-TestQueueing 26.48% <50.00%> (+<0.01%) ⬆️
tests-server 29.12% <8.33%> (-0.06%) ⬇️
unittests 41.63% <100.00%> (+0.19%) ⬆️
utests 25.91% <100.00%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Cover the two paths added by the active_options footer fix:
- comment not yet in history → notify_user is called
- comment already in history → notify_user is skipped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@charlesprost charlesprost merged commit f955646 into main Apr 15, 2026
16 checks passed
@charlesprost charlesprost deleted the fix/pending-hotfix-reminder-dedup branch April 15, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant