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

Fix reading fallback values for providers, set environment variables #3429

Merged
merged 2 commits into from
May 27, 2024

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented May 27, 2024

Summary

This PR fixes reading the fallback values for providers to read the keys one-by-one
to allow setting environment variables - I was trying to be too smart and check the
presence of the fallback key by checking viper.IsSet(provider) and then unmarshalling
viper.UnmarshallKey(provider) but that doesn't work well with environment variables.

Also includes PR #3427 just adjusts the variable names.

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

jhrozek and others added 2 commits May 27, 2024 09:34
mindersec#3410 removed manually-registered
command line flags we were using to set these. Let's set them as env
variables instead.

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@jhrozek jhrozek requested a review from a team as a code owner May 27, 2024 07:39
@coveralls
Copy link

Coverage Status

coverage: 52.03% (+0.05%) from 51.98%
when pulling 3963ac4 on jhrozek:revert
into ee7bec4 on stacklok:main.

@jhrozek jhrozek merged commit d98a822 into mindersec:main May 27, 2024
21 checks passed
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.

4 participants