-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Periodic Parameterized Batch behavior #24311
Comments
Heya, thanks for the report! Just in case you haven't seen this, you may consider HCL variables, which may or may not suit your needs. It's not uncommon to run whole separate batch jobs using variables instead of parameters, with pros and cons in either direction, but as for this particular issue: As you mention in your Update, a sorta-hidden hierarchy comes into play when you combine parameterized and periodic job blocks. To rephrase your findings, when you So the relationship is:
I don't know all of the history for why this is the case, but my thinking is: a batch job that takes no parameters and can be either run on a cron or run on demand is just a At any rate, I can see how this is not obvious behavior 😋. I don't think our docs explain it well (or at all?), and you're also right that the web UI doesn't handle it very well. There is a way to get to it in the UI -- the Evaluations page should have a link to what I'll call the "grandchild" job (provided it has not been garbage collected), or you can formulate the URL manually, but that's not exactly obvious, either. So I do think we could stand to improve those 2 things: Docs and the UI presentation. |
I put in #24338 for the web UI side, and I'll say this ticket can track the documentation updates. |
…ised and periodic (#24384) * docs: expand on documentation about jobs that are both parameterized and periodic * fix: typo * docs: expand on the example * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Daniel Bennett <[email protected]> * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Daniel Bennett <[email protected]> * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update website/content/docs/job-specification/periodic.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update website/content/docs/job-specification/periodic.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Aimee Ukasick <[email protected]> * style: improve the content with PR suggestions * periodic.mdx fix link to parameterized * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update parameterized.mdx * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update website/content/docs/job-specification/parameterized.mdx Co-authored-by: Aimee Ukasick <[email protected]> * Update parameterized.mdx --------- Co-authored-by: Daniel Bennett <[email protected]> Co-authored-by: Aimee Ukasick <[email protected]>
Nomad version
Nomad v1.9.1
BuildDate 2024-10-21T09:00:50Z
Revision d9ec23f
Operating system and Environment details
Ubuntu 22.04.5 LTS
Issue
A batch job that is both parameterized and periodic cannot be run. When invoking it as parameterized, it results in something like this:
When trying to force-launch it via the CLI: nomad job periodic force`
Reproduction steps
Expected Result
The job being able to run periodically (e.g. a daily sync) as well as on-demand (e.g. as a response to a webhook).
If this use-case is not supported (which would be sad), then at least the creating of such a parameterized periodic job should be blocked.
Actual Result
Neither of use-cases work - the job is not run at all.
Job file (if appropriate)
Nomad Server logs (if appropriate)
Nomad Client logs (if appropriate)
Update
I do seem to be able to periodic-force launch the parameterized job, resulting in some kind of a job like this:
Which does not show up in the web UI.
I can't argue against that use-case (creating a number of cronjobs, each with different dispatched payloads), but it's not quite what I'd expect, nor does the UI support that either.
The text was updated successfully, but these errors were encountered: