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

Move default S3 url style from defaults.yaml to config.go #1070

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

jhiemstrawisc
Copy link
Member

Because we have no way to tell whether defaults in defaults.yaml are user-provided or not, the default there of Origin.S3UrlStyle was throwing an error meant to notify users that they have incompatible config variables set.

This moves setting of that default into config.go where we now use viper.SetDefault, which later on allows us to viper.IsSet("Origin.S3UrlStyle") without catching our own default.

Because we have no way to tell whether defaults in defaults.yaml are user-provided
or not, the default there of `Origin.S3UrlStyle` was throwing an error meant to
notify users that they have incompatible config variables set.

This moves setting of that default into config.go where we now use `viper.SetDefault`,
which later on allows us to `viper.IsSet("Origin.S3UrlStyle")` without catching our
own default.
@jhiemstrawisc jhiemstrawisc added bug Something isn't working critical High priority for next release labels Apr 8, 2024
@jhiemstrawisc jhiemstrawisc added this to the v7.7.0 milestone Apr 8, 2024
@jhiemstrawisc jhiemstrawisc requested a review from haoming29 April 8, 2024 16:37
Copy link
Contributor

@haoming29 haoming29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One naming typo otherwise LGTM

config/config.go Outdated Show resolved Hide resolved
@jhiemstrawisc jhiemstrawisc requested a review from haoming29 April 8, 2024 17:43
@jhiemstrawisc
Copy link
Member Author

Sorry for the typo, should be good to go now.

Copy link
Contributor

@haoming29 haoming29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix!

@haoming29 haoming29 merged commit ff9c450 into PelicanPlatform:main Apr 8, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical High priority for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants