generated from ni/github-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Discovery Client - Support "ClusterId" environment variable without prefix #247
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
Open
hunter-ni
wants to merge
5
commits into
main
Choose a base branch
from
users/hunter-ni/clusterid-env-var
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3721774
Support "CLUSTERID" without the prefix.
hunter-ni a469263
Add comment about OS
hunter-ni c42d7a0
Update comment
hunter-ni fddce5e
Merge branch 'main' into users/hunter-ni/clusterid-env-var
hunter-ni 41e5abd
Make environment variable specification use Pascal Case for consisten…
hunter-ni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
How do we document this for users? If we use shout-case there, then all OSes have the same casing for this variable and we can use
os.environdirectly.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.
I believe @nick-beer's original comment (precipitating this change + comment) was that we would want to match here whatever the Discovery Service itself would be anticipated to actually support, which would be the environment variable of this given name (with optional prefix) irrespective of case. I don't have any specific insight on the question of existing documentation.
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.
If the server is going to use PascalCase, then you're better off using PascalCase in the Python and LV packages so that it works regardless of whether environment variables are case-sensitive or case-insensitive. However, a lot of software avoids this situation by using all-caps for environment variables everywhere.
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.
To summarize (and confirm that I'm on the same page):
Nick's comment indicates that the Discovery Service itself is explicitly designed to look for this environment variable in a case-insensitive manner (regardless of operating system). To your point though, existing Discovery Service code does use PascalCase when it needs to reference
ClusterIdand theNIDiscoveryprefix, so we can use that casing here for consistency with the server code.