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

event stream JobDeregister event does not include purge flag #24618

Open
tgross opened this issue Dec 6, 2024 · 2 comments
Open

event stream JobDeregister event does not include purge flag #24618

tgross opened this issue Dec 6, 2024 · 2 comments
Labels

Comments

@tgross
Copy link
Member

tgross commented Dec 6, 2024

When a job is stopped, the event stream emits a JobDeregister event on the Job topic. But this event for whatever reason doesn't include the Purge flag that was included in the RPC request. This would be useful for post-hoc forensics, as described in #24147

@DamianArado
Copy link

Hi @tgross continuing from our earlier discussions in #24147

Will including Purge flag help us differentiate b/w jobs which are stopped and jobs which are purged?

Will this be included somewhere in the event stream's JSON?

Ex.

curl -s -v -N http://127.0.0.1:4646/v1/event/stream?topic=Job
{
  "Topic": "Job",
  "Type": "JobDeregistered",
  "Key": "<>",
  "Namespace": "default",
  "FilterKeys": null,
  "Index": 7816899,
  "Payload": {
    "Job": {
      "Stop": true,
      "Region": "global",
      "Namespace": "default",
      "ID": "<>",
      "ParentID": "",
      "Name": "<>",
      "Type": "service",
      "Priority": 50,
      "AllAtOnce": false,
      "Datacenters": [
        "dc1"
      ],
      "NodePool": "<>",
-----------
----------- more json-------
----------
      "CreateIndex": 1507847,
      "ModifyIndex": 7816899,
      "JobModifyIndex": 7816899
    }
  }
}

@tgross
Copy link
Member Author

tgross commented Dec 12, 2024

Will including Purge flag help us differentiate b/w jobs which are stopped and jobs which are purged?
Will this be included somewhere in the event stream's JSON?

Yes, that would be its purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants