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

vdk-core: detect non vdk_ prefixed environment values for config #874

Merged
merged 3 commits into from
Jun 23, 2022

Conversation

antoniivanov
Copy link
Collaborator

Currently user need to set VDK_ + config name as environment variable so
VDK can recognize it. The idea was to avoid conflicts with similarly
named env variables. But this proved to be very error prone where users
tend to forget or get confused on where vdk_ prefix is needed and where
it is not.

This is solved by allowing non-prefixed env variable to be set.

For for configuration "team"

Now if "VDK_TEAM" is set as environment variable is set it is used (as
before)
If it is not set but "TEAM" is set as env variable, it is now used.

Prefixed variables do have higher priority.

Testing Done: unit test

Signed-off-by: Antoni Ivanov [email protected]

Currently user need to set VDK_ + config name as environment variable so
VDK  can recognize it. The idea was to avoid conflicts with similarly
named env variables. But this proved to be very error prone where users
tend to forget or get confused on where vdk_ prefix is needed and where
it is not.

This is solved by allowing non-prefixed env variable to be set.

For for configuration "team"

Now if "VDK_TEAM" is set as environment variable is set it is used (as
before)
If it is not set but "TEAM" is set as env variable, it is now used.

Prefixed variables do have higher priority.

Testing Done: unit test

Signed-off-by: Antoni Ivanov <[email protected]>
Copy link
Contributor

@doks5 doks5 left a comment

Choose a reason for hiding this comment

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

Overall, LGTM

@antoniivanov antoniivanov enabled auto-merge (squash) June 23, 2022 08:01
@antoniivanov antoniivanov merged commit 8bc6a96 into main Jun 23, 2022
@antoniivanov antoniivanov deleted the person/aivanov/vdk-config branch June 23, 2022 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants