Skip to content

template: distinguish templates with identical contents but different destinations or sources#2096

Merged
pkazmierczak merged 3 commits intomainfrom
b-template-hash-include-src-dst
Oct 3, 2025
Merged

template: distinguish templates with identical contents but different destinations or sources#2096
pkazmierczak merged 3 commits intomainfrom
b-template-hash-include-src-dst

Conversation

@pkazmierczak
Copy link
Contributor

@pkazmierczak pkazmierczak commented Sep 26, 2025

Consul Template should distinguish templates that have the same body but
different sources or destinations. In cases where a slice of templates is
submitted to the runner with same contents and a dependency, templates with the
same contents body will effectively be "merged" into one. See
hashicorp/nomad#26800 for an example of a bug caused by this.

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@pkazmierczak pkazmierczak requested a review from tgross September 26, 2025 13:45
@pkazmierczak pkazmierczak self-assigned this Sep 26, 2025
@pkazmierczak pkazmierczak requested a review from a team as a code owner September 26, 2025 13:45
@pkazmierczak pkazmierczak added bug nomad Related to ingetration in Nomad go Pull requests that update Go code labels Sep 26, 2025
tgross
tgross previously approved these changes Sep 26, 2025
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! (Once we figure out why CI is failing)

Copy link
Contributor

@dduzgun-security dduzgun-security 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 for changing the md5 to sha256 part too.

Copy link

@kswap kswap left a comment

Choose a reason for hiding this comment

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

LGTM

@pkazmierczak pkazmierczak merged commit 5b62e5a into main Oct 3, 2025
71 of 78 checks passed
@pkazmierczak pkazmierczak deleted the b-template-hash-include-src-dst branch October 3, 2025 06:49
pkazmierczak added a commit to hashicorp/nomad that referenced this pull request Oct 3, 2025
pkazmierczak added a commit to hashicorp/nomad that referenced this pull request Oct 3, 2025
This pulls latest consul-template to include the
hashicorp/consul-template#2096 bugfix. Fixes
pkazmierczak added a commit to hashicorp/nomad that referenced this pull request Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug go Pull requests that update Go code nomad Related to ingetration in Nomad

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants