A module's name may contain a dot, so the derived step adds none

A resource's id is `<module>.<its own id>` and a module's name may itself contain a dot — novox.be is
one — so the owner of a resource is everything before the *last* dot. The preparation step's id used a
dot, which made its owner unreadable by that rule; it uses a hyphen, and the id says what it belongs
to whichever way a reader splits it.
This commit is contained in:
2026-09-28 15:44:18 +02:00
parent cec792ce9d
commit 4b4c7e0e0d
2 changed files with 13 additions and 4 deletions
+4 -1
View File
@@ -1685,7 +1685,10 @@ func prepared(from map[string]any) map[string]any {
for k, v := range from {
step[k] = v
}
step["id"] = fmt.Sprint(from["id"]) + ".prepare"
// **A hyphen, not a dot.** A resource's id is `<module>.<its own id>`, and a module's name may
// itself contain a dot (`novox.be`), so the module is everything before the *last* dot — which
// only works if what the mesh derives adds no dot of its own.
step["id"] = fmt.Sprint(from["id"]) + "-prepare"
step["name"] = fmt.Sprint(from["name"]) + "-prepare"
step["run-once"] = true
step["args"] = []any{PreparationArgument}