fix(seer): Pre-filter night-shift schedule by SeerProjectRepository#114451
Merged
fix(seer): Pre-filter night-shift schedule by SeerProjectRepository#114451
Conversation
The daily schedule_night_shift cron was iterating every active org and running a 3-feature batch_has_for_organizations check against each one, which fans out a per-org subscription RPC inside the flagpole evaluator. For Sentry-scale org counts that fanout exceeded the 15-minute task processing deadline, so the cron never reached the schedule_complete log and never dispatched any per-org workers. Restrict the candidate set up front to orgs that have at least one project with a SeerProjectRepository (the prerequisite for any night-shift work), then run the existing feature flag gate over that much smaller set. The repo rows can outlive a paid Seer subscription, so the feature flag check is still required. Fixes SENTRY-5NQ2 Co-Authored-By: Claude <noreply@anthropic.com>
The pre-filter shrinks the org set ~10x but still leaves ~12.5k orgs in the per-org subscription RPC fanout under feature flag eval. Bumping the processing deadline to 30 minutes — matching the sibling schedule_context_engine_indexing_tasks task in the same namespace — gives ~2x headroom against transient cell-side slowness. Refs SENTRY-5NQ2 Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit d76d959.
chromy
approved these changes
Apr 30, 2026
This reverts commit 3f49341.
3 tasks
cleptric
pushed a commit
that referenced
this pull request
May 5, 2026
…114451) The daily `schedule_night_shift` cron was iterating every active org and running a 3-feature `batch_has_for_organizations` check against each one, which fans out a per-org subscription RPC inside the flagpole evaluator. The fanout exceeded the 15-minute task deadline, so the cron never reached `schedule_complete` and never dispatched any per-org workers. Restrict the candidate set up front to orgs that have at least one project with a `SeerProjectRepository` — the prerequisite for any night-shift work — then run the existing feature flag gate over that much smaller set. Repo rows can outlive a paid Seer subscription, so the feature flag check stays. Fixes SENTRY-5NQ2 --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The daily
schedule_night_shiftcron was iterating every active org and running a 3-featurebatch_has_for_organizationscheck against each one, which fans out a per-org subscription RPC inside the flagpole evaluator. The fanout exceeded the 15-minute task deadline, so the cron never reachedschedule_completeand never dispatched any per-org workers.Restrict the candidate set up front to orgs that have at least one project with a
SeerProjectRepository— the prerequisite for any night-shift work — then run the existing feature flag gate over that much smaller set. Repo rows can outlive a paid Seer subscription, so the feature flag check stays.Fixes SENTRY-5NQ2