Feature 57 (config and provisioning): release mesh-controller, the reviewed release branch merged with main, on top of main
This commit is contained in:
@@ -54,6 +54,7 @@ import (
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/asks"
|
||||
|
||||
"github.com/novox/mesh-controller/internal/catalogue"
|
||||
"github.com/novox/mesh-controller/internal/conditions"
|
||||
"github.com/novox/mesh-controller/internal/inventory"
|
||||
"github.com/novox/mesh-controller/internal/link"
|
||||
@@ -906,6 +907,21 @@ func setLayerIn(open *stores) setOnWarrant {
|
||||
return "", fmt.Errorf("the layer of %s on %s changed since the operator was shown the change: it is not set; "+
|
||||
"propose it again", p.Module, p.where())
|
||||
}
|
||||
// A proposal that carries config values, raised before the module's config moved, is not applied after it: its
|
||||
// values in the layer would turn ReadsConfig off and undo the move (issue 830, novox/hq ADR 0348). A proposal
|
||||
// of placement only is set as before: forwardPropose sends it down this path on purpose.
|
||||
carried := p.Values
|
||||
if p.Clear {
|
||||
carried = before
|
||||
}
|
||||
if config, _ := catalogue.SplitPlacement(carried); len(config) > 0 {
|
||||
if reads, err := inv.ReadsConfig(ctx, p.Module); err != nil {
|
||||
return "", err
|
||||
} else if reads {
|
||||
return "", fmt.Errorf("the config of %s moved to mesh-config since the operator was shown the change: it is "+
|
||||
"not set; propose it again (it then goes to mesh-config)", p.Module)
|
||||
}
|
||||
}
|
||||
var changed string
|
||||
if p.Clear {
|
||||
if err := inv.ClearSettingsBy(ctx, p.Node, p.Module, setBy); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user