Skip to content

Commit bf91e2b

Browse files
authored
fix/resolve-workflow-storage-config-once (#21857)
1 parent d3decc8 commit bf91e2b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

core/services/cre/cre.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,16 +800,17 @@ func newFetcherServiceV2(
800800
return nil, nil, nil, errors.New("unable to create workflow registry syncer without gateway connector")
801801
}
802802

803+
wfStorage := capCfg.WorkflowRegistry().WorkflowStorage()
803804
storageClient := opts.StorageClient
804-
if capCfg.WorkflowRegistry().WorkflowStorage().URL() != "" {
805+
if wfStorage.URL() != "" {
805806
workflowOpts := []storage.WorkflowClientOpt{
806807
storage.WithJWTGenerator(opts.JWTGenerator),
807808
}
808-
if capCfg.WorkflowRegistry().WorkflowStorage().TLSEnabled() {
809+
if wfStorage.TLSEnabled() {
809810
workflowOpts = append(workflowOpts, storage.WithWorkflowTransportCredentials(credentials.NewClientTLSFromCert(nil, "")))
810811
}
811812

812-
sc, err := storage.NewWorkflowClient(lggr, capCfg.WorkflowRegistry().WorkflowStorage().URL(), workflowOpts...)
813+
sc, err := storage.NewWorkflowClient(lggr, wfStorage.URL(), workflowOpts...)
813814
if err != nil {
814815
return nil, nil, nil, fmt.Errorf("failed to create storage client: %w", err)
815816
}

0 commit comments

Comments
 (0)