events: add field to job events to detect deregister vs delete#27614
Merged
events: add field to job events to detect deregister vs delete#27614
Conversation
Most objects are simply deleted from the state store once the user deletes them or they're GC'd, but jobs can be either deregistered (stopped) or deleted (purged). Because both happen with the same Raft log type, we emit identical events to the event stream for both. Add a `Purge` flag to the job event to differentiate between the two. Ref: https://hashicorp.atlassian.net/browse/NMD-366 Fixes: #24618
fa5cb2d to
9fcd521
Compare
tgross
commented
Feb 27, 2026
Member
|
Will there be a follow-up PR to modify the |
Member
Author
Honestly, I'd forgotten there was any code at all in the |
gulducat
reviewed
Mar 4, 2026
Member
gulducat
left a comment
There was a problem hiding this comment.
woops, just realized I hadn't sent this when I reviewed earlier
|
|
||
| func TestEventsFromChanges_JobDeregisterRequestType(t *testing.T) { | ||
| t.SkipNow() | ||
| } |
Member
Author
There wasn't a way to backwards-compatibly update the |
e03675a to
8e5f9f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most objects are simply deleted from the state store once the user deletes them or they're GC'd, but jobs can be either deregistered (stopped) or deleted (purged). Because both happen with the same Raft log type, we emit identical events to the event stream for both. Add a
Purgeflag to the job event to differentiate between the two.Ref: https://hashicorp.atlassian.net/browse/NMD-366
Fixes: #24618
Generative AI disclosure: I used IBM Bob to generate much of this changeset. All code has been reviewed by me and tested end-to-end on a real cluster. Commit message by humans for humans, of course.
Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.