-
Notifications
You must be signed in to change notification settings - Fork 121
Add warning when an invalid value is specified for enum field #3050
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
Merged
Conversation
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
Collaborator
6 failing tests:
|
shreyas-goenka
commented
Jul 25, 2025
bundle/config/validate/enum.go
Outdated
|
|
||
| // Check if the value is in the list of valid enum values | ||
| validValue := false | ||
| for _, valid := range validValues { |
Contributor
Author
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 know this is not efficient, and should ideally be a set or a map. But given that these lists only have 1-10 elements, the CPU time here will not make a difference in practice at all.
denik
approved these changes
Aug 8, 2025
deco-sdk-tagging bot
added a commit
that referenced
this pull request
Aug 13, 2025
## Release v0.264.0 ### Dependency updates * Upgrade TF provider to 1.86.0 ([#3374](#3374)) * Update Go SDK to 0.79.0 ([#3376](#3376)) ### CLI * Fixed panic when providing a CLI command with an incorrect JSON input ([#3398](#3398)) ### Bundles * Changed logic for resolving `${resources...}` references. Previously this would be done by terraform at deploy time. Now if it references a field that is present in the config, it will be done by DABs during bundle loading ([#3370](#3370)) * Add support for tagging pipelines ([#3086](#3086)) * Add warning for when an invalid value is specified for an enum field ([#3050](#3050)) * Add support for running specified job tasks instead of all job tasks ([#3388](#3388))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
This PR mirrors the validation we added for required fields not being set: #3044
Tests
A new acceptance test.