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: squash base config with mapstructure #2777

Merged
merged 3 commits into from
Oct 17, 2024
Merged

fix: squash base config with mapstructure #2777

merged 3 commits into from
Oct 17, 2024

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Oct 17, 2024

What kind of change does this PR introduce?

Bug fix #2772

What is the new behavior?

For future reference, the order of loading env var to config is

  1. cobra loads cli flags to viper with automatic env
  2. godotenv loads .env / .env.local / .env.development files
  3. mapstructure dumps default config struct to map
  4. viper loads from config map (4) with automatic env (3)
  5. viper dumps its state back to config

Additional context

We can potentially remove dependency on godotenv by having viper load from .env files.

@coveralls
Copy link

coveralls commented Oct 17, 2024

Pull Request Test Coverage Report for Build 11389178479

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 59.748%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/root.go 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 11362162748: 0.03%
Covered Lines: 6356
Relevant Lines: 10638

💛 - Coveralls

@sweatybridge sweatybridge requested a review from avallete October 17, 2024 18:13
@sweatybridge sweatybridge merged commit adda496 into develop Oct 17, 2024
13 checks passed
@sweatybridge sweatybridge deleted the bc-squash branch October 17, 2024 18:32
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.

Supabase start is not pulling in variables from env.local after update
3 participants