Skip to content

fix: Trigger ad-hoc explorer index runs#116530

Open
shruthilayaj wants to merge 3 commits into
masterfrom
shruthi/fix/trigger-explorer-index-in-outbox
Open

fix: Trigger ad-hoc explorer index runs#116530
shruthilayaj wants to merge 3 commits into
masterfrom
shruthi/fix/trigger-explorer-index-in-outbox

Conversation

@shruthilayaj
Copy link
Copy Markdown
Member

@shruthilayaj shruthilayaj commented May 29, 2026

The organizations:seer-run-mirror-explorer on SeerAgentClient.start_run meant
we weren't triggering the ad-hoc create explorer index tasks. This PR now calls the
index build tasks for explorer runs.

compute_delay was causing a circular import - so just moved that to a utils file

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 29, 2026
@shruthilayaj shruthilayaj marked this pull request as ready for review May 29, 2026 21:08
@shruthilayaj shruthilayaj requested review from a team as code owners May 29, 2026 21:08
@shruthilayaj shruthilayaj changed the title fix: Trigger Explorer index from outbox fix: Trigger ad-hoc explorer index runs May 29, 2026
@shruthilayaj shruthilayaj requested a review from trevor-e May 29, 2026 21:09
Comment thread src/sentry/tasks/utils.py
The index trigger dispatches Celery tasks that, in test environments
with CELERY_ALWAYS_EAGER, run synchronously and query the control DB
while the outbox drain transaction on the region DB is still open.
This causes CrossTransactionAssertionError in hybrid-cloud silo tests.

Wrap the trigger in transaction.on_commit so it fires after the outbox
transaction commits, matching the semantic intent (only trigger if
processing succeeded) and avoiding the cross-DB transaction violation.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants