Skip to content

fix: config parsing backward compatibility for time.Duration#67

Merged
kushsharma merged 1 commit intomainfrom
config-backward-compatibility
Jun 27, 2023
Merged

fix: config parsing backward compatibility for time.Duration#67
kushsharma merged 1 commit intomainfrom
config-backward-compatibility

Conversation

@kushsharma
Copy link
Copy Markdown
Member

@kushsharma kushsharma commented Jun 27, 2023

In last release, mapstructure decode overrides were introduced but by default, they were overriding the viper(library we use for config parsing) options of mapstructure decoding. Adding those options back would make this change backward compatible.

For example, in shield this is causing failure in parsing 10m as time.Duration type

@kushsharma kushsharma changed the title fix: config parsing backward compatibility for time.Duration [WIP] fix: config parsing backward compatibility for time.Duration Jun 27, 2023
@kushsharma kushsharma force-pushed the config-backward-compatibility branch 2 times, most recently from e7677f8 to 5ec2eaf Compare June 27, 2023 06:59
In last release, mapstructure decode overrides were introduced but by default
they were overriding the viper(library we use for config parsing) options of
mapstructure decoding. Adding those options back would make this change backward
compatible.

For example, in shield this is causing failure in parsing "10m" as time.Duration type

Signed-off-by: Kush Sharma <thekushsharma@gmail.com>
@kushsharma kushsharma force-pushed the config-backward-compatibility branch from 5ec2eaf to 5cf49a5 Compare June 27, 2023 07:03
@kushsharma kushsharma changed the title [WIP] fix: config parsing backward compatibility for time.Duration fix: config parsing backward compatibility for time.Duration Jun 27, 2023
@kushsharma kushsharma merged commit 5201185 into main Jun 27, 2023
@kushsharma kushsharma deleted the config-backward-compatibility branch June 27, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant