Repository navigation
fix(release): stop RUSTFAVA_VERSION breaking the sidecar smoke test - #303
Merged
Merged
Conversation
The v1.32.0 desktop release failed on every platform:
Error: Invalid value for '--version': '1.32.0' is not a valid boolean.
##[error]frozen sidecar failed to start or serve (the #233 failure class)
Not a packaging problem. `desktop-release.yml` writes
RUSTFAVA_VERSION=<tag> into $GITHUB_ENV so the PyInstaller spec can bake
the version into rustfava/_version.py (#191). $GITHUB_ENV leaks into
every later step of the job, including the one that actually runs the
frozen binary — and the CLI is declared with
`auto_envvar_prefix: "RUSTFAVA"` (cli.py:51), so click reads
RUSTFAVA_VERSION as `--version`, a boolean flag. The sidecar exited on a
usage error before serving anything, and the smoke test correctly
reported it as dead.
Only tag builds set the variable, so this could not appear on a PR or on
main. v1.32.0 was the first tagged release since the smoke test was
added in #239, which is exactly when it fired: a check that only runs in
the situation nobody could test.
Renamed to FROZEN_APP_VERSION at both sites, deliberately outside the
RUSTFAVA_ prefix so no future internal variable can be re-read as a CLI
option. Verified both directions:
RUSTFAVA_VERSION=1.32.0 rustfava --port … ledger -> usage error, exit 120
FROZEN_APP_VERSION=1.32.0 rustfava --port … ledger -> serves normally
Also corrects RELEASING.md, which named a workflow that does not exist
(`build-publish.yml`, actually `publish.yml`) and stated that PyPI needs
no manual approval. The `pypi` environment has protection rules, so the
`publish` job sits in `waiting` until a reviewer approves — observed on
this very release, where build/docker/smoke-wheel completed unattended
and only PyPI stopped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v1.32.0 desktop release failed on every platform:
Not a packaging problem
desktop-release.ymlwritesRUSTFAVA_VERSION=<tag>into$GITHUB_ENVso the PyInstaller spec can bake the version intorustfava/_version.py(#191).$GITHUB_ENVleaks into every later step of the job — including the one that actually runs the frozen binary.The CLI is declared
@click.command(context_settings={"auto_envvar_prefix": "RUSTFAVA"})(cli.py:51), so click readsRUSTFAVA_VERSIONas--version, which is a boolean flag. The sidecar exited on a usage error before serving anything, and the smoke test correctly reported it dead.Only tag builds set the variable, so this could not appear on a PR or on
main. v1.32.0 is the first tagged release since the smoke test was added in #239 — a check that only runs in the one situation nobody could test.Fix
Renamed to
FROZEN_APP_VERSIONat both sites, deliberately outside theRUSTFAVA_prefix so no future internal variable can be re-read as a CLI option.Verified both directions locally:
Also: RELEASING.md was wrong twice
Found while working the release:
build-publish.yml, which doesn't exist — the workflow ispublish.yml.pypienvironment has 2 protection rules, so thepublishjob sits inwaitinguntil a reviewer approves. Observed on this release:build,dockerandsmoke-wheelall completed unattended and only PyPI stopped.