-
Notifications
You must be signed in to change notification settings - Fork 92
fix: config option flags sometimes not parsed correctly #1025
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
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
left a comment
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.
Could we have a test to ensure the behavior is correct?
<!-- 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 <>
<!-- 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 <>
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