Skip to content

Commit

Permalink
Remove unused dynamicconfig.Collection in top level fx container (#4253)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnr committed May 1, 2023
1 parent d6d7a0b commit 2aa5481
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
31 changes: 14 additions & 17 deletions temporal/fx.go
Expand Up @@ -77,7 +77,6 @@ type (

ServicesGroupOut struct {
fx.Out

Services *ServicesMetadata `group:"services"`
}

Expand Down Expand Up @@ -118,14 +117,13 @@ type (
AudienceGetter authorization.JWTAudienceMapper

// below are things that could be over write by server options or may have default if not supplied by serverOptions.
Logger log.Logger
ClientFactoryProvider client.FactoryProvider
DynamicConfigClient dynamicconfig.Client
DynamicConfigCollection *dynamicconfig.Collection
TLSConfigProvider encryption.TLSConfigProvider
EsConfig *esclient.Config
EsClient esclient.Client
MetricsHandler metrics.Handler
Logger log.Logger
ClientFactoryProvider client.FactoryProvider
DynamicConfigClient dynamicconfig.Client
TLSConfigProvider encryption.TLSConfigProvider
EsConfig *esclient.Config
EsClient esclient.Client
MetricsHandler metrics.Handler
}
)

Expand Down Expand Up @@ -263,14 +261,13 @@ func ServerOptionsProvider(opts []ServerOption) (serverOptionsProvider, error) {
ClaimMapper: so.claimMapper,
AudienceGetter: so.audienceGetter,

Logger: logger,
ClientFactoryProvider: clientFactoryProvider,
DynamicConfigClient: dcClient,
DynamicConfigCollection: dynamicconfig.NewCollection(dcClient, logger),
TLSConfigProvider: tlsConfigProvider,
EsConfig: esConfig,
EsClient: esClient,
MetricsHandler: metricHandler,
Logger: logger,
ClientFactoryProvider: clientFactoryProvider,
DynamicConfigClient: dcClient,
TLSConfigProvider: tlsConfigProvider,
EsConfig: esConfig,
EsClient: esClient,
MetricsHandler: metricHandler,
}, nil
}

Expand Down
5 changes: 0 additions & 5 deletions temporal/server_impl.go
Expand Up @@ -34,7 +34,6 @@ import (

"go.temporal.io/server/common/cluster"
"go.temporal.io/server/common/config"
"go.temporal.io/server/common/dynamicconfig"
"go.temporal.io/server/common/log"
"go.temporal.io/server/common/log/tag"
persistenceClient "go.temporal.io/server/common/persistence/client"
Expand All @@ -52,8 +51,6 @@ type (
logger log.Logger
namespaceLogger resource.NamespaceLogger

dcCollection *dynamicconfig.Collection

persistenceConfig config.Persistence
clusterMetadata *cluster.Config
persistenceFactoryProvider persistenceClient.FactoryProviderFn
Expand All @@ -71,7 +68,6 @@ func NewServerFxImpl(
logger log.Logger,
namespaceLogger resource.NamespaceLogger,
stoppedCh chan interface{},
dcCollection *dynamicconfig.Collection,
servicesGroup ServicesGroupIn,
persistenceConfig config.Persistence,
clusterMetadata *cluster.Config,
Expand All @@ -83,7 +79,6 @@ func NewServerFxImpl(
stoppedCh: stoppedCh,
logger: logger,
namespaceLogger: namespaceLogger,
dcCollection: dcCollection,
persistenceConfig: persistenceConfig,
clusterMetadata: clusterMetadata,
persistenceFactoryProvider: persistenceFactoryProvider,
Expand Down

0 comments on commit 2aa5481

Please sign in to comment.