hashicorp / hashicorp/consul-template

document behavior of multiple templates with same command

Open
#1,448 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Go
Stars
4.8k
Forks
801
Avg merge
4h 5m
Merged PRs (30d)
6

Description

Document, probably in the Caveats->Command section, the case where if you have multiple templates with commands and they all have the same command (strings match) that command will only be run once even if multiple templates are successfully rendered (which would trigger the call to the command).

For reference, here is the main part of the code that does this...

https://github.com/hashicorp/consul-template/blob/166043f8559dfce55b1832f4c23f03e47c023931/manager/runner.go#L823-L833

This was brought up in #1440 as an issue that needed documenting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading manager/runner.go lines 823-833 to confirm how identical commands are handled when multiple templates render successfully. Add this behavior to the Caveats → Command documentation, explaining that a matching command runs only once, and verify the wording covers multiple templates.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.