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

bug: checkForTplFile checks wrong dir #7

Merged
merged 3 commits into from
Mar 29, 2021
Merged

bug: checkForTplFile checks wrong dir #7

merged 3 commits into from
Mar 29, 2021

Conversation

nguyening
Copy link
Collaborator

@nguyening nguyening commented Mar 25, 2021

Ran into this issue trying to create a $GROUP.tpl which wasn't getting picked up. Also, adds rendering errors to the log message for more troubleshooting.

What I expected:

a = "base.tpl"
b = "mygrp.tpl"

What I got:

a = "base.tpl"
b = "default.tpl"

Script to reproduce:

set -x
go install github.com/pietdaniel/ddmon@942bb4c

mkdir monitors
pushd monitors

mkdir output
mkdir --parents resources/templates
echo 'a = "base.tpl"' > resources/templates/base.tpl
echo 'b = "default.tpl"' > resources/templates/default.tpl
echo 'b = "mygrp.tpl"' > resources/templates/mygrp.tpl

mkdir --parents monitors/data/myns/mygrp
touch monitors/data/common.yaml
touch monitors/data/myns/common.yaml
touch monitors/data/myns/mygrp/common.yaml
touch monitors/data/myns/mygrp/mymonitor.yaml

ddmon generate --source-dir ./monitors --target-dir ./output --template-dir ./resources/templates
cat output/mygrp-mymonitor.tf
popd
rm -r monitors

Ran into this issue trying to create a $GROUP.tpl which wasn't getting
picked up. Also, adds rendering errors to the log message for more
troubleshooting.
@nguyening
Copy link
Collaborator Author

@pietdaniel

@pietdaniel
Copy link
Owner

can we bump changelog version

@pietdaniel pietdaniel merged commit 984686a into pietdaniel:master Mar 29, 2021
@nguyening nguyening deleted the rn/tpl-list-bug branch March 29, 2021 20:40
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.

2 participants