Repository navigation
fix(tests): keep the update and stall-budget tests green on a release bump - #103
Merged
Merged
Conversation
…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.
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.
Fixes the three failing checks on #97, and the same two tests before it.
What failed
chore(main): release 0.4.0failed on Linux, Windows and macOS, for two unrelated reasons.The update tests named the version they were written under.
UpdateModel::newcompares a release withpackage_version(), and the tests hardcoded that version instead of deriving it:update::tests::modelwas built on0.3.0, and the shell test offered a0.4.0release. Once the package was0.4.0, that release was no longer newer, so both menus lost theirVersion 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_assetprobes 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::modelpins the version its releases are compared with, and the shell test builds its release frompackage_version(), the waytests/it/common::newer_releasealready does. Both are now stable across a bump.WINDOW * 3 + 100 ms: two windows of guard, one of probe. Measured 450 ms on an idle machine..config/nextest.tomlruns theimmich-clientlimits 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
0.4.0) and rancargo nextest run --locked --workspace: 988 tests, 988 passed. Back on0.3.0, the same run passes again.cargo nextest run --locked --workspacenow serializes onlyimmich-client'slimits::tests;sync-core's limits module is untouched.cargo fmt --all -- --checkclean.cargo clippy --locked --workspace --all-targets -- -D warningsreports only a pre-existingneedless_boolinsync-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.