Skip to content

Conversation

lynnagara
Copy link
Member

Retry #78868, this time with separate config
for region and control silo

…nto 3 (#78868)""

Retry #78868, this time with separate config
for region and control silo
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 10, 2024
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/conf/server.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #78889      +/-   ##
==========================================
- Coverage   78.27%   78.25%   -0.02%     
==========================================
  Files        7122     7125       +3     
  Lines      313583   313629      +46     
  Branches    51178    51189      +11     
==========================================
- Hits       245452   245438      -14     
- Misses      61712    61759      +47     
- Partials     6419     6432      +13     

Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Looks good to me. Using server.conf to minimize the number of places is one suggestion I had.

Comment on lines 79 to 82
if SiloMode.get_current_mode() == SiloMode.CONTROL:
split_task_routes = {}
else:
split_task_routes = settings.CELERY_SPLIT_QUEUE_TASK_ROUTES_REGION
Copy link
Member

Choose a reason for hiding this comment

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

If you wanted to avoid this you could set settings.CELERY_SPLIT_QUEUE_TASK_ROUTES in server.py in the existing conditional blocks based on the silo mode.

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, updated

Copy link
Contributor

@fpacifici fpacifici left a comment

Choose a reason for hiding this comment

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

Do we have a place in the code base where we can validate the config and prevent a pod from starting with an invalid config?

My mistake when I implemented the router was to conclude Celery would instantiate the router at Sentry initialization https://github.com/getsentry/sentry/blob/master/src/sentry/celery.py#L127-L129 .

Though it seems that happened lazily thus we would see failures only when we would try to send messages.
I think we should make celery fail earlier if there is a bad configuration.

Consider creating the queues during Celery initialization as a follow up.

@lynnagara lynnagara enabled auto-merge (squash) October 10, 2024 17:31
@lynnagara lynnagara merged commit 429ccf6 into master Oct 10, 2024
49 checks passed
@lynnagara lynnagara deleted the retry-split-transaction branch October 10, 2024 17:48
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants