Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion scripts/release/staging-update-gate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,18 @@ export async function probeStagingUpdateGate(options = {}) {
status.compatible !== true ||
status.repairRequired !== !context.publicUpgrade
) {
throw new Error("The deployed candidate did not report the expected same-version repair.");
const checks = {
installedVersion:
status.installedVersion ===
(context.publicUpgrade ? context.sourceVersion : context.candidateVersion),
candidateVersion: status.release?.version === context.candidateVersion,
available: status.available === true,
compatible: status.compatible === true,
repairRequired: status.repairRequired === !context.publicUpgrade
};
throw new Error(
`The deployed update status did not match the gate: ${JSON.stringify(checks)}.`
);
}

manifest.releaseGate.workersBuild.dispatchStartedAt = new Date().toISOString();
Expand Down
5 changes: 3 additions & 2 deletions test/e2e/staging/update-channel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ test("owner can leave Nightly without changing the installed release", async ({
email: process.env.HQBASE_STAGING_OWNER_EMAIL,
password: process.env.HQBASE_STAGING_OWNER_PASSWORD,
rememberMe: false
}
},
headers: { origin: new URL(process.env.HQBASE_STAGING_URL!).origin }
});
expect(login.ok()).toBeTruthy();
expect(login.ok(), `Owner sign-in returned HTTP ${login.status()}.`).toBeTruthy();
const before = await (await request.get("/api/health")).json();
try {
await page.goto("/settings/updates");
Expand Down