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 +1 -1
- package/src/daemon.js +1 -1
- package/test/rollbridge.test.js +4 -0
package/package.json
CHANGED
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) {
|
package/test/rollbridge.test.js
CHANGED
|
@@ -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: {
|