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

Update IsEmpty logic in finalizeClientTemplateConfig #11930

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

DerekStrickland
Copy link
Contributor

@DerekStrickland DerekStrickland commented Jan 25, 2022

When parsing the new consul-template configuration parameters introduced in 1.2.4 , the finalizeClientTemplateConfig function failed to account for the pre-1.2.4 fields in its logic and set the ClientTemplateConfig to nil only if none of the new configuration options were set.

This PR:

  • Updates that logic to check the pre-1.2.4 fields
  • Adds negative tests to ensure configs without the new consul-template settings introduced in 1.2.4 can still parse.

Closes #11902

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM.

I'm going to nitpick the commit title though... aren't we adding more logic to the IsEmpty() method?

.changelog/11902.txt Outdated Show resolved Hide resolved
@DerekStrickland DerekStrickland changed the title Remove IsEmpty logic from finalizeClientTemplateConfig Update IsEmpty logic in finalizeClientTemplateConfig Jan 26, 2022
@DerekStrickland DerekStrickland force-pushed the b-fix-finalize-client-template-config branch from 560ffca to ad57527 Compare January 26, 2022 15:27
@vercel vercel bot temporarily deployed to Preview – nomad January 26, 2022 15:27 Inactive
Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

LGTM

@DerekStrickland DerekStrickland merged commit a30c7dd into main Jan 26, 2022
@DerekStrickland DerekStrickland deleted the b-fix-finalize-client-template-config branch January 26, 2022 16:31
@tgross tgross added this to the 1.2.5 milestone Jan 26, 2022
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nomad v1.2.4 template source path escapes alloc directory
4 participants