-
Notifications
You must be signed in to change notification settings - Fork 896
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
Explicitly allow fail-fast for invalid enum values #2766
Closed
+3
−1
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
983dcc2
Allow fail-fast for invalid enum values
pellared ccd572c
Update sdk-environment-variables.md
pellared bbf77b8
Merge branch 'main' into patch-2
pellared 8b28ee8
Update sdk-environment-variables.md
pellared 6ccd795
Merge branch 'main' into patch-2
pellared c581dd4
Update specification/sdk-environment-variables.md
pellared 39b5b2f
Merge branch 'main' into patch-2
pellared 3e4ee9f
Merge branch 'main' into patch-2
pellared 4bab8e3
Merge branch 'main' into patch-2
pellared dfa63f1
Merge branch 'main' into patch-2
pellared a3e22b9
Merge branch 'main' into patch-2
pellared ca5baf8
Merge branch 'main' into patch-2
pellared 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,9 @@ If an SDK chooses to support an integer-valued environment variable, it SHOULD s | |
### Enum value | ||
|
||
For variables which accept a known value out of a set, i.e., an enum value, SDK implementations MAY support additional values not listed here. | ||
For variables accepting an enum value, if the user provides a value the SDK does not recognize, the SDK MUST generate a warning and gracefully ignore the setting. | ||
For variables accepting an enum value, if the user provides a value the SDK does not recognize, | ||
the SDK MUST generate a warning and gracefully ignore the setting, | ||
or _fail fast_ and cause the application to fail at startup, but MUST NOT cause the application to fail later at run time. | ||
pellared marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this change is necessary - #2817 (comment) |
||
|
||
If a null object (empty, no-op) value is acceptable, then the enum value representing it MUST be `"none"`. | ||
|
||
|
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.
I am not sure why this behavior is only under Enum values, shouldn't there be a common error behavior for all env values? What if integer var is set to
blah
?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 was thinking about it as well, but I want to avoid scope creep in this PR. Even right now it is not clear how to proceed