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
@@ -240,16 +240,6 @@ func (s Service) OnModuleConfigSchema(
|
||||
}
|
||||
|
||||
config = &initialConfig
|
||||
} else {
|
||||
// Re-sync links on every connect: they are derived data and may be missing after a partially failed update.
|
||||
result, err := s.variableService.ExtractVariables(ctx, config.Id, config.Data)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "extract variables from active config")
|
||||
}
|
||||
err = s.variableService.SaveVariableLinks(ctx, config.Id, result.VariableLinks)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "resync variable links in store")
|
||||
}
|
||||
}
|
||||
|
||||
configData, err := s.variableService.RenderConfig(ctx, config.Data)
|
||||
|
||||
Reference in new issue
Block a user