test: harden parallels package smokes

This commit is contained in:
Peter Steinberger
2026-04-21 04:32:01 +01:00
parent 6f5b7120b8
commit e1d7e2e8a2
4 changed files with 25 additions and 1 deletions

View File

@@ -511,6 +511,11 @@ ensure_current_build() {
[[ "$build_commit" == "$head" ]] || die "dist/build-info.json still does not match HEAD after build"
}
write_package_dist_inventory() {
node --import tsx --input-type=module --eval \
'import { writePackageDistInventory } from "./src/infra/package-dist-inventory.ts"; await writePackageDistInventory(process.cwd());'
}
extract_package_version_from_tgz() {
tar -xOf "$1" package/package.json | python3 -c 'import json, sys; print(json.load(sys.stdin)["version"])'
}
@@ -531,6 +536,7 @@ pack_main_tgz() {
fi
say "Pack current main tgz"
ensure_current_build
write_package_dist_inventory
short_head="$(git rev-parse --short HEAD)"
pkg="$(
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \

View File

@@ -1156,6 +1156,7 @@ pack_main_tgz() {
fi
say "Pack current main tgz"
ensure_current_build
write_package_dist_inventory
stage_pack_runtime_deps
short_head="$(git rev-parse --short HEAD)"
pkg="$(
@@ -1238,6 +1239,11 @@ ensure_current_build() {
current_control_ui_ready || die "dist/control-ui/index.html missing after ui build"
}
write_package_dist_inventory() {
node --import tsx --input-type=module --eval \
'import { writePackageDistInventory } from "./src/infra/package-dist-inventory.ts"; await writePackageDistInventory(process.cwd());'
}
stage_pack_runtime_deps() {
node scripts/stage-bundled-plugin-runtime-deps.mjs
}

View File

@@ -332,11 +332,17 @@ ensure_current_build() {
pnpm build
}
write_package_dist_inventory() {
node --import tsx --input-type=module --eval \
'import { writePackageDistInventory } from "./src/infra/package-dist-inventory.ts"; await writePackageDistInventory(process.cwd());'
}
pack_main_tgz() {
local pkg
CURRENT_HEAD="$(git rev-parse HEAD)"
CURRENT_HEAD_SHORT="$(git rev-parse --short=7 HEAD)"
ensure_current_build
write_package_dist_inventory
pkg="$(
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \
| "$PYTHON_BIN" -c 'import json, sys; data = json.load(sys.stdin); print(data[-1]["filename"])'

View File

@@ -48,7 +48,7 @@ TIMEOUT_ONBOARD_S=240
TIMEOUT_ONBOARD_PHASE_S=$((TIMEOUT_ONBOARD_S + 120))
# verify_gateway_reachable runs six 30s probes plus short retry sleeps.
TIMEOUT_GATEWAY_S=240
TIMEOUT_AGENT_S=180
TIMEOUT_AGENT_S=360
FRESH_MAIN_STATUS="skip"
FRESH_MAIN_VERSION="skip"
@@ -898,6 +898,11 @@ ensure_current_build() {
[[ "$build_commit" == "$head" ]] || die "dist/build-info.json still does not match HEAD after build"
}
write_package_dist_inventory() {
node --import tsx --input-type=module --eval \
'import { writePackageDistInventory } from "./src/infra/package-dist-inventory.ts"; await writePackageDistInventory(process.cwd());'
}
ensure_guest_git() {
local host_ip="$1"
local mingit_url mingit_url_q mingit_name_q
@@ -957,6 +962,7 @@ pack_main_tgz() {
fi
say "Pack current main tgz"
ensure_current_build
write_package_dist_inventory
short_head="$(git rev-parse --short HEAD)"
pkg="$(
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \