rollbridge 0.1.42 → 0.1.43

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollbridge",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "description": "Zero-downtime process supervisor and local traffic switcher for deploy-managed apps.",
5
5
  "keywords": [
6
6
  "deploy",
package/src/daemon.js CHANGED
@@ -1814,7 +1814,7 @@ export default class RollbridgeDaemon {
1814
1814
  }
1815
1815
 
1816
1816
  if (transition.phase === "restoring_previous") {
1817
- if (candidate.state !== "draining") throw new Error(`Failed candidate ${candidate.releaseId} is not retired before incumbent restoration`)
1817
+ if (candidate.state !== "draining" && candidate.state !== "stopped") throw new Error(`Failed candidate ${candidate.releaseId} is not retired before incumbent restoration`)
1818
1818
  try {
1819
1819
  await previous.reactivateGeneration()
1820
1820
  } catch (error) {
@@ -696,7 +696,11 @@ test("candidate activation failure reports restoration failure and exact recover
696
696
  assert.match(String(restorationEvent?.data.error), /incumbent restoration rejected/)
697
697
  assert.deepEqual(await lifecycleEvents(fixture.lifecycleLogPath), ["activate:v1", "retire:v1", "retire:v2"])
698
698
  await assert.rejects(() => daemon.deploy({releaseId: "v3", releasePath: fixture.root, revision: "v3"}), /transition.*v2.*unresolved/i)
699
+ const failedCandidate = daemon.releases.get("v2")
699
700
 
701
+ assert.ok(failedCandidate)
702
+ await failedCandidate.stop()
703
+ assert.equal(failedCandidate.state, "stopped")
700
704
  incumbentCoordinator.reactivateStrict = reactivate
701
705
  const recovery = await sendControlCommand({
702
706
  command: {