Skip to content

fix(tests): keep the update and stall-budget tests green on a release bump - #103

Merged
elementalvoid merged 2 commits into
mainfrom
fix/release-bump-tests
Nov 14, 2026
Merged

elementalvoid merged 2 commits into
mainfrom
fix/release-bump-tests

Conversation

@elementalvoid

Copy link
Copy Markdown
Owner

Fixes the three failing checks on #97, and the same two tests before it.

What failed

chore(main): release 0.4.0 failed on Linux, Windows and macOS, for two unrelated reasons.

The update tests named the version they were written under. UpdateModel::new compares a release with package_version(), and the tests hardcoded that version instead of deriving it: update::tests::model was built on 0.3.0, and the shell test offered a 0.4.0 release. Once the package was 0.4.0, that release was no longer newer, so both menus lost their Version 0.4.0 is available… item. This would have broken every future bump the same way.

The mid-body stall budget forgot a window. upload_asset probes the server for the asset after a lost upload, and that probe runs its own window out when the server answers nothing. The ceiling counted only the guard's two, so an honest run took 450 ms of the 500 ms the test allowed. That test also failed on main before the release (43558371203, 619 ms) and on this PR (608 ms) — a pre-existing flake, not a bump artifact.

What changed

  • update::tests::model pins the version its releases are compared with, and the shell test builds its release from package_version(), the way tests/it/common::newer_release already does. Both are now stable across a bump.
  • The mid-body ceiling is WINDOW * 3 + 100 ms: two windows of guard, one of probe. Measured 450 ms on an idle machine.
  • .config/nextest.toml runs the immich-client limits tests one at a time. They measure a 200 ms window on the wall clock, and three other tests sharing a 4-vCPU runner can wake that timer a window late: eight copies on two cores reproduce the CI failure, and serialized the run is 450 ms of its 700 ms.

Evidence

  • Simulated the bump locally (all five manifests at 0.4.0) and ran cargo nextest run --locked --workspace: 988 tests, 988 passed. Back on 0.3.0, the same run passes again.
  • cargo nextest run --locked --workspace now serializes only immich-client's limits:: tests; sync-core's limits module is untouched.
  • cargo fmt --all -- --check clean. cargo clippy --locked --workspace --all-targets -- -D warnings reports only a pre-existing needless_bool in sync-core, which is a newer local clippy (1.100.0) than CI's pinned 1.99.0; with that one lint allowed the workspace is clean.

The release PR gets these once they are on main: release-please rewrites its branch on the next push.

…coding it

The update tests named the package version they were written under: the model
was built on 0.3.0 and the menu test asked for a 0.4.0 release. The release
bump to 0.4.0 made the model up to date with the release it was offered, so
both the tray and the app menu lost the "Version 0.4.0 is available…" item and
CI failed on Linux, Windows and macOS (#97).

`update::tests::model` now pins its own version, and the shell test takes its
release from `package_version()` the way `tests/it/common::newer_release`
already does, so neither moves with the next release.
`upload_asset` asks the server whether the asset landed anyway after a lost
upload, and that probe spends a window of its own when the server answers
nothing. The ceiling counted only the guard's two, so an honest run landed at
450 ms against 500 ms and CI failed at 608-720 ms (#97, and the same test on
main before it).

The ceiling now names all three windows. The limits tests also ask nextest for
every slot for the same reason, so the wall-clock budgets are not measured
while three other tests share the runner: eight copies on two cores reproduce
the CI failure, one at a time the run lands at 450 ms of its 700 ms.
@elementalvoid
elementalvoid merged commit 7baf570 into main Nov 14, 2026
4 checks passed
@elementalvoid
elementalvoid deleted the fix/release-bump-tests branch November 14, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant