Skip to content
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

Do not apply altsrc input values that are not set #1376

Merged
merged 6 commits into from Apr 26, 2022

Conversation

meatballhat
Copy link
Member

What type of PR is this?

  • bug

What this PR does / why we need it:

This fixes the behavior of applied altsrc inputs so that they are only applied if the matching key exists in the input.

Which issue(s) this PR fixes:

Fixes #1373

so that it doesn't extend the public surface area, instead focusing on
being a bugfix _only_.
@meatballhat meatballhat added kind/bug describes or fixes a bug kind/feature describes a code enhancement / feature request area/v2 relates to / is being considered for v2 labels Apr 26, 2022
@meatballhat meatballhat added this to the Release 2.4.x milestone Apr 26, 2022
@meatballhat meatballhat requested a review from a team as a code owner April 26, 2022 00:50
@meatballhat
Copy link
Member Author

Working on the codecov bit now 👍🏼

@meatballhat meatballhat merged commit e275e95 into main Apr 26, 2022
@meatballhat meatballhat deleted the duration-default-regression branch April 26, 2022 02:30
gesellix added a commit to gesellix/couchdb-prometheus-exporter that referenced this pull request May 26, 2022
Other file formats like JSON or YAML would provide more type information, and unmarshalling would create correct types. Properties files aren't that useful, so we have to enforce some types by ourselves. We have to keep an eye on other types beside boolean, but this one seems sufficient for now.

Relates to urfave/cli#1376, which made our previous workaround (see #81 and #83) fail due to a private function in the InputSourceContext interface.
gesellix added a commit to gesellix/couchdb-prometheus-exporter that referenced this pull request May 26, 2022
Other file formats like JSON or YAML would provide more type information, and unmarshalling would create correct types. Properties files aren't that useful, so we have to enforce some types by ourselves. We have to keep an eye on other types beside boolean, but this one seems sufficient for now.

Relates to urfave/cli#1376, which made our previous workaround (see #81 and #83) fail due to a private function in the InputSourceContext interface.
gesellix added a commit to gesellix/couchdb-prometheus-exporter that referenced this pull request May 26, 2022
Other file formats like JSON or YAML would provide more type information, and unmarshalling would create correct types. Properties files aren't that useful, so we have to enforce some types by ourselves. We have to keep an eye on other types beside boolean, but this one seems sufficient for now.

Relates to urfave/cli#1376, which made our previous workaround (see #81 and #83) fail due to a private function in the InputSourceContext interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v2 relates to / is being considered for v2 kind/bug describes or fixes a bug kind/feature describes a code enhancement / feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v2.4.8 breaks duration default
1 participant