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

nomad job tag CLI command scaffolding #23846

Closed
Tracked by #23794
philrenaud opened this issue Aug 20, 2024 · 1 comment
Closed
Tracked by #23794

nomad job tag CLI command scaffolding #23846

philrenaud opened this issue Aug 20, 2024 · 1 comment
Assignees
Labels
theme/golden-versions Tagging and preserving job versions

Comments

@philrenaud
Copy link
Contributor

Nomad should implement a new nomad job tag command and equivalent POST /v1/job/:job_id/versions endpoint with the following capabilities:

  • nomad job tag -version 3 -name "high-traffic-variant" $jobname

    • Adds the TaggedVersion object to the $jobname job at version 3, with a name of high-traffic-variant
  • nomad job tag -name "burrito-promo-variant" $jobname

    • Adds the TaggedVersion object to the $jobname job at the latest version, with a name of burrito-promo-variant
  • nomad job tag -D -name “low-latency-variant” $jobname

    • Finds the version of $jobname with TaggedVersion.name corresponding to low-latency-variant and deletes that TaggedVersion block, allowing the garbage collector to remove the job at next run.
  • nomad job run -tag “golden” $file.nomad.hcl

    • Submits a job with the details provided in $file (say, with an id of “my-job”)
    • Adds the TaggedVersion object to the job with a name of golden (preventing future versions from rendering it garbage-collectable, and making it diff-able)
@philrenaud philrenaud added the theme/golden-versions Tagging and preserving job versions label Aug 20, 2024
@philrenaud philrenaud self-assigned this Aug 20, 2024
@philrenaud philrenaud mentioned this issue Aug 20, 2024
21 tasks
@philrenaud
Copy link
Contributor Author

Resolved in #23863

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/golden-versions Tagging and preserving job versions
Projects
None yet
Development

No branches or pull requests

1 participant