Backport of [ui] bugfix: when hitting the "start" button on a job page, if it has no submission data, fallback to raw json definition into release/1.6.x #18625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #18621 to be assessed for backporting due to the inclusion of the label backport/1.6.x.
The below text is copied from the body of the original PR.
In Nomad 1.6, we introduced HCL-in-the-UI using a new /submissions endpoint among other things.
Shortly after the release, we realized we missed a spot: stop/starting via the UI would not maintain the submission data. My initial fix for this solved the issue of maintaining HCL, but caused a new bug: jobs that lacked submission data (perhaps they were submitted via curl with just the json spec, and without HCL) would 404 on /submission and fail to progress through to /parse and submit.
This PR provides a fallback to the initial method in cases where the /submission request fails.
Resolves #18547
Resolves #18536
Overview of commits