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

add dispatch idempotency token support in the CLI #10930

Merged
merged 5 commits into from
Oct 22, 2021
Merged

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Jul 22, 2021

Sample outputs:

$ nomad run dispatch.nomad
Job registration successful

$ nomad job dispatch --idempotency-token=1 dispatch
Dispatched Job ID = dispatch/dispatch-1634856177-4c79b169
Evaluation ID     = e70ffa47

==> 2021-10-21T18:42:57-04:00: Monitoring evaluation "e70ffa47"
    2021-10-21T18:42:57-04:00: Evaluation triggered by job "dispatch/dispatch-1634856177-4c79b169"
    2021-10-21T18:42:57-04:00: Allocation "704c7b95" created: node "d895588c", group "batch"
==> 2021-10-21T18:42:58-04:00: Monitoring evaluation "e70ffa47"
    2021-10-21T18:42:58-04:00: Evaluation status changed: "pending" -> "complete"
==> 2021-10-21T18:42:58-04:00: Evaluation "e70ffa47" finished with status "complete"

$ nomad job dispatch --idempotency-token=1 dispatch
Dispatched Job ID = dispatch/dispatch-1634856177-4c79b169

$ nomad job status dispatch/dispatch-1634856177-4c79b169
ID                = dispatch/dispatch-1634856177-4c79b169
Name              = dispatch/dispatch-1634856177-4c79b169
Submit Date       = 2021-10-21T18:42:57-04:00
Type              = batch
Priority          = 50
Datacenters       = dc1
Namespace         = default
Status            = running
Periodic          = false
Parameterized     = false
Idempotency Token = 1

Summary
Task Group  Queued  Starting  Running  Failed  Complete  Lost
batch       0       1         0        0       0         0

Allocations
ID        Node ID   Task Group  Version  Desired  Status   Created  Modified
704c7b95  d895588c  batch       0        run      pending  10s ago  6s ago

Closes #10641

api/jobs.go Outdated Show resolved Hide resolved
command/job_dispatch.go Outdated Show resolved Hide resolved
Copy link
Contributor

@DerekStrickland DerekStrickland left a comment

Choose a reason for hiding this comment

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

I have no current request for change, but I am following @notnoop 's discussion.

@lgfa29 lgfa29 assigned lgfa29 and unassigned lgfa29 Oct 15, 2021
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Idempotent Dispatch Key for Parameterized Jobs
4 participants