-
Notifications
You must be signed in to change notification settings - Fork 534
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
Cl2: Make CL2_* envs available in templates #921
Conversation
This will be needed for #906 |
"regexp" | ||
"strings" | ||
"sync" | ||
"text/template" | ||
|
||
goErrors "github.com/go-errors/errors" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convention is to use small letters only for aliases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
In the ideal world we'd have a lint check for such things.
@oxddr, you were looking at some golint alternatives, right? Would it be possible to configure them to detect such things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enforcing naming convention could be done using the current linter. However we have many violations in our codebase, so I've put the change turning them on on hold.
I will have a look at it again in spare time.
This will make all env variables starting with CL2_ prefix available in the CL2 template files. It will allow us to leverage the presets mechanism in cl2 templates and use it instead of relying on cumbersome test override files (in some cases). The problem it solves is that sometimes we want to set something for almost all (but not all tests) tests. Currently, the only way to do that is the create an override file and pass it to many test definitions. This is cumbersome for many reasons, e.g. it requires at least 2 PRs (one to perf-test with the override file, second to test-infra).
e3f9d8a
to
75dfad9
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mm4tt, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This will make all env variables starting with CL2_ prefix available in the CL2 template files.
It will allow us to leverage the presets mechanism in cl2 templates and (in some cases) use it instead of relying on cumbersome test override files.
The problem it solves is that sometimes we want to set something for almost all (but not all tests) tests.
Currently, the only way to do that is the create an override file and pass it to many test definitions.
This is arduous for many reasons, e.g. it requires at least 2 PRs (one to perf-test with the override file, second to test-infra) and it requires keeping many places in sync.