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

Allow specification of a custom job name/prefix for parameterized jobs #13594

Closed
pratheekrebala opened this issue Jul 5, 2022 · 7 comments · Fixed by #14631
Closed

Allow specification of a custom job name/prefix for parameterized jobs #13594

pratheekrebala opened this issue Jul 5, 2022 · 7 comments · Fixed by #14631
Labels
good first issue help-wanted We encourage community PRs for these issues! stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/batch Issues related to batch jobs and scheduling type/enhancement

Comments

@pratheekrebala
Copy link

pratheekrebala commented Jul 5, 2022

Proposal

Currently, when a parameterized job is dispatched, the jobId of the child job is generated using a fixed template as described here:

nomad/nomad/structs/structs.go

Lines 5398 to 5401 in 49270ed

func DispatchedID(templateID string, t time.Time) string {
u := uuid.Generate()[:8]
return fmt.Sprintf("%s%s%d-%s", templateID, DispatchLaunchSuffix, t.Unix(), u)
}

When running many versions of a parameterized job, tracking individual dispatches is hard.

I was wondering if it would be possible to allow specifying a optional "prefix" for an individual dispatch or the ability to specify a child job id as a template in the parent parameterized job. e.g.: ffmpeg-parameterized/dispatch-{prefix}-uuid

Use-cases

This would be helpful when using a parameterized job for multiple different clients or tasks, checking status of jobs either through the UI or through the CLI is difficult. Taking the ffmpeg sample task from the docs, this would allow a user to specify which project a specific dispatch might be associated with.

Attempted Solutions

I am currently using metadata fields to track this but this workflow is hard to use through the CLI and through the UI.

@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Jul 5, 2022
@tgross
Copy link
Member

tgross commented Jul 5, 2022

Hi @pratheekrebala! Something like this recently came up in an internal discussion and the thing that's somewhat important for a lot of the UX of dispatch jobs is that the names roughly by dispatch time. For small clusters this isn't a big deal but you can imagine that if you had thousands and thousands of dispatches of a job that having the CLI show you an effectively random chunk of them wouldn't be very nice.

That being said, it might be nice as an opt-in feature. It'd have to be a new field in the parameterized block. I'll mark this as an enhancement for roadmapping and also a project that might be good for a new contributor who wants to attempt the jobspec contributing checklist.

@tgross tgross moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Jul 5, 2022
@tgross tgross added stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/batch Issues related to batch jobs and scheduling help-wanted We encourage community PRs for these issues! good first issue labels Jul 5, 2022
@fumblehool
Copy link

Hi! @tgross
I've used Nomad and I really Love it!
I would love to work on this if nobody is currently working on this.
Please assign this to me 😄

@tgross
Copy link
Member

tgross commented Sep 19, 2022

All yours, @fumblehool! Take a look over the contributing guide and once you've made a PR we'll be happy to review it!

@geovannyAvelar
Copy link
Contributor

geovannyAvelar commented Sep 21, 2022

@fumblehool I'm so sorry. I worked on this issue without an assignment, my fault. I sent a PR yesterday, but don't worry, go ahead and send your PR. You assigned it first so it's all yours.

@tgross
Copy link
Member

tgross commented Sep 21, 2022

Oops, that happens! How about we review #14631 and maybe pull @fumblehool in for comments if they've already started work?

@tgross tgross moved this from Needs Roadmapping to In Progress in Nomad - Community Issues Triage Sep 21, 2022
@fumblehool
Copy link

No issues @geovannyAvelar.
Fortunately, I was planning to work on the weekend 😅

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue help-wanted We encourage community PRs for these issues! stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/batch Issues related to batch jobs and scheduling type/enhancement
Projects
Development

Successfully merging a pull request may close this issue.

4 participants