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

Only initialize task.VolumeMounts when not-nil #10990

Merged
merged 2 commits into from
Aug 2, 2021
Merged

Conversation

notnoop
Copy link
Contributor

@notnoop notnoop commented Aug 2, 2021

1.1.3 had a bug where task.VolumeMounts will be an empty slice instead of nil. Eventually, it gets canonicalized and is set to nil, but it seems to confuse dry-run planning.

The regression was introduced in https://github.com/hashicorp/nomad/pull/10855/files#diff-56b3c82fcbc857f8fb93a903f1610f6e6859b3610a4eddf92bad9ea27fdc85ecL1028-R1037 . Curiously, it's the only place where len(apiTask.VolumeMounts) check was dropped. I assume it was dropped accidentally.

Fixes #10981

1.1.3 had a bug where task.VolumeMounts will be an empty slice instead
  of nil. Eventually, it gets canonicalized and is set to `nil`, but it
seems to confuse dry-run planning.
@notnoop notnoop requested a review from jrasell August 2, 2021 13:27
@notnoop notnoop self-assigned this Aug 2, 2021
@notnoop notnoop added this to the 1.1.3 milestone Aug 2, 2021
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @notnoop!

@vercel vercel bot temporarily deployed to Preview – nomad August 2, 2021 17:07 Inactive
@notnoop notnoop merged commit 52c37e1 into main Aug 2, 2021
@notnoop notnoop deleted the b-nil-volume-mounts branch August 2, 2021 17:08
notnoop pushed a commit that referenced this pull request Aug 26, 2021
1.1.3 had a bug where task.VolumeMounts will be an empty slice instead of nil. Eventually, it gets canonicalized and is set to `nil`, but it seems to confuse dry-run planning.

The regression was introduced in https://github.com/hashicorp/nomad/pull/10855/files#diff-56b3c82fcbc857f8fb93a903f1610f6e6859b3610a4eddf92bad9ea27fdc85ecL1028-R1037 . Curiously, it's the only place where `len(apiTask.VolumeMounts)` check was dropped. I assume it was dropped accidentally.

Fixes #10981
notnoop pushed a commit that referenced this pull request Aug 26, 2021
1.1.3 had a bug where task.VolumeMounts will be an empty slice instead of nil. Eventually, it gets canonicalized and is set to `nil`, but it seems to confuse dry-run planning.

The regression was introduced in https://github.com/hashicorp/nomad/pull/10855/files#diff-56b3c82fcbc857f8fb93a903f1610f6e6859b3610a4eddf92bad9ea27fdc85ecL1028-R1037 . Curiously, it's the only place where `len(apiTask.VolumeMounts)` check was dropped. I assume it was dropped accidentally.

Fixes #10981
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent behaviour adding the same job twice or updating without any change.
4 participants