Drop link self-healing paths, fix linter findings
- Remove link resync on module reconnect, link resave on no-op config update, and link backfill on variable create/upsert: links are formed only on config save - Disable exhaustruct_v5 and goconst linters - Fix golangci-lint findings: noinlineerr, slices.Backward, wrapcheck for ConfigValidationError (errors.As in controller keeps working via %w), funlen nolint on acceptance test
This commit is contained in:
1 parent
7f4e3ef028
commit
c464393e93
9 files changed
+9
-114
No files matched your search
@@ -152,11 +152,6 @@ func (c Config) CreateUpdateConfig(
|
||||
return nil, errors.WithMessage(err, "compare data configs")
|
||||
}
|
||||
if isMatch {
|
||||
// Links may be missing after a partially failed update; re-save them even when data is unchanged.
|
||||
err = c.variableService.SaveVariableLinks(ctx, req.Id, variableExtractionResult.VariableLinks)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "save variable links")
|
||||
}
|
||||
c.logger.Info(ctx, "no changes in config; skip update")
|
||||
return &domain.CreateUpdateConfigResponse{Config: configToDto(*oldConfig, nil), IsChanged: false}, nil
|
||||
}
|
||||
@@ -328,7 +323,7 @@ func (c Config) extractAndCheckVariables(ctx context.Context, configId string, i
|
||||
for _, variable := range variableExtractionResult.AbsentVariables {
|
||||
details[variable] = "variable is not defined"
|
||||
}
|
||||
return nil, domain.NewConfigValidationError(details)
|
||||
return nil, errors.WithMessage(domain.NewConfigValidationError(details), "config validation")
|
||||
}
|
||||
return variableExtractionResult, nil
|
||||
}
|
||||
@@ -350,7 +345,7 @@ func (c Config) validateConfigUpdate(ctx context.Context, moduleId string, confi
|
||||
return nil
|
||||
}
|
||||
|
||||
return domain.NewConfigValidationError(details)
|
||||
return errors.WithMessage(domain.NewConfigValidationError(details), "config validation")
|
||||
}
|
||||
|
||||
func (c Config) emitChangeActiveConfigEvent(ctx context.Context, moduleId string) error {
|
||||
|
||||
Reference in new issue
Block a user