Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): retain the runtime used by the service launcher #23250

Closedjuliusmarmingewants to merge 3 commits intomain fromrefs/pull/23250/headopened View on GitHub

Showing 7 changed files with 35 additions and 0 deletions (loading 4).

x
0 of 7 viewed, 7 left
5 additions and 0 deletionsapps/server/src/cloud/bootService.test.tsModified
View file
@@ -300,9 +300,12 @@
const { service, fs, statePath, timeouts, runtime } = yield* makeHarness();
const plan = yield* service.install();
​
+ // The unit runs the launcher from this runtime even after remote updates move
+ // activeVersion on, so state has to record it for anything that cleans up runtimes.
expect(parseServiceState(yield* fs.readFileString(statePath))).toEqual({
protocol: SERVICE_LAUNCHER_PROTOCOL,
activeVersion: "1.2.3",
+ launcherVersion: "1.2.3",
});
expect(plan.program).toEqual([runtime.entryPath, "__service-launcher"]);
expect(yield* fs.readFileString(plan.unitPath)).toContain(
@@ -468,6 +471,7 @@
expect(parseServiceState(yield* fs.readFileString(statePath))).toEqual({
protocol: SERVICE_LAUNCHER_PROTOCOL,
activeVersion: "1.2.4",
+ launcherVersion: "1.2.4",
});
expect(yield* fs.readFileString(plan.unitPath)).toContain("versions/1.2.4/t3");
expect(
@@ -763,6 +767,7 @@
expect(parseServiceState(yield* fs.readFileString(statePath))).toEqual({
protocol: SERVICE_LAUNCHER_PROTOCOL,
activeVersion: "1.2.3",
+ launcherVersion: "1.2.3",
});
expect(yield* fs.readFileString(plan.unitPath)).toContain(