Skip to content

fix(ci): fix daily Sentry monitor slug and move crons off minute 0 - #717

Open
arne-aignx wants to merge 2 commits into
mainfrom
fix/sentry-daily-monitor-slug
Open

fix(ci): fix daily Sentry monitor slug and move crons off minute 0#717
arne-aignx wants to merge 2 commits into
mainfrom
fix/sentry-daily-monitor-slug

Conversation

@arne-aignx

@arne-aignx arne-aignx commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Why?
The scheduled-test monitoring raises false alerts for two reasons. (1) The daily workflow checks in to the Sentry cron monitor scheduled-testing-<env>-hourly with schedule 0 12 * * *, so each daily run overwrites the hourly monitor's schedule and the daily tests have no monitor of their own. (2) All scheduled crons fire at minute 0, which GitHub documents as the peak-load time when schedule events are delayed most; a 30-minute Sentry check-in margin then alerts on normal jitter.

How?
Change the daily monitor slug to scheduled-testing-<env>-daily (sentry-cli monitors run creates it on first check-in). Move the hourly test crons to minute 17, the daily test crons to 12:31 UTC, and the audit cron to minute 43; align the Sentry --schedule strings and raise --check-in-margin to 60. Update the schedule table and prose in .github/CLAUDE.md.

After merge (todo)

  • BetterStack: set the heartbeat period/grace of the hourly test monitors (staging, production) and the audit monitor to tolerate at least 60 minutes of delay, and move the daily monitors to 12:31 UTC.
  • Sentry: confirm the new scheduled-testing-<env>-daily monitors appear after the first daily run and that the -hourly monitors show schedule 17 * * * *.

The daily workflow checked in to the monitor slug
scheduled-testing-<env>-hourly with schedule "0 12 * * *". Each daily
run overwrote the hourly monitor's schedule, and the next hourly run set
it back. Use the slug scheduled-testing-<env>-daily instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@arne-aignx arne-aignx added the skip:test:long_running Skip long-running tests (≥5min) label Aug 28, 2026
@arne-aignx
arne-aignx marked this pull request as ready for review August 28, 2026 08:53
@arne-aignx
arne-aignx requested a review from a team as a code owner August 28, 2026 08:53
@claude

claude Bot commented Aug 28, 2026

Copy link
Copy Markdown

Claude finished @arne-aignx's task in 2m 2s —— View job


PR Review Complete: Fix Sentry Daily Monitor Slug ✅

Summary

This PR correctly fixes a Sentry monitor slug conflict where daily scheduled tests were checking into the hourly monitor, causing schedule flip-flops and spurious alerts.

Critical Checks

  • Conventional Commit: fix(ci): report daily scheduled tests to the daily Sentry monitor follows required format
  • No Breaking Changes: Internal monitoring configuration only
  • CI/CD Impact: Positive - resolves monitor slug conflicts
  • Consistency: Verified hourly workflow correctly uses -hourly with schedule 0 * * * *

Analysis

Changed: .github/workflows/_scheduled-test-daily.yml:263

- scheduled-testing-${{ inputs.platform_environment }}-hourly
+ scheduled-testing-${{ inputs.platform_environment }}-daily

Verification:

  • ✅ Daily workflow (0 12 * * *) now uses scheduled-testing-<env>-daily
  • ✅ Hourly workflow (0 * * * *) correctly uses scheduled-testing-<env>-hourly
  • ✅ Schedule parameter --schedule "0 12 * * *" matches the daily cron
  • sentry-cli monitors run auto-creates monitors on first check-in, so no manual Sentry setup needed

Why Documentation Update Not Required:
Sentry monitor slugs are internal implementation details. The .github/CLAUDE.md already documents the existence of hourly and daily scheduled tests (lines 151-156) and mentions BetterStack heartbeats. The parallel Sentry monitoring doesn't need explicit documentation at this level.

Findings

None! This is an excellent, minimal fix that:

  • Correctly identifies the root cause
  • Applies the minimal necessary change
  • Maintains consistency with existing patterns
  • Has no side effects or breaking changes

Recommendations

None - this PR is ready to merge as-is.


Verdict: ✅ claude:review:passed
| Branch: fix/sentry-daily-monitor-slug

@claude claude Bot added the claude:review:passed Automated Claude PR review found no blocking issues on the current head commit label Aug 28, 2026
…rgin

GitHub documents that schedule events are delayed most at the start of
every hour. Move the hourly test crons to minute 17, the daily test crons
to 12:31 UTC, and the audit cron to minute 43. Align the Sentry monitor
schedules and raise the check-in margin from 30 to 60 minutes so normal
scheduling jitter does not alert.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@arne-aignx arne-aignx changed the title fix(ci): report daily scheduled tests to the daily Sentry monitor fix(ci): fix daily Sentry monitor slug and move crons off minute 0 Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

❌ Your project check has failed because the head coverage (64.46%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (7c23819) and HEAD (48143c8). Click for more details.

HEAD has 17 uploads less than BASE
Flag BASE (7c23819) HEAD (48143c8)
18 1

see 24 files with indirect coverage changes

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

claude:review:passed Automated Claude PR review found no blocking issues on the current head commit skip:test:long_running Skip long-running tests (≥5min)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant