Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): t3 update installs from the policy's update mirror #29911

Mergedjuliusmarmingemerged 6 commits intomain fromrefs/pull/29911/headmerged by juliusmarminge View on GitHub

Showing 9 changed files with 137 additions and 21 deletions (loading 7).

x
0 of 9 viewed, 9 left
75 additions and 5 deletionsapps/server/src/cli/update.test.tsModified
View file
@@ -18,7 +18,13 @@
import { prunePinnedRuntimes } from "../cloud/pinnedRuntime.ts";
import * as ManagedPolicy from "../policy/ManagedPolicy.ts";
import * as ProcessRunner from "../processRunner.ts";
-import { repointLauncher, resolveLauncherPath, resolveNewestVersion, runUpdate } from "./update.ts";
+import {
+ repointLauncher,
+ resolveLauncherPath,
+ resolveMirrorVersion,
+ resolveNewestVersion,
+ runUpdate,
+} from "./update.ts";
​
// lsof listing one process, so prune sees a process list in which no runtime is running.
const unrelatedLsof = ProcessRunner.ProcessRunner.of({
@@ -60,10 +66,59 @@
}),
);
​
+it.effect("reads the newest version from the update feed file a mirror publishes", () =>
+ Effect.gen(function* () {
+ const requested: string[] = [];
+ const mirror = {
+ organization: "Example Corp",
+ feedUrl: "https://updates.example.com/t3code/?token=abc",
+ };
+ const resolve = (
+ channel: "stable" | "nightly" | "preview",
+ platform: NodeJS.Platform,