Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(crons): Implement fallback clock pulse task #54647

Conversation

evanpurkhiser
Copy link
Member

This is the last piece of GH-53661 to ensure tasks are triggered in scenarios where there is not enough volume.

@evanpurkhiser evanpurkhiser requested a review from a team as a code owner August 11, 2023 20:10
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 11, 2023
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #54647 (d637f22) into master (43088e2) will decrease coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 60.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #54647      +/-   ##
==========================================
- Coverage   79.78%   79.77%   -0.01%     
==========================================
  Files        5000     5000              
  Lines      212248   212271      +23     
  Branches    36162    36164       +2     
==========================================
+ Hits       169340   169348       +8     
- Misses      37700    37712      +12     
- Partials     5208     5211       +3     
Files Changed Coverage Δ
src/sentry/conf/server.py 91.63% <ø> (ø)
src/sentry/monitors/tasks.py 77.39% <60.86%> (-4.14%) ⬇️

... and 7 files with indirect coverage changes

@@ -129,6 +146,30 @@ def try_monitor_tasks_trigger(ts: datetime):
_dispatch_tasks(ts)


@instrumented_task(name="sentry.monitors.tasks.clock_pulse", silo_mode=SiloMode.REGION)
def clock_pulse(current_datetime=None):
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this run conditionally based on a setting?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, as per fillipos comment #53661 (comment), we decided to just always have it run. Then we don't have a "high" or "low" volume mode. it is just adaptive.

Copy link
Member

Choose a reason for hiding this comment

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

If this is running all the time then doesn't it break the case where there's an ingest backlog?

Copy link
Member Author

Choose a reason for hiding this comment

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

No because it is still putting the message into the kafka topic, thus into the queue.

This would be problematic if we turned off producers (relay)

@evanpurkhiser evanpurkhiser merged commit d33ae7f into master Aug 15, 2023
57 of 58 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/feat-crons-implement-fallback-clock-pulse-task branch August 15, 2023 16:26
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2023
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.

None yet

3 participants