Detach captured backend and profile values
This commit is contained in:
@@ -19,15 +19,11 @@ func (state *loaded) buildExecutionProfiles() error {
|
||||
config := backendConfigs[id]
|
||||
definitions[id] = captureBackend(id, config)
|
||||
}
|
||||
registry, err := backend.NewEffectiveRegistry(definitions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
state.registry = registry
|
||||
state.registry = backend.NewEffectiveRegistry(definitions)
|
||||
state.indexedProfiles = make(map[string]domain.ExecutionProfile, len(profileConfigs))
|
||||
for _, id := range sortedKeys(profileConfigs) {
|
||||
config := profileConfigs[id]
|
||||
profile, err := captureExecutionProfile(id, config, state.profiles[id], registry)
|
||||
profile, err := captureExecutionProfile(id, config, state.profiles[id], state.registry)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -199,11 +195,7 @@ func (state *loaded) GetProfile(ctx context.Context, id string) (*domain.Executi
|
||||
return nil, err
|
||||
}
|
||||
target := *profile.ResolvedTarget
|
||||
params, err := jsonvalue.CopyMap(target.ExtraParams)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
target.ExtraParams = params
|
||||
target.ExtraParams = jsonvalue.CloneTrusted(target.ExtraParams).(map[string]any)
|
||||
profile.ResolvedTarget = &target
|
||||
return &profile, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user