fix: config option flags sometimes not parsed correctly#1025
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1025 +/- ##
==========================================
- Coverage 70.18% 70.11% -0.07%
==========================================
Files 246 246
Lines 10815 10820 +5
==========================================
- Hits 7590 7586 -4
- Misses 2547 2553 +6
- Partials 678 681 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jooola
reviewed
Apr 4, 2025
Member
jooola
left a comment
There was a problem hiding this comment.
Could we have a test to ensure the behavior is correct?
jooola
approved these changes
Apr 4, 2025
phm07
pushed a commit
that referenced
this pull request
May 9, 2025
<!-- section-start changelog --> ### Features - **load-balancer**: allow specifying network on create (#1013) - **context**: add unset commmand (#1017) - publish image to Docker Hub (#1043) ### Bug Fixes - allow getting resources with number as name - some list flags are not correctly parsed (#987) - **load-balancer**: allow certificate names in addition to IDs when creating/updating (#1026) - config option flags sometimes not parsed correctly (#1025) <!-- section-end changelog --> --- <details> <summary><h4>PR by <a href="https://github.com/apricote/releaser-pleaser">releaser-pleaser</a> 🤖</h4></summary> If you want to modify the proposed release, add you overrides here. You can learn more about the options in the docs. ## Release Notes ### Prefix / Start This will be added to the start of the release notes. ```rp-prefix ``` ### Suffix / End This will be added to the end of the release notes. ```rp-suffix ``` </details> Co-authored-by: releaser-pleaser <>
This was referenced May 9, 2025
This was referenced May 22, 2025
phm07
pushed a commit
that referenced
this pull request
May 30, 2025
<!-- section-start changelog --> ### Features - **load-balancer**: allow specifying network on create (#1013) - **context**: add unset commmand (#1017) - publish image to Docker Hub (#1043) ### Bug Fixes - allow getting resources with number as name - some list flags are not correctly parsed (#987) - **load-balancer**: allow certificate names in addition to IDs when creating/updating (#1026) - config option flags sometimes not parsed correctly (#1025) <!-- section-end changelog --> --- <details> <summary><h4>PR by <a href="https://github.com/apricote/releaser-pleaser">releaser-pleaser</a> 🤖</h4></summary> If you want to modify the proposed release, add you overrides here. You can learn more about the options in the docs. ## Release Notes ### Prefix / Start This will be added to the start of the release notes. ```rp-prefix ``` ### Suffix / End This will be added to the end of the release notes. ```rp-suffix ``` </details> Co-authored-by: releaser-pleaser <>
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
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.
See #845 for a description of the error
While parsing the config's
FlagSet, if the parser reached a flag that was not a config option, it would terminate early and return an unknown flag error. Since the error was ignored silently, this behavior was not apparent to the user.This PR fixes this behavior by using the
ParseErrorsWhitelistto allow unknown flags in the config'sFlagSet. This also means we can now return any other parsing errors properly instead of ignoring them.Fixes #845