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
events: emit event when job is deleted #19903
Conversation
When jobs are deregistered with the `purge` flag they are immediately deleted from the state store instead of just updated to be marked as stopped. Without tracking job deletions the event stream would not receive a `JobDeregistered` event when `purge` was set.
@@ -726,7 +726,7 @@ func TestEventsFromChanges_WithDeletion(t *testing.T) { | |||
event := eventsFromChanges(nil, changes) | |||
require.NotNil(t, event) | |||
|
|||
require.Len(t, event.Events, 1) | |||
require.Len(t, event.Events, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was testing something else (5e34efa), but incidentally assumed that a job deletion would not generate an event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
When jobs are deregistered with the `purge` flag they are immediately deleted from the state store instead of just updated to be marked as stopped. Without tracking job deletions the event stream would not receive a `JobDeregistered` event when `purge` was set.
When jobs are deregistered with the `purge` flag they are immediately deleted from the state store instead of just updated to be marked as stopped. Without tracking job deletions the event stream would not receive a `JobDeregistered` event when `purge` was set.
When jobs are deregistered with the
purge
flag they are immediately deleted from the state store instead of just updated to be marked as stopped.Without tracking job deletions the event stream would not receive a
JobDeregistered
event whenpurge
was set.Ref. #19834