Converge only on the preview the operator saw, named by its digest, and never on an account older than 15 minutes (hq ADR 0100)

This commit is contained in:
2026-09-22 18:02:30 +02:00
parent ba0f44a36d
commit c91fe1a6eb
4 changed files with 139 additions and 20 deletions
+4 -3
View File
@@ -105,7 +105,7 @@ func commands(who Authenticator) http.Handler {
return take(ctx, open, in.Node, in.Module)
}))
mux.HandleFunc("POST /converge", acting(who, false, func(ctx context.Context, open *stores, in request) (string, error) {
return converge(ctx, open, in.Node, in.Yes, in.Filter)
return converge(ctx, open, in.Node, in.Yes, in.Digest, in.Filter)
}))
mux.HandleFunc("POST /adopt", acting(who, false, func(ctx context.Context, open *stores, in request) (string, error) {
return adopt(ctx, open, in.Node)
@@ -124,9 +124,10 @@ func commands(who Authenticator) http.Handler {
type request struct {
Node string `json:"node"`
Module string `json:"module"`
// Yes and Filter are converge's: do it rather than preview it, and which module loads the
// mesh's filter.
// Yes, Digest and Filter are converge's: do it rather than preview it, the digest of the
// preview it acts on, and which module loads the mesh's filter.
Yes bool `json:"yes,omitempty"`
Digest string `json:"digest,omitempty"`
Filter string `json:"filter,omitempty"`
}