Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b9a0d0

Browse files
authored
Revert "chore: add runtimeconfig manager to options for plumbing (#14562)"
This reverts commit17603f5.
1 parent17603f5 commit6b9a0d0

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
returnerr
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
CacheDirstring

‎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
varacs 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)

[8]ページ先頭

©2009-2025 Movatter.jp