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

Centralize the configuration of the OSDF client. #79

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

bbockelm
Copy link

As we want to have the ability to stand up additional data federation instances (think: test directors), we should split out and centralize the defaults.

This introduces the use of viper for the process-wide configuration management. This will allow the use of configuration files in the near future.

@bbockelm bbockelm force-pushed the centralize_config branch 2 times, most recently from 2ff3c1a to 1048542 Compare June 11, 2023 21:17
@bbockelm bbockelm requested a review from djw8605 June 12, 2023 00:48
@bbockelm
Copy link
Author

@djw8605 - ping on this PR review.

Copy link

@jhiemstrawisc jhiemstrawisc left a comment

Choose a reason for hiding this comment

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

This should probably also be accompanied by an overhaul of the README. Do we want to save that for later, or take care of it before merging?

config/config.go Show resolved Hide resolved
As we want to have the ability to stand up additional data federation
instances (think: test directors), we should split out and centralize
the defaults.

This introduces the use of viper for the process-wide configuration
management.  This will allow the use of configuration files in the
near future.
In some unit tests, we need to alter the configuration via env var
(to ensure the environment-based changes are effective); this adds
in re-initialization at the appropriate points.

Additionally, this moves the various timeout constants to the config
subsystem, allowing us to use much shorter timeouts for test runs
(taking about 6 minutes off the time to run `go test`).
Since the binary generated for namespaces_test.go doesn't start with
`stash`, the override for the test should be `PELICAN`-prefixed instead.
@bbockelm
Copy link
Author

bbockelm commented Jul 2, 2023

I think I'm fine with saving the overhaul of the README for later... probably a few more things to land first.

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.

None yet

2 participants