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

Variable file overrides not working as intended #489

Open
dkyanakiev opened this issue Feb 29, 2024 · 0 comments
Open

Variable file overrides not working as intended #489

dkyanakiev opened this issue Feb 29, 2024 · 0 comments

Comments

@dkyanakiev
Copy link

Hi,

I have a specific question and a problem. When doing the poc initially before 0.1.0 - this behaviour worked as expected but I see it has changed and I'm trying see how to properly solve this issue.

In both parser (v1 and v2) - variable files are being sorted

The comment there is that its added for consistency but I cant understand the need for it.
Lets say we have 2 variable files
cluster-defaults.hcl

namespace="default"

team-defaults.hcl

namespace="team-two"

Now assuming once doing any commands we feed in multiple files with multiple var files.

nomad-pack render myjobpack -f cluster-defaults.hcl -f team-defaults.hcl

Before this worked as expected but now the files are sorted and you can't know which one overwrited which. Unlike all the other type of variables which have If the same key is supplied twice, the last wins. for them.

This can be bypassed if filenames are adjusted but there shouldn't be a need for it.

Was this added as an oversight or something that I might be missing as reason for it?

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

No branches or pull requests

1 participant