@camstack/server 1.2.304 → 1.2.305
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3101,9 +3101,27 @@ class AddonRegistryService {
|
|
|
3101
3101
|
throw new Error(`initializeAddonGroup("${runnerId}") requires at least one addon`);
|
|
3102
3102
|
}
|
|
3103
3103
|
try {
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3104
|
+
// Serialized on the SAME key as `ensureForkedRunner`. This is the boot
|
|
3105
|
+
// path, and a boot spawn racing the restart a deploy fires for itself is
|
|
3106
|
+
// exactly how two runners started in the same second on 2026-09-17 —
|
|
3107
|
+
// with no manual restart anywhere. Covering only the converge left the
|
|
3108
|
+
// same race with a smaller window, and it lost the very next deploy.
|
|
3109
|
+
await this.serializeRunner(runnerId, async () => {
|
|
3110
|
+
try {
|
|
3111
|
+
await this.broker.call('$process.spawnRunner', { runnerId, addons });
|
|
3112
|
+
}
|
|
3113
|
+
catch (err) {
|
|
3114
|
+
// Losing the race is not a failure, and this method's own docblock
|
|
3115
|
+
// already promised so: "No-op when the runner is already running".
|
|
3116
|
+
// Unserialized the loser almost never got here — it spawned a SECOND
|
|
3117
|
+
// runner instead, which is the defect. Serializing makes the loser
|
|
3118
|
+
// reliable, so the promise has to be kept rather than documented.
|
|
3119
|
+
if (!/already running/i.test((0, types_1.errMsg)(err)))
|
|
3120
|
+
throw err;
|
|
3121
|
+
this.logger.info('initializeAddonGroup: runner already running — nothing to spawn', {
|
|
3122
|
+
meta: { runnerId, addonIds: addons.map((a) => a.addonId) },
|
|
3123
|
+
});
|
|
3124
|
+
}
|
|
3107
3125
|
});
|
|
3108
3126
|
}
|
|
3109
3127
|
catch (err) {
|