minio: provisioner emits best-effort, so a missing broker can't fail provisioning

The review found minio's provisioner emitting with a bare await, which throws
when no broker is bound (a provisioner is not yet a runtime — ADR 0052) and so
fails create/remove. Wrapped like the other providers: the event is logged and
dropped, the bucket still made. The real fix — the provisioner carrying a broker
credential — is ADR 0052.
This commit is contained in:
2026-09-04 21:25:42 +02:00
parent 121b7f196b
commit 5fd78a77ad
+12 -2
View File
@@ -28,7 +28,7 @@ runProvisioner("s3-bucket", {
try { await minio.removeAccessKey(accessKeyId); } catch { /* none yet — first provision */ }
const key = await minio.createAccessKey(bucket, accessKeyId);
await emit("module.minio.bucket.created", {
await announce("module.minio.bucket.created", {
bucket,
consumer: grant.consumer,
node: grant.node,
@@ -61,6 +61,16 @@ runProvisioner("s3-bucket", {
console.error(`[minio] bucket ${bucket} not removed (likely non-empty), access revoked: ${err}`);
}
await emit("module.minio.bucket.removed", { bucket, consumer: grant.consumer, node: grant.node });
await announce("module.minio.bucket.removed", { bucket, consumer: grant.consumer, node: grant.node });
},
});
/** Emit best-effort: with no broker bound (a provisioner is not yet a runtime — novox/hq ADR 0052)
* the event is logged and dropped, never allowed to throw back and fail a bucket that was made. */
async function announce(type: string, body: unknown): Promise<void> {
try {
await emit(type, body);
} catch (err) {
console.error(`[minio] could not emit ${type}: ${err}`);
}
}