Skip to content

Commit 6b9a0d0

Browse files
authored
Revert "chore: add runtimeconfig manager to options for plumbing (#14562)"
This reverts commit 17603f5.
1 parent 17603f5 commit 6b9a0d0

File tree

3 files changed

+0
-17
lines changed

3 files changed

+0
-17
lines changed

cli/server.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ import (
5656
"cdr.dev/slog"
5757
"cdr.dev/slog/sloggers/sloghuman"
5858
"github.com/coder/coder/v2/coderd/entitlements"
59-
"github.com/coder/coder/v2/coderd/runtimeconfig"
6059
"github.com/coder/pretty"
6160
"github.com/coder/quartz"
6261
"github.com/coder/retry"
@@ -821,14 +820,6 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
821820
return err
822821
}
823822

824-
// TODO: Throw a caching layer infront of the RuntimeConfig to prevent
825-
// excessive database queries.
826-
// Note: This happens before dbauthz, which is really unfortunate.
827-
// dbauthz is configured in `Coderd.New()`, but we need the manager
828-
// at this level for notifications. We might have to move some init
829-
// code around.
830-
options.RuntimeConfig = runtimeconfig.NewStoreManager(options.Database)
831-
832823
// This should be output before the logs start streaming.
833824
cliui.Infof(inv.Stdout, "\n==> Logs will stream in below (press ctrl+c to gracefully exit):")
834825

coderd/coderd.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import (
3939
"cdr.dev/slog"
4040
"github.com/coder/coder/v2/coderd/entitlements"
4141
"github.com/coder/coder/v2/coderd/idpsync"
42-
"github.com/coder/coder/v2/coderd/runtimeconfig"
4342
"github.com/coder/quartz"
4443
"github.com/coder/serpent"
4544

@@ -136,7 +135,6 @@ type Options struct {
136135
Logger slog.Logger
137136
Database database.Store
138137
Pubsub pubsub.Pubsub
139-
RuntimeConfig runtimeconfig.Manager
140138

141139
// CacheDir is used for caching files served by the API.
142140
CacheDir string

coderd/coderdtest/coderdtest.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ import (
6767
"github.com/coder/coder/v2/coderd/notifications"
6868
"github.com/coder/coder/v2/coderd/rbac"
6969
"github.com/coder/coder/v2/coderd/rbac/policy"
70-
"github.com/coder/coder/v2/coderd/runtimeconfig"
7170
"github.com/coder/coder/v2/coderd/schedule"
7271
"github.com/coder/coder/v2/coderd/telemetry"
7372
"github.com/coder/coder/v2/coderd/unhanger"
@@ -255,10 +254,6 @@ func NewOptions(t testing.TB, options *Options) (func(http.Handler), context.Can
255254
var acs dbauthz.AccessControlStore = dbauthz.AGPLTemplateAccessControlStore{}
256255
accessControlStore.Store(&acs)
257256

258-
// runtimeManager does not use dbauthz.
259-
// TODO: It probably should, but the init code for prod happens before dbauthz
260-
// is ready.
261-
runtimeManager := runtimeconfig.NewStoreManager(options.Database)
262257
options.Database = dbauthz.New(options.Database, options.Authorizer, *options.Logger, accessControlStore)
263258

264259
// Some routes expect a deployment ID, so just make sure one exists.
@@ -487,7 +482,6 @@ func NewOptions(t testing.TB, options *Options) (func(http.Handler), context.Can
487482
AppHostnameRegex: appHostnameRegex,
488483
Logger: *options.Logger,
489484
CacheDir: t.TempDir(),
490-
RuntimeConfig: runtimeManager,
491485
Database: options.Database,
492486
Pubsub: options.Pubsub,
493487
ExternalAuthConfigs: options.ExternalAuthConfigs,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy