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

Backport of fix(#13844): canonicalize job to avoid nil pointer deference into release/1.3.x #16016

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #13845 to be assessed for backporting due to the inclusion of the label backport/1.3.x.

The below text is copied from the body of the original PR.


I am new to this codebase, so unsure I have the best approach, but this fixes my issue in #13844. I traced the issue down to the nil pointer here, which is called from this path.

This code is called after the job registration succeeds on the server. I believe the root of the issue is that when submitting an API job via the CLI, it is canonicalized server-side, but not client-side. Registration succeeds on the server, and then this code path is called. It references paths that have not been canonicalized with their default values, and fails.

Another option would be to canonicalize the job before registration (maybe in the JobGetter when loading the job?), but being new to the codebase, I am wary of the unintended change in behavior that might create for endusers.

@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 7997107 into release/1.3.x Feb 1, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/fix-13844/lightly-exotic-llama branch February 1, 2023 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants