build-win64 and build-win-arm64 both failed the v11.70 release run
(GitHub Actions run 93730167566) in "Rebuild native modules for Windows",
inside `npm install` in bundle/programs/server, while argon2's install
script compiled it:
gyp info using node-gyp@10.2.0
gyp ERR! find VS unknown version "undefined" found at
"C:\Program Files\Microsoft Visual Studio\18\Enterprise"
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! stack Error: Could not find any Visual Studio installation to use
Why. On 2026-09-07 GitHub's `windows-latest` became the
`windows-2025-vs2026` image (runner image 20260907.229.1), which carries
Visual Studio 18 (2026) and no longer 17 (2022). The node-gyp that compiles
is not one this repository installs: Meteor's bundler writes
programs/server/package.json with `"node-gyp"` pinned to the copy inside
the Meteor tool - 10.2.0 in Meteor 3.5.2 - and that version knows the major
versions 15, 16 and 17 and nothing newer. The shrinkwrap beside it does not
list node-gyp at all, so the pin is the only thing `npm install` consults.
argon2 always compiles on Windows: the amd64 bundle's win32-x64 prebuild is
there, but node-gyp-build's `node-gyp-build-test` probe runs through the
Linux-made `.bin/` shims, which are not `.cmd` files, so the probe fails and
it falls through to `node-gyp rebuild`. With Visual Studio 2022 that worked;
with 2026 and node-gyp 10 it cannot.
What changed. releases/bump-bundle-node-gyp.mjs raises an exact node-gyp pin
below 13.0.2 in a built bundle's programs/server/package.json (12.1.0 added
Visual Studio 2026 support; 13.0.1/13.0.2 fixed its version detection,
nodejs/node-gyp#3338; 13.0.2's engines accept the Node.js 24 the runners
use). It runs ONCE, in build-amd64's "Install server npm modules" step
BEFORE the first `npm install`, because every other architecture - the
Windows legs, arm64, the extra arches - reinstalls programs/server from that
same package.json, so one rewrite travels to all of them. A pin already at
or above the minimum, a range, or a bundle without a pin is left as it is,
so a Meteor release that ships a newer node-gyp keeps its own.
releases/build-release-bundle.sh does the same before its install, so a
local release bundle is what a release ships.
tests/bumpBundleNodeGyp.test.cjs pins the script's decisions (bump, keep,
no pin, dry run, unreadable, read-only), that the minimum is a node-gyp
with the Visual Studio 2026 fix, that release-all.yml runs it in the amd64
install step before `npm install` and nowhere else, and (negative) that no
workflow leg hard-codes node-gyp 10.2.0 or a GYP_MSVS_VERSION workaround.
tests/buildScriptParity.test.cjs lists the script with its bundle-time
siblings.
Not fixable from here, in the same run: the three amd64 snap jobs died in
snapcraft's LXD base-instance creation (`apt-get install -y snapd` timed
out after 600 s; the arm64 twins passed), and snap-launchpad riscv64 was
still building on Launchpad when the job cap cancelled it.
Thanks to xet7 !
Reported: checkmk warned "/tmp/.mount_wekan.OhaGOG ... 100% used"
because the AppImage runtime's own read-only squashfs mount landed on a
small /tmp (a squashfs mount always reports 100% used regardless of
size, so this was really "/tmp is too small for the AppImage", not a
leak).
The AppImage runtime mounts itself under $TMPDIR/.mount_<name>.<random>
(defaulting to /tmp) before AppRun ever runs, so the very first launch's
mount cannot be redirected from inside AppRun. AppRun now re-execs
itself once per launch with TMPDIR set to WRITABLE_PATH/app when the
caller has not already chosen a TMPDIR, so every launch from then on
mounts there instead - and, on that same first launch, sweeps out any of
WeKan's own orphaned .mount_*ekan* directories left in /tmp by an
earlier, uncleanly-killed run (a live one, matched against /proc/mounts,
is never touched).
AppImage-only: no other WeKan platform (Docker, snap, .deb, the bundle
zip) FUSE-mounts itself the way an AppImage does, so none of them are
touched. tests/appImageRuntime.test.cjs pins the relocation, the
once-per-launch/explicit-TMPDIR guards, and that only orphaned mounts
are removed.
DOCKERHUB_AUTH/QUAY_AUTH are scoped for docker login/image push, and neither
registry grants a push-scoped token the rights a repository-description
write needs - v11.62's release-all.yml run already showed this step fails
with 403 even though the image itself publishes fine (the previous commit
turned that into a non-fatal warning rather than fixing the underlying
permission gap). The maintainer now updates both registries' overviews by
hand, so remove the step entirely rather than keep maintaining a permission
workaround for it. tests/dockerRegistryOverviewSync.test.cjs is removed with
it, and its curl -X PATCH/-X PUT exemption in
tests/releaseDownloads.test.cjs is reverted since no such calls remain.
This also resolves GitHub code scanning alerts #523-#525 ("Incomplete URL
substring sanitization"), which flagged the now-deleted test file's URL
substring assertions.
Thanks to xet7.
v11.62's release-all.yml run failed the whole "docker" job with 403 from both
Docker Hub and Quay.io on the repository-overview PATCH/PUT calls added
earlier, even though the image itself had already been built, pushed and
verified pullable by the steps before it. DOCKERHUB_AUTH/QUAY_AUTH are scoped
for `docker login`/image push, and neither registry grants a push-scoped
token the broader (account-owner / repo-admin) rights a description write
needs - so the sync step's own `exit 1` failed a job that had, in fact,
already published, which blocked every downstream job gated on
`needs.docker.result == 'success'` (the Helm chart update).
A stale repository description is not worth failing a release over: the sync
step now reports each registry's failure as ::warning:: rather than
::error::, drops the shared `fail` flag, and always exits 0. Each registry
is still attempted independently. Logs (.tools/wekan11) confirm the actual
image push, manifest verification and anonymous-pull checks all succeeded
for v11.62; only this cosmetic step was ever the problem.
Thanks to xet7.
Neither registry updates its long-form repository description on its own, so
the overview shown on the repository page had drifted from what README.md
documents. Add a step to release-all.yml's docker job, after the multi-arch
image is built, pushed and verified pullable, that pushes README.md as the
overview: Docker Hub via login-for-JWT then PATCH full_description, Quay.io
via PUT description, reusing the DOCKERHUB_AUTH and QUAY_AUTH secrets already
decoded for docker login. GHCR needs no call since a linked package mirrors
its repository's README automatically. Add
tests/dockerRegistryOverviewSync.test.cjs to pin the endpoints, request
bodies, ordering and that no token is ever echoed.
Thanks to xet7.
.tools/wekan10's downloaded run logs showed "second run: WeKan answered
on port 8080 on its first attempt." print successfully, immediately
followed by "Process completed with exit code 1" - no thrown error
anywhere in between.
taskkill.exe (unlike a PowerShell cmdlet) sets $LASTEXITCODE, which
$ErrorActionPreference does not touch - that only governs PowerShell's
own errors, not a plain exe's exit code - and `pwsh -Command` exits with
whatever $LASTEXITCODE last held when the script itself never calls
`exit`. `taskkill /IM ferretdb.exe` (no matching process is a normal,
harmless outcome on the "second" run, once the first run's FerretDB is
already gone) was the LAST external command the whole step ran, so its
nonzero "no such process" exit code alone failed the step.
Reset $LASTEXITCODE after every taskkill call in this workflow whose own
exit code is not being checked - the same latent bug was present in the
"Free ports used by the packaged EXE" step's port-cleanup loop too,
which could fail the same way if the last PID it tried had already
exited between netstat and taskkill.
Thanks to xet7.
Add a read-only release consistency gate after version.sh and before the workflow commits its bump. Reject stale package, lockfile, Docker, Snap, Stacker, Sandstorm, bundle URL, or Meteor metadata versions with explicit errors and regression coverage.
Thanks to xet7 !
bcrypt and argon2 (Meteor's accounts-password) each ship one
prebuilds/<platform>-<arch>/ directory per platform they support: 21 native
binaries in every WeKan bundle, of which exactly one is ever opened. Their
loader is node-gyp-build, and its resolve() reads a single directory:
var tuples = readdirSync(path.join(dir, 'prebuilds')).map(parseTuple)
var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0]
with platform and arch from os.platform() and os.arch(). This is the same
argument bundle-trim.mjs already makes about uWebSockets.js, so it is the same
code path: --trim-prebuilds keeps the directories node-gyp-build would match
and drops the rest. The tuple parsing here IS node-gyp-build's, multi-arch
names ("darwin-x64+arm64") included, and both libc flavours of the target are
kept because glibc versus musl is decided at runtime.
Three things make it safe rather than merely smaller, and all three are pinned
by tests:
- It is off by default and REFUSES to run without an explicit --platform and
--arch. The defaults are linux/x64, and a Windows or macOS bundle trimmed
with those would lose the only addon it can load, which is precisely the
fault the single EXE was just fixed for.
- build-amd64 does NOT pass it. Every other bundle WeKan ships is that bundle
repacked, so trimming there would take the prebuilds away from
architectures that have not been built yet. Each final per-platform job
passes its own target instead.
- Every decision is made before anything is deleted, so a package whose
prebuilds cannot be reasoned about is left whole rather than half-trimmed.
Running it on a real bundle found bare-fs, bare-path and bare-url, which
ship prebuilds/ of .bare files for the Bare runtime - a different loader
with different rules. Those are left untouched, and say so.
On the mac-arm64 bundle: 19 of the 21 removed, the two for darwin-arm64 kept.
For the single Windows EXE that takes the files it has to unpack from 33 down
to about fifteen.
Two tests were counting a script named in a YAML comment as a script the job
runs, which the new comments in build-amd64 tripped. Both now drop comment
lines before looking, which is what they meant in the first place.
Thanks to xet7 !
The EXE unpacked its whole bundle - 39,035 files, 685 MB - beside itself on
first run. It does not any more. It unpacks only what cannot be virtual, and
the server reads the rest out of the EXE in its own process.
What cannot be virtual, and why: node.exe and ferretdb.exe are separate
processes, so Windows needs a real path to start one; .node addons are loaded
with LoadLibrary, same reason; main.js is the entry Node resolves before any
hook could see it; start-wekan.bat is read by cmd.exe; and wekan-vfs.cjs is
read by node --require before anything is mounted. main.js also chdir()s into
programs/server, and a working directory is a kernel concept no hook can
answer, so that one directory is created for real. That is about thirty files
out of 39,035. releases/append-windows-payload.mjs --manifest computes the
list from the archive and writes it as a C header the launcher includes, so a
bundle that gains an addon or a database tool cannot silently lose it.
The mount itself is releases/single-exe/wekan-vfs.cjs. It needs two
mechanisms, because Node needs both:
- module.registerHooks() for require(). Node's CJS loader resolves through
internal C++ bindings, so patching fs cannot make require see a virtual
file, and Module._stat is captured as a module-local inside
Module._findPath, so replacing it does nothing either. Resolution is
therefore reimplemented here - and checked against Node's own answer for
every package in a real bundle: 1407 package directories and 1865 bare
specifiers, all matching.
- fs patching for everything that is not a module. Meteor's boot.js reads
program.json and every server package with fs.readFileSync and runs them
through vm.runInThisContext, and webapp serves the client files with
fs.createReadStream.
And one thing below both: Meteor's runtime.js hands reify a resolver that
calls Module._resolveFilename directly. registerHooks sits above that call and
never sees it, so that layer is patched too.
Two traps, both hit while building this. A .node addon must be resolved with
NO format declared: saying "commonjs" for one makes Node compile the binary as
JavaScript and die with "SyntaxError: Invalid or unexpected token" on its own
header - the 11.48 crash reproduced from the other side. And a directory that
exists both really and in the archive has to merge both listings, or
wekan-app/programs/server would list the two unpacked files and hide the
entire server.
Verified end to end on a real bundle rather than by reading: with 23 real
files on disk and 38,931 served from the ZIP, WeKan boots, connects to
FerretDB and answers 200 on /sign-in and on its 6.9 MB client bundle. The
release smoke test now also counts what reached the disk, so a change that
quietly went back to unpacking everything fails the job instead of passing it.
Thanks to xet7 !
WeKan-11.48-win64.exe died on every start with a SyntaxError in
accounts-password's bcrypt/promises.js, whose first line read "MZ...This
program cannot be run in DOS mode." - the bytes of a PE file, not of the
1123-byte JavaScript file that is really there. Both published files were
correct: the win64 ZIP holds the real promises.js, and so does the EXE. In
its packed image bcrypt.node (195584 bytes) is entry 0x5c9c and promises.js
is 0x5c9d, stored back to back, each with the right bytes at its recorded
offset. What was wrong was the READ. Enigma Virtual Box served all 44,401
bundle files from a virtual filesystem inside the EXE, and once Node.js had
loaded the native addon out of it (bcrypt.js line 2), the next read -
require('./promises') on line 6, the blob immediately after that addon -
came back as the addon's own PE bytes.
So the packer is gone. The EXE is now the compiled launcher with the
published ZIP appended to it and an 80-byte trailer saying where that
payload starts, how long it is, its SHA-256 and which WeKan it is. On its
first run the launcher checks that SHA-256, unpacks the payload into a real
"wekan-app" directory beside itself with Windows' own tar.exe, and from
then on WeKan runs from ordinary files. Persistent data is untouched by
any of it: wekan-files stays a sibling, so unpacking a newer version never
reaches it. The download drops from 690 MB to about 232 MB, and a damaged
copy now stops at a checksum with a message instead of reaching Node.js as
a crash loop.
The workflow's smoke test is why this shipped at all. start-wekan.bat
restarts WeKan every three seconds, so a crash-looping EXE still answered
on port 8080 inside the poll window and the job went green. It now starts
the EXE twice - the run that unpacks and the run that must find wekan-app
already there - and fails on "WeKan exited; restarting" or "SyntaxError"
in either log.
Thanks to xet7 !
Read the newest component versions from the fixed wekan.fi/version.txt endpoint and render its strictly validated five lines as escaped preformatted text in the Admin Version pane.
Generate the same manifest and install-page block from the release's Dockerfile pins and latest validated FerretDB tag in both local and release-all website flows. Add positive, negative, workflow and UI coverage.
Thanks to xet7 !
Use the current network IPv4 address and an available web port when ROOT_URL is not configured, preferring port 80 and omitting its URL suffix. Keep bundled FerretDB on a separate loopback-only free port and report both resolved endpoints at startup across bundles, containers, AppImage, Windows and Snap.
Thanks to xet7 !
Persist seeded browser-test credentials through the native HttpOnly cookie, classify the FerretDB preflight helper correctly, and keep Windows release commands self-contained when no git remote exists.\n\nThanks to xet7 !
Make the AppImage workflow wait for its extra-architecture bundle inputs, let the riscv64 Launchpad waiter return its clean timeout status, and bypass Enigma's false legacy-Windows result before starting Node.js.\n\nThanks to xet7 !
The GitHub Actions windows-latest runner ships MongoDB Server 7.0 as a
running Windows service. The bundled FerretDB inside the packaged WeKan EXE
tries to bind to 127.0.0.1:27017 and 127.0.0.1:8088 (debug handler). When
those ports are already occupied, FerretDB exits immediately, WeKan restarts
in a tight loop, and the smoke test times out with:
The packaged EXE did not answer on port 8080.
Failing run: https://github.com/wekan/wekan/actions/runs/33253053694
Fix: add a "Free ports used by the packaged EXE before smoke test" step in
.github/workflows/windows.yml that stops the MongoDB (and mongod) Windows
service and kills any remaining process on ports 27017 and 8088 before the
smoke EXE is launched. This is CI-only and has no effect on end-user behavior.
Thanks to xet7 !
Co-authored-by: xet7 <15545+xet7@users.noreply.github.com>
Download the reviewed Enigma Virtual Box 11.30 installer from the WeKan v11.25 release and retain its pinned SHA256, so a vendor-side replacement cannot silently change the Windows packaging tool.\n\nThanks to xet7 !
Wrap the verified win64 release bundle with Enigma Virtual Box FREEWARE, launch its existing start-wekan.bat so Node.js and FerretDB SQLite run together, and keep persistent data beside the executable in wekan-files. Smoke-test the final executable and integrate it with full and missing-asset releases.\n\nThanks to xet7 !
Apply persisted profile languages reactively after login resume, give the speech-scroll regression a deterministic overflow region, and bound every job inside the reusable AppImage workflow while teaching the release guard about callable jobs.
Thanks to xet7 !
Call the reusable AppImage workflow after the core GitHub Release publishes its amd64 and arm64 bundles. Pin the exact release tag, grant release-asset write permission, keep downstream packaging parallel, and add regression coverage for the dependency and reusable-workflow interface.
Thanks to xet7 !
Set a 1 GiB V8 heap default in the generated AppRun for i686 and armhf while preserving explicit NODE_OPTIONS. This protects AppImages rebuilt around an already-published bundle whose launcher predates the 32-bit heap fix, which is why the v11.15 i686 rerun still died during snapshot deserialization. Extend regression coverage for the old-bundle boundary.\n\nThanks to xet7 !
Keep the automatically selected V8 heap within the address space of a 32-bit bundled Node binary, so i686 can deserialize its startup snapshot. Probe the inner bundled Node before smoke-testing an AppImage, so an armhf runner without the hard-float loader is reported as unchecked instead of as a broken application. Add plain-Node regression coverage for the heap limit, override, capability probe and HTTP test ordering.\n\nThanks to xet7 !
Keep the flattened Launchpad snapshot deterministic across retries, stop the local riscv64 waiter before GitHub's six-hour cap, and publish only after a validated snap was downloaded. Add positive and negative workflow regression coverage.
Thanks to xet7 !
Keep a validated snap when Snapcraft only fails during post-download cleanup,
and skip optional Launchpad builds whose release bundle is absent.
Thanks to xet7 !
v10.98's log shows the trim doing exactly what it was meant to and then being
thrown away:
--- .meteor-spk/bundle: 856M total (first pack, fails)
bundle-trim: removed 5236 files, 355 MiB
prune-unreachable-npm: removed 28 package(s), 49.9 MiB
--- .meteor-spk/bundle: 424M total (424M + 336M deps = 760M, under 1 GiB)
Building Meteor app... <- pack rebuilds it
App exceeds uncompressed size limit of 1 GiB
`meteor-spk pack` runs the Meteor build first, so the retry regenerated the
bundle and packed the untrimmed one.
I HAD THIS WRONG, and the comment in this file said so confidently: v10.95's
"pack REUSES the bundle" was inferred from a 852M -> 833M reading taken right
after the prune - the same point in the sequence as the 424M above - and never
checked against what the SECOND pack did. The trim never survived a pack.
Sandstorm's own `spk pack` does only the packing: it reads
sandstorm-pkgdef.capnp, whose sourceMap searchPath is exactly the two trees the
trim has just finished with, and signs with ~/.sandstorm-keyring. The retry uses
that when the binary is there - the job installs Sandstorm, so it is - and falls
back to meteor-spk with a ::warning:: saying the fallback undoes the trim,
rather than failing silently in a way that looks like the trim not working.
Unverified here: this sandbox has no spk binary, so the invocation is written
from the pkgdef's own contract rather than run. The next release either packs or
says which of the two paths it took.
Thanks to xet7 !
v10.97 shipped a bundle that crash-looped:
Error: Cannot find module ".../nodemailer-openpgp/lib/nodemailer-openpgp.js"
at packages/email.js:347
packages/email.js does not require() that package. Meteor compiles an ESM import
to its own linker call:
module.link('nodemailer-openpgp',{openpgpEncrypt(v){openpgpEncrypt=v}},6);
and prune-unreachable-npm.mjs only ever looked for require(). So it missed every
ESM import in every Meteor package, which is most of them, and reported live
code as dead. The reachable count goes from 211 to 450 with the fix - the
measurement that entry was based on was badly wrong, not marginally.
Four forms count now: require(), module.link(), module.watch(require()) and
module.dynamicImport().
THE SAFETY WORKED, which is the one good part. With the corrected graph the
policy still named openpgp, the graph vetoed it, and the tool refused and said
so rather than deleting it. That entry is now removed outright rather than left
to be vetoed every run: the reason is what grants the permission, and this
reason - "reachable only through an optional plugin nothing requires" - was
never true. 61.3 MiB becomes 40.0 MiB, all of it typescript, @types/* and sinon.
AND THE CHECK THAT WAS MISSING BOTH TIMES. v10.96 died on a source map that had
been deleted but not un-named; v10.97 on this. Both were reasoned about by
reading the code, and reading the code is how both mistakes were made. So
releases/bundle-smoke-boot.sh starts the bundle with a database address that
cannot answer and requires it to get as far as trying to reach it - which proves
the whole server image loaded, because the database is the first thing WeKan
needs that the check does not provide. The amd64 build runs it after the trim
and the prunes, and every other architecture's bundle derives from that one.
It is verified against both real failures: a bundle with nodemailer-openpgp
removed, and a manifest naming maps that are not there. Each fails with its own
diagnosis, because the fix for each is a different one. A bundle that exits
quietly or hangs is not a pass either - a smoke test whose failure mode is
passing when it learned nothing is worth less than none.
Thanks to xet7 !
programs/server/npm/node_modules is 347 MB of an ~850 MB bundle, and measuring
its require graph says 206 MB of that is unreachable from any server entry
point. Two things cause it, neither a bug in Meteor:
* the tree is OUTSIDE the bundler's graph. Meteor 3.5 compiles through rspack
- the server output is minified and programs/server/app/app.js requires only
76 bare specifiers, because rspack inlined the app's real dependencies into
it - but this tree is what Atmosphere packages declare with Npm.depends() and
load through Npm.require(), which rspack cannot follow. The tree is largely
the INPUT to a build whose OUTPUT ships beside it;
* it is a full `npm install`, devDependencies included.
Duplication is the smaller half: 586 distinct packages exist as 815 copies, but
the redundant copies are only ~28 MB, because Meteor keeps per-package
node_modules on purpose so packages can pin conflicting versions.
releases/prune-unreachable-npm.mjs removes 61.3 MiB of it, in four categories
whose reason is PROVABLE rather than merely plausible - the standard the
uWebSockets.js removal met:
* typescript, 23.2 MiB - a devDependency of 196 packages here (the @aws-sdk
family) and a runtime dependency of none;
* openpgp + nodemailer-openpgp, 21.3 MiB - reachable only through an optional
nodemailer plugin nothing in meteor/email requires;
* @types/*, 9.6 MiB across 24 copies - verified to contain no .js at all, so
no require() can resolve into one;
* sinon, 7.2 MiB - a test framework inside meteor/ostrio_files.
The remaining 145 MB of unreachable packages STAYS. jquery, hotkeys-js and the
@azure storage adapters are almost certainly dead too, but "almost certainly" is
not the standard, and the tail of 590 packages is where a static scan is most
likely to be wrong.
Two independent safeties, because this is riskier than the uws removal was. The
reachable set is recomputed from the bundle every run and deliberately
OVER-approximated - once a package is reached, every file in it is scanned and
every require() string literal counts. The policy then only proposes; the graph
has a VETO, so an entry whose package is actually required is refused and said
out loud rather than applied. And after deleting, every path in the reachable
set must still exist or the run fails.
Verified on a real bundle: 473M -> 410M, and the reachable count is 211 before
and after - nothing that was reachable became unreachable. A second run finds
nothing left to do.
Thanks to xet7 !
The .zip bundles and the Docker image were trimmed with --keep-maps, so only
Sandstorm - which had a 1 GiB ceiling to get under - dropped them. Every
platform drops them now.
152 MiB per bundle, measured: 188 MiB of maps across 4766 files, less the 36 MiB
in web.browser.legacy that --drop-legacy-client already takes with it.
Nothing on any loading path reads one. A source map translates a position in
built code back to the source that produced it - this bundle's server side is
one 117 MiB programs/server/app/app.js, and its 58 MiB app.js.map is what turns
`app.js:1284531` into a file and a line. The two things that read it are browser
devtools, which fetch the .map only when they are open, and Node stack traces
through source-map-support. A released bundle has neither attached to it.
The `//# sourceMappingURL` comments stay behind, and are comments: a missing
target means devtools shows compiled positions and a server stack trace prints
bundle offsets. Debugging a production crash goes back to reproducing it against
a development build, which is where the maps still are.
Thanks to xet7 !
uws is not reliable enough yet to be what a default points at, so nothing WeKan
ships selects it any more, and nothing carries the module.
DEFAULTS. Every docker-compose file, start-wekan.sh, start-wekan.bat, build.sh,
build.bat, the image's own ENV block, the snap config and the Sandstorm grain
now say sockjs. The commented-out `#- DDP_TRANSPORT=uws` alternatives beside
them are replaced by a note saying why there is no alternative, rather than
advertising a value that no longer works.
BUNDLES. Every place a built bundle is post-processed - the amd64 build, each
per-arch rebuild, the repack container, install-node-for-arch.sh and the
Dockerfile - now runs bundle-trim.mjs beside the prune it already ran:
* --transport sockjs removes uWebSockets.js entirely. 121 MiB of prebuilt
binaries for OS/CPU/ABI combinations one machine cannot use, and a sockjs
server never requires the module at all: ddp-server's
`Npm.require('uWebSockets.js')` is inside the uws transport's setup(), which
runs only for the transport that was chosen.
* --drop-legacy-client removes programs/web.browser.legacy, a whole second
copy of the client for browsers without modern JS. 81 MiB measured. Meteor
supports running with architectures excluded and says so in webapp's
categorizeRequest(): "If our preferred arch is not available, it's better to
use another client arch that is available than to guarantee the site won't
work". An old browser is served web.browser; the 404 branch below that is
reached only when NO arch matches, which cannot happen while web.browser is
there, and autoupdate iterates the programs that actually loaded.
The files are only half of it. The arch is NAMED in programs/server/config.json
and star.json, and boot.js builds a dynamic-import root for every name in the
first - so the name is removed with the files. Those manifests are mode 444
as Meteor writes them, so they are made writable, rewritten, and set back:
failing there would leave the one state that actually breaks a server, files
gone and manifests still naming the arch.
UPGRADES. An existing docker-compose.yml that says DDP_TRANSPORT=uws would ask
the new image for a module it does not have and crash-loop on the require. So
wekan-entrypoint.sh and the bundle's start-wekan.sh coerce uws back to sockjs
before starting anything, and print why - a setting silently ignored is worse
than one that fails.
tests/sockjsEverywhere.test.cjs pins all three halves together, because each is
useless or harmful without the others: a default without the coercion is an
upgrade trap, a coercion without the trim is dead weight, and a trim without
both is a crash. tests/bundleTrim.test.cjs covers the legacy removal, the
manifest deregistration and the read-only rewrite.
Thanks to xet7 !
Trimming uWebSockets.js down to the prebuilds a grain's own platform can open
freed 93M of its 121M. It can all go, because a grain loads NONE of it.
The uws transport is optional in Meteor 3. `ddp-server`'s transports/index.js
resolves the transport from `Meteor.settings.packages['ddp-server'].transport`,
then `DDP_TRANSPORT`, then `DISABLE_SOCKJS`, and DEFAULTS to sockjs - and
`Npm.require('uWebSockets.js')` sits inside the uws transport's `setup()`, which
runs only for the transport that was actually chosen. `sandstorm-pkgdef.capnp`
sets none of those, and its `environ` is by its own comment the app's ENTIRE
environment, so a grain has been running sockjs all along while carrying 121M of
a module it never required.
So the pkgdef now PINS `DDP_TRANSPORT=sockjs` - the removal should rest on a
stated fact, not on an upstream default staying put - and `bundle-trim.mjs`
takes `--transport sockjs`, which removes the module whole rather than thinning
its prebuilds. 120 MiB measured, 27 MiB more than the platform trim, and the
.spk is now ~860M against the 1 GiB limit.
It is a FLAG and not the default because WeKan asks for uws nearly everywhere
else - docker-compose, start-wekan.sh, build.sh - and those bundles keep the
module, trimmed to the prebuilds their own platform can open.
tests/bundleTrim.test.cjs ties the grain's pinned transport to the flag the .spk
is trimmed with. If they ever disagreed, the grain would require a module that
was left out and fail to boot, which is the one way this can go wrong.
Thanks to xet7 !
Pressing Cancel on a release-all run did not stop the `docker` job: it kept
going for another twenty minutes and would have pushed a multi-arch image for a
release that was being abandoned.
The cause is `always()`. It is true while a run is CANCELLING, which is exactly
why it was chosen in v10.80 — a `build-mac-x64` queued on a runner label GitHub
had retired sat for two hours, was cancelled by hand, and that cancellation
SKIPPED `charts`, `ucs` and `nextcloud`, so the Helm chart for a published WeKan
was never pushed. `always()` fixed that by ignoring cancellation entirely, and
ignoring cancellation is also what disabled the Cancel button on a job that
takes hours.
`!cancelled()` keeps the half that matters — do not skip me because a SIBLING
failed — and drops the half that overrides a person. Nine job-level conditions
across release-all.yml, release-all-missing.yml, Flatpak.yml and AppImage.yml
change; the 22 step-level `if: always()` reporting steps do not, because those
correctly print CANCELLED.
That alone would reopen v10.80, so the other half of the fix is that no job
needs a hand cancellation any more: the eight jobs that had no `timeout-minutes`
now have one, and every job in release-all.yml is bounded. A stuck job FAILS on
its own, and a failure satisfies `!cancelled()` the same way `always()` let it
through. Cancel is left meaning only what a person meant by it.
tests/releaseCancelSafeJobs.test.cjs records both incidents and now pins the
opposite of what it used to: no job-level `always()` anywhere, and a timeout on
every job.
Thanks to xet7 !
v10.94's log shows the report printing NOTHING:
--- packing (Sandstorm refuses over 1 GiB uncompressed)
Building Meteor app...
meteor-spk pack is what BUILDS the Meteor app - "Building Meteor app..."
comes after it starts - so .meteor-spk/deps and .meteor-spk/bundle do not
exist until it has run. The report was measuring two directories that were
not there, found neither, and skipped both silently. A diagnostic that runs
before the thing it diagnoses tells you nothing, which is what v10.94 got.
The sizes are taken AFTER pack now: on failure, which is when they are the
whole point, and on success, where the headroom against 1 GiB is worth
knowing before the next thing is added. du -shL DEREFERENCES, because deps
is a symlink to the tree build-deps.sh assembles and plain du -sh on a
symlink reports the link, not the gigabyte behind it. The bundle's server
packages are listed separately, since they are the part every other bundle
prunes.
And ONE bounded retry, which is a real attempt at the fix rather than more
looking. meteor-spk pack runs npm install inside the bundle's
programs/server - that is where tar@6.2.1 and node-gyp's tree come from in
the log - and the Sandstorm leg is the only one that never removes them
afterwards; prune-build-only-modules.mjs drops 83 of 120 packages
everywhere else, and nothing in a packed app runs any of them. Whether it
helps turns on something no log has answered yet: does a second pack REUSE
.meteor-spk/bundle or rebuild it and undo the prune? Both answers are
useful and neither is worse than the hard failure we have now - if it
rebuilds, the second failure is identical and the log says the prune was
undone; if it reuses, the .spk packs. It runs once, only after a failure,
and only if the bundle is actually there.
Exercised both paths against a mock pack: the failure path reports sizes,
prunes, retries and still exits 1 with the reason; the success path packs
and reports as before.
Thanks to xet7 !
v10.93: build-win64 and build-win-arm64 both failed, and both had already
built the bundle and compiled its native modules. What killed them was one
line of bump-bundle-npm-deps.mjs:
Error: spawnSync npm ENOENT
npm on Windows is npm.cmd, a batch script, and Node applies no PATHEXT when
it spawns - so execFileSync('npm', ...) resolves to nothing. build-win32 was
skipped that run for want of a published Node.js, so it never reached this
and looked fine; the fault was never architecture-specific.
npm's own CLI is run with the Node already running instead:
execFileSync(process.execPath, [npm-cli.js, ...]). No PATH lookup, no
PATHEXT, no shell - and the same npm either way. shell: true would have
found the .cmd and broken differently, because with a shell Node joins the
arguments and quotes NOTHING, so the first Windows temp path with a space
would corrupt the install. A bare npm on PATH remains as the last resort,
for a Node with no npm beside it, and on Windows it now says which case
that is instead of letting ENOENT speak for itself.
Verified end to end: a fake bundle holding qs 6.0.0 is bumped to 6.15.3
through the new path, with its new dependencies copied in beside it.
Also, build-sandstorm failed with "App exceeds uncompressed size limit of
1 GiB" and nothing else - no list, no sizes, and the .spk that would have
shown them was never written. sandstorm-pkgdef.capnp packs alwaysInclude =
["."] from .meteor-spk/deps and .meteor-spk/bundle, so everything in both
trees counts. The step now prints the total and the twenty biggest
directories of each BEFORE packing, so the next run says what to trim
rather than only that trimming is needed. Trimming it needs a run to
verify, so it is recorded rather than guessed at.
Thanks to xet7 !
The release job failed before running a line of its script:
##[error]An error occurred trying to start process /usr/bin/bash with
working directory /home/runner/work/wekan/wekan. Argument list too long
Nothing in the step was wrong. The notes are the whole newest CHANGELOG
section - prepare measured them at 172,458 characters - and they reached
the step as env: CHANGELOG. Linux caps a SINGLE argv/envp string at
MAX_ARG_STRLEN, 128 KiB, so execve refused to start the shell at all. Both
bundles had built and verified; the release, and every job that needs it -
snap, docker, AppImage, the Windows and macOS bundles - never happened.
The environment was itself the fix for the previous failure: interpolated
inline as ${{ }} the notes become part of the shell SOURCE, so a backtick
in any `code` span runs as a command, which is how v10.59 published nothing
and printed "Incorrect: command not found". One shape is unsafe, the other
does not scale, and this release was big enough to find the second wall.
So the notes stop being a shell value at all. releases/release-notes.sh
prints the CHANGELOG section for a version, reading the file itself and
taking its arguments from the environment inside a QUOTED heredoc; the jobs
append its stdout to release-notes.md. Only file paths are passed around,
which has no size limit and leaves the text as data no shell ever parses.
prepare keeps the validation - a missing section is still cheap to fix
there - but no longer publishes the text as a job output, because an output
nobody can safely consume is a trap for the next person. The release job
and the notes-rewrite job check out ref: main, the same ref prepare read.
The guard test is rewritten around the new shape: no changelog job output,
no CHANGELOG in an env:, no interpolation into a script, and the extraction
script is what all three consumers run. It kept passing through this
failure, because it only knew about the injection.
Thanks to xet7 !
The v10.91 release run failed in four jobs. Three of them - s390x, ppc64el and
riscv64 - had done all the work: each snap built on Launchpad and each was
published to the Snap Store. What failed was attaching it to the GitHub Release:
HTTP 404: Not Found (https://uploads.github.com/repos/wekan/wekan/releases/
370103352/assets?label=&name=wekan_10.91_s390x.snap)
The step collected the file with two patterns, `wekan_${VERSION}_<arch>*.snap`
and `*_<arch>.snap`, and a snap called `wekan_10.91_s390x.snap` matches both -
so the same path went to `gh release upload --clobber` twice. Asked to attach
one name twice, it deletes the asset it has just uploaded and then 404s on it.
The two other places in the same job that build this list were already piped
through `sort -u`; this one was missed.
It is deduplicated now, and the attach is confirmed from the other side the way
the native snap job already did: read the release's assets back and fail if this
snap is not among them. An upload that reports success and leaves nothing behind
is the failure nobody notices until a download 404s - and every job that lost an
architecture had already said the snap was built and published.
The fourth failure, armhf, is not this: snapcraft died with SSLEOFError while
downloading the build log from Launchpad, on all three attempts, and produced no
snap.
tests/releaseSnapArches.test.cjs now requires every snap list to be
deduplicated, and the attach step to read the assets back.
Thanks to xet7 !
A container scan of ghcr.io/wekan/wekan:v10.91 reported 80 findings against
"Node.js", three of them CRITICAL, and not one of them was in code WeKan
runs.
Three CRITICAL and most of the HIGH findings were three copies of one
package - tar 6.2.1 twice, tar 7.5.11 once - carried by two BUILD tools
left in the finished image:
- node-gyp and @mapbox/node-pre-gyp are meteor-dev-bundle dependencies that
compile native modules during the npm install in programs/server. WeKan
compiles nothing at run time; uWebSockets.js, bcrypt and argon2 all ship
prebuilt .node files that node-gyp-build picks at require time. Their tree
is 83 of the 120 packages that install leaves behind, and it brought tar
6.2.1 (node-gyp, cacache), brace-expansion, minimatch and npm's networking
stack with it.
- npm itself runs exactly once, for that install. The container starts bash
/build/wekan-entrypoint.sh and never calls it, so its bundled tar 7.5.11,
sigstore 4.1.0, @sigstore/*, ip-address 10.1.0 and brace-expansion 5.0.4
were image content no code path could reach.
releases/prune-build-only-modules.mjs removes the first. It is a
REACHABILITY walk, not a list of 83 names - start from every dependency of
programs/server/package.json except those two, follow each package's own
dependencies, keep the closure - so it does not go stale when Meteor
changes its dev-bundle. The Dockerfile removes npm and npx in cleanup;
node stays. Verified by booting the pruned bundle: identical failure at the
database, no missing module.
The rest of the report was the npm packages Meteor's own packages bundle -
nodemailer 8.0.3, openpgp 5.11.1, svgo 2.8.2, postcss 8.5.1, nanoid 3.3.15,
qs 6.13.0, cookie 0.4.1, on-headers 1.0.2, tmp 0.2.3, lodash 4.17.21, diff
3.5.0, body-parser 1.20.3, @babel/runtime 7.20.7, underscore 1.13.7.
Npm.depends names an exact version and meteor build copies it into
programs/server/npm/node_modules/meteor/<package>/node_modules, where no
package.json or overrides entry here is consulted - so the bundle is the
only place they can be raised.
releases/bump-bundle-npm-deps.mjs does that from the minimums in
releases/bundle-npm-security-bumps.json, with --ignore-scripts so no
prebuilt native is rebuilt, replacing only copies below the minimum.
A minimum stays inside the major the package was built against, and that
was learned rather than assumed: uuid's lowest fixed release, 11.1.1, moved
its entry point to dist/cjs/index.js and the bundle - which recorded
dist/index.js at build time - died on boot with "Cannot find module
.../uuid/dist/index.js". It is in notFixable with that error, beside
lodash.template, which has no fixed release at all.
Both run in every place a bundle is made: the amd64 build, the arm64
container, three Windows legs, two macOS legs, install-node-for-arch.sh for
the emulated arches, and the Dockerfile - each reinstalls programs/server,
which is also why each bumps again (meteor-dev-bundle pins underscore
1.13.7, CVE-2026-27601, over the bumped copy).
tests/imageBuildOnlyModules.test.cjs and
tests/bundleNpmSecurityBumps.test.cjs pin both, and buildScriptParity's
skip list records why these two scripts are not menu entries. The debian
13.6 target's 176 findings are all "Fixed in: -" and no upgrade closes
them; the build/<tool> and build/ferretdb targets are fixed in
wekan/mongo-tools-patches and wekan/FerretDB.
Thanks to xet7 !
v10.89's riscv64 leg ran 5h50m - its cap - with Launchpad still printing
"Building: riscv64", and the run showed CANCELLED and nothing else. What is
true at that moment is worth saying: the Launchpad build is NOT cancelled with
the job, it keeps its name, and re-running this job reconnects to the same
build and downloads the snap rather than starting another one.
The cap goes to 360 minutes, which is the maximum a hosted runner allows, and a
cancelled job now prints that explanation plus any Launchpad URL its logs
carry.
Thanks to xet7 !
v10.89's snap-launchpad armhf, ppc64el and s390x jobs published the snap and
then failed on the line that attaches it to the GitHub Release:
Revision 3661 created for 'wekan' and released to 'beta', 'candidate',
'edge', and 'stable'
no git remotes found
Error: Process completed with exit code 1
Those jobs flatten history so the Launchpad push stays small, and the git
remote goes with it - so gh had nothing to infer the repository from. The snap
was in the store and not on the release, which reads like a failed build.
Every `gh release upload|view|edit` in every workflow now passes
--repo "${GITHUB_REPOSITORY:-wekan/wekan}", so the call does not depend on what
the checkout looks like, and tests/workflowRepoScripts.test.cjs fails a bare
one.
Thanks to xet7 !
From #6583: "the migration re-ran yesterday (even though it had already run
successfully a few weeks ago). The .migration-to-ferretdb-done file is time
stamped yesterday ... That explains why I'm seeing old data."
The instance had been migrated and had served from FerretDB for weeks. The
marker went missing, the old staleness guard put it back on database=mongodb,
and the migration ran again - importing the MongoDB copy it had been made from,
over the database holding every change since. discard_partial_ferretdb could
then delete that database, because "partial" was assumed rather than checked.
Two locks now, opened by the same fact: the importer writes
migration-progress.json as it goes and resumes from it, so a FerretDB with data
and NO checkpoint beside it is a finished database in use, never a migration to
continue.
- migration-control checks that before it probes, reads or deletes anything.
Finding one, it marks the migration done, starts FerretDB, stops MongoDB and
exits without importing.
- discard_partial_ferretdb checks it again before removing a SQLite, and says
so when it declines.
The MongoDB data is untouched either way. migration-pending already answers the
same question through database-role, so neither branch should be reachable,
which is why they exist: the cost of being wrong here is somebody's data.
Also from the v10.89 run:
- The push preflight I added blocked the Docker publish on a false positive.
GHCR hands back an OPAQUE token ("v1:wekan/wekan:1786595038984745940", no
dots, no claims), and reading no "push" in it was treated as a refusal.
Only an explicit refusal fails now - an access claim naming the repository
whose actions omit push, which is what Quay and Docker Hub return - and an
unreadable token says so and lets the push be the check. Verified against
all three registries.
- snap-launchpad armhf, ppc64el and s390x uploaded a file that existed and
was not a snap ("could not unsquash snap file"). A .snap is squashfs, so it
starts with "hsqs": the build step now checks that and a 50 MB floor,
deletes a stale file before each attempt so a truncated one cannot be picked
up, deduplicates the two globs that matched the same file twice, and the
upload step checks the magic again with its own message.
Thanks to lukechao and xet7 !
wekan-ondra and wekan-gantt-gpl are SNAP names - a snap name cannot be changed
once people have it installed - and as Docker images they were only ever a
second name for the same image. The release tagged them on all three registries
for two versions; it does not any more.
Six extra repositories across three registries, each with its own visibility and
its own push permission, is six new ways for a release to fail in order to
publish a copy of something already published, and v10.88 failed exactly that
way an hour into an emulated build:
ERROR: failed to push quay.io/wekan/wekan-ondra:v10.88:
unauthorized: access to the requested resource is not authorized
The wekan image still goes to all three: wekanteam/wekan, quay.io/wekan/wekan
and ghcr.io/wekan/wekan, version tag and latest.
The variant -t lines are COMMENTED OUT, not deleted, with what it would cost to
uncomment them written beside them, and the same for their names in the two
verification loops and the push preflight. docker-variant.yml and
releases/docker-publish-variant.sh stay for publishing one out of band; both are
started by hand and no release calls them.
The SNAPS are untouched: snap-variants still builds and publishes wekan-ondra
and wekan-gantt-gpl on amd64 and arm64, and SNAP_AUTH still carries all three
snap names. Nothing is deleted from any registry either - the tags that exist
keep working for whoever pinned them, they only stop gaining versions.
tests/dockerNoVariantImages.test.cjs replaces the two suites that pinned the
opposite decision: no active variant tag or check, the comments and their
reason present, the manual workflow still dispatch-only, and the snaps still
built.
Thanks to xet7 !
The v10.89 run failed four more jobs, the same two mistakes one step further
along.
THE WINDOWS JOBS check this repository out to path: src, so the scripts were
addressed as src/releases/... - correct until the bcrypt step does
pushd "$TMP", after which a relative path resolves against a temp directory:
bash: src/releases/npm-retry.sh: No such file or directory
The location is now fixed before anything moves - SRC="$PWD/src" at the top of
the step, then "$SRC/releases/..." - in the eighteen blocks that need it, and
the same for the ucs job's univention/.
THE DOWNLOADS THAT ARE NOT IN A WORKFLOW. snapcraft.yaml builds the snap in its
own container and sandstorm-src/build-deps.sh runs on the runner; both still
used a bare curl, and github.com's 503s took them out:
:: curl: (56) Connection died, tried 5 times before giving up
:: caddy: no linux/arm64 archive in Caddy 2.11.4 - nothing left to try.
==> [4/7] FerretDB v1 (amd64) at deps root
curl: (56) Connection died, tried 5 times before giving up
Both go through releases/fetch.sh now - the snap parts reach it through
CRAFT_PROJECT_DIR, since snapcraft mounts the project into the build - so the
caddy, MongoDB, mongod 4.2/5.0 and OpenSSL downloads, the meteor-spk and
Node.js tarballs and the FerretDB binary all wait an outage out. The Caddy
version LOOKUP stays a plain curl: when it fails the pinned version is used,
which is what it is for. curl https://install.sandstorm.io | sudo bash became a
download and a run, because a pipe cannot be retried.
tests/workflowRepoScripts.test.cjs grew the two checks that would have caught
these, and releaseBuildJobsCheckout accepts $SRC/releases as the same statement
as src/releases, made absolute.
Thanks to xet7 !
The v10.88 run lost seven jobs to two mistakes of the same kind.
THE SCRIPTS WERE NOT ON DISK YET. Putting the downloads and package installs
behind releases/fetch.sh and releases/apt-install.sh turned steps that needed
nothing into steps that need this repository:
bash: /home/runner/work/wekan/wekan/releases/apt-install.sh: No such file or directory
bash: D:\a\wekan\wekan/releases/npm-retry.sh: No such file or directory
build-extra-arches had "Install dependencies" as its first step, before
actions/checkout - which was fine while it was a plain apt-get. The Windows
jobs check this repo out to path: src, so $GITHUB_WORKSPACE/releases does not
exist there; they already called the other scripts as src/releases/... Same two
shapes in the Flatpak job (no checkout at all), release-all-missing's
extra-arches and charts (path: wekan), and ucs (path: univention).
tests/workflowRepoScripts.test.cjs reads every workflow for a step that runs a
repo script before its job checks out, or through a prefix that does not match
that job's checkout path, and for a script a workflow names but the repo does
not have.
AND THE PUSH THAT WAS NEVER GOING TO WORK. The docker job built every
architecture under emulation for most of an hour and threw it away on
ERROR: failed to push quay.io/wekan/wekan-ondra:v10.88: unauthorized
The credentials were fine; the login check passed. Quay grants push per
REPOSITORY and wekan-ondra had just been created, so the account had no rights
on it. The job now asks each registry whether it would grant a push token for
each of the nine images, before building anything, and fails in seconds naming
the per-repository permission. No answer is a warning - that is the network.
Verified against the real registries: an unauthenticated request is granted
"pull" by Quay and nothing by GHCR, which is the shape this detects.
Thanks to xet7 !
The bump job of the same afternoon died on a repository the release does not
use:
E: Failed to fetch https://dl.google.com/linux/chrome-stable/deb/dists/stable/main/binary-amd64/Packages.gz
Hash Sum mismatch
E: Some index files failed to download.
Error: Process completed with exit code 100.
It was installing python3 and curl. A GitHub runner ships with google-chrome,
microsoft-prod, azure-cli and docker repositories configured, and apt-get
update fails as a whole when any one of them serves an index that does not
match its own hashes.
releases/apt-install.sh retries the update, clearing the cached lists first,
because a Hash Sum mismatch is a cached index disagreeing with the server and
re-reading it reports the same thing. If it still fails, it moves the
third-party lists aside and updates from the distribution archive alone - where
every package a release job installs comes from. Both steps say so in the log,
and a mirror that never comes back still fails the job, naming the mirror.
Every apt-get update + install pair in release-all.yml, release-all-missing.yml,
sandstorm.yml, sandstorm-store.yml, meteor-spk.yml, Flatpak.yml and the emulated
build container goes through it.
tests/releaseAptInstall.test.cjs drives it with a fake apt-get that mismatches
on demand and a fake sudo that records rather than runs. cpuExecWiring's
qemu-user-static guard now looks for the package wherever it is asked for, not
only after a literal apt-get install.
Thanks to xet7 !
github.com spent the afternoon returning 503, and it took a second release run
an hour after the first - this time in build-amd64, downloading the FerretDB
binary:
curl: (22) The requested URL returned error: 503
Warning: Problem : HTTP error. Will retry in 10 seconds. 5 retries left.
...
curl: (56) Connection died, tried 5 times before giving up
nodejs.org was fine in the same step, seconds earlier: the bundled Node.js
downloaded and verified. --retry 5 --retry-delay 10 is fifty seconds.
releases/fetch.sh downloads a file in a release now. 5xx, 429, 408 and the
connection errors are retried on a backoff of about fifteen minutes, and every
download in release-all.yml, release-all-missing.yml, embed-verified-node.sh,
install-node-for-arch.sh and resolve-node-source.sh goes through it. The
Dockerfile copies it in beside resolve-node-source.sh, which asks it which
Node.js builds exist, and its two bare wgets get the same --retry-on-http-error
as the others.
A 404 is not an outage, and that is the half a longer --retry cannot do. The
preflight that skips an architecture with no Node.js build yet, the MongoDB
tools not built for every platform, the .sha256sum a source may not publish:
those fail at once, and quietly with --optional.
An existence check has three answers - present, absent, and the server would
not say. The third used to be the second, which is how a 503 could drop a
platform from the Docker image or skip an architecture whose binary was
published all along. check-arch-binaries.sh, require-binaries.sh and the docker
job's platform list now stop and say to re-run instead.
tests/releaseDownloads.test.cjs runs it against a local server that 503s, 404s
and 429s on demand, and reads the workflows for a download that still goes
straight to curl.
Thanks to xet7 !
The v10.86 run failed in build-amd64 with
npm error code E503
npm error 503 Service Unavailable - GET
https://github.com/meteor/node-source-map-support/tarball/81bce1f9...
github.com was 503ing for a few minutes. npm's own fetch-retries is two quick
attempts and does not cover a git tarball fetch at all, so the install gave up;
every other Linux bundle is repacked from the amd64 one, so the whole release -
eleven architectures, the Docker images, the snap - was skipped and had to be
started again by hand. Every curl in that workflow has carried --retry 5 for
years; the npm installs carried nothing.
releases/npm-retry.sh runs an npm command with backoff (15s, 30s, 60s, 120s,
five attempts) and every npm install, npm pack and meteor npm install in
release-all.yml now goes through it, including the two inside docker run, which
get releases/ mounted the way the arch builds already do. Release All Missing
repacks through the same container script and inherits it.
A real npm error is NOT retried: ERESOLVE, a 404 for a package that does not
exist, a gyp compile error fail on the first attempt saying they are not a
network reason, because five attempts at an emulated arm64 install that was
never going to work is half an hour spent to print the same message. Only 5xx,
429 and the socket errors count as transient.
The Meteor installer is downloaded and then run instead of curl | sh, which
cannot be retried once sh is half way through the script.
tests/npmRetry.test.cjs pins both halves against a fake npm and reads the
workflow for a bare npm install.
Thanks to xet7 !