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

agent: Send last billing/scaling events before shutdown #1221

Merged
merged 6 commits into from
Feb 10, 2025

Conversation

sharnoff
Copy link
Member

@sharnoff sharnoff commented Jan 27, 2025

Follow-up to #1107, ref #1220.

In short, this change:

  1. Moves reporting.EventSink's event sender thread management into a new Run() method
  2. Calls (EventSink).Run() from (billing.MetricsCollector).Run(), appropriately canceling when done generating events, and waiting for it to finish before returning.
  3. Adds (scalingevents.Reporter).Run() that just calls the underlying (EventSink).Run(), and calls that in the entrypoint's taskgroup.

Or in other words, exactly what was suggested here: #1221 (comment)

@sharnoff sharnoff requested a review from Omrigan January 27, 2025 12:27
Copy link

github-actions bot commented Jan 27, 2025

No changes to the coverage.

HTML Report

Click to open

@sharnoff sharnoff self-assigned this Jan 28, 2025
Follow-up to #1107, ref #1220.

In short, this change:

1. Moves reporting.EventSink's event sender thread management into a new
   Run() method
2. Calls (EventSink).Run() from (billing.MetricsCollector).Run(),
   appropriately canceling when done generating events, and waiting for
   it to finish before returning.
3. Adds (scalingevents.Reporter).Run() that just calls the underlying
   (EventSink).Run(), and calls *that* in the entrypoint's taskgroup.

Or in other words, exactly what was suggested in this comment:
#1221 (comment)
@sharnoff sharnoff force-pushed the sharnoff/reporting-clean-shutdown branch from cafbcd4 to b4aed57 Compare January 28, 2025 20:07
@sharnoff sharnoff requested a review from Omrigan January 28, 2025 20:11
@sharnoff sharnoff assigned Omrigan and unassigned sharnoff Jan 28, 2025
@sharnoff sharnoff assigned sharnoff and unassigned Omrigan Feb 4, 2025
@sharnoff sharnoff assigned Omrigan and unassigned sharnoff Feb 10, 2025
@sharnoff sharnoff requested a review from Omrigan February 10, 2025 13:41
@sharnoff sharnoff enabled auto-merge (squash) February 10, 2025 23:42
@sharnoff sharnoff merged commit 55aff0e into main Feb 10, 2025
23 checks passed
@sharnoff sharnoff deleted the sharnoff/reporting-clean-shutdown branch February 10, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants