internal: Add base configuration object
Created by: efritz
This PR introduces an abstract store that has allows an idiom over env.Get
in a way that makes an application's envvars easily searchable and contained in a single place.
This is a bit of an experiment to see if this does buy us some code clarity in application setup. This will be first used in the code intelligence and user-code-execution services. This is a pre-step to the effort tracked in https://github.com/sourcegraph/sourcegraph/issues/14822.
Merge request reports
Activity
Created by: sourcegraph-bot
Notifying subscribers in CODENOTIFY files for diff e4958b671babc04d515ab4dda52d0a6b4f1ab1c7...2c8e13b34e8fb2d88a3c0ea0d92673154420c5ac.
Notify File(s) @keegancsmith internal/env/CODENOTIFY
internal/env/baseconfig.go@nicksnyder internal/env/CODENOTIFY Created by: codecov[bot]
Codecov Report
Merging #14836 into main will decrease coverage by
0.07%
. The diff coverage is0.00%
.@@ Coverage Diff @@ ## main #14836 +/- ## ========================================== - Coverage 52.25% 52.18% -0.08% ========================================== Files 1575 1555 -20 Lines 80180 79396 -784 Branches 7085 7085 ========================================== - Hits 41902 41434 -468 + Misses 34488 34214 -274 + Partials 3790 3748 -42
Flag Coverage Δ #go 52.38% <0.00%> (-0.11%)
#integration 30.55% <ø> (-0.02%)
#storybook 22.15% <ø> (ø)
#typescript 51.70% <ø> (ø)
#unit 33.64% <ø> (ø)
Impacted Files Coverage Δ internal/env/baseconfig.go 0.00% <0.00%> (ø)
internal/workerutil/dbworker/store/store.go 70.00% <0.00%> (-5.15%)
.../internal/codeintel/resolvers/graphql/locations.go 81.44% <0.00%> (-4.13%)
cmd/repo-updater/repos/store.go 82.48% <0.00%> (-2.55%)
cmd/repo-updater/repos/types.go 73.83% <0.00%> (-0.25%)
internal/httpcli/baseclient.go internal/workerutil/apiworker/command/run.go internal/workerutil/apiworker/handler.go internal/workerutil/apiworker/apiserver/routes.go ...ontend/internal/executor/internal_proxy_handler.go ... and 17 more Created by: efritz
@pecigonzalo Maybe, but this is a very low-effort change to experiment with and will save a bunch of local vars in the interim regardless if we keep this long-term. I'd like to move to something standard and I'm just using this as a stop-gap/learning experience.
If you do revisit this RFC in the future please remember this (and tag me in if you'd like).