A build's outcome belongs to the role, not to the module holding it
ADR 0121. The builder declared `built` as its own event, so every consumer depended on which module happens to be the build machine today. It is the build-machine role's event now: the builder declares none of its own, and the catalogue listens for `mesh-build-machine.built` rather than `builder.built`. Nothing changes about what reaches the catalogue. What changes is that it survives the build machine being a different module, which is the whole reason the mesh has a word for a role.
This commit is contained in:
@@ -20,9 +20,6 @@
|
||||
"secrets": {
|
||||
"npm-package-registry": "/var/lib/mesh/builder/package-registry.secret"
|
||||
},
|
||||
"emits": [
|
||||
"built"
|
||||
],
|
||||
"own-secrets": {
|
||||
"broker": "/var/lib/mesh/builder/broker"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// mesh-catalog's entrypoint — the module graph's consumer (novox/hq ADR 0070, ADR 0072).
|
||||
//
|
||||
// The builder announces what it built; this places it in the graph and announces what that means.
|
||||
// The build-machine role announces what it built; this places it in the graph and announces what that means.
|
||||
// The control plane hooks the *meaning* — a module was upgraded — rather than the build output, so
|
||||
// it never has to interpret an artifact or ask this module anything.
|
||||
//
|
||||
@@ -47,7 +47,7 @@ interface Built {
|
||||
replay?: boolean;
|
||||
}
|
||||
|
||||
await on("builder.built", async (event) => {
|
||||
await on("mesh-build-machine.built", async (event) => {
|
||||
const body = event.body as Built;
|
||||
if (!body.module || !body.commit) {
|
||||
// Said rather than dropped: a build that announced itself without saying what it built is a
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"broker": "/var/lib/mesh/mesh-catalog/broker"
|
||||
},
|
||||
"consumes": [
|
||||
"builder.built"
|
||||
"mesh-build-machine.built"
|
||||
],
|
||||
"emits": [
|
||||
"registered",
|
||||
|
||||
Reference in New Issue
Block a user