-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up UI tests #342
Merged
Merged
Speed up UI tests #342
Conversation
This file contains 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
/ok-to-test sha=7ea7aa7 |
/ok-to-test sha=e248d9d |
LukeMathWalker
force-pushed
the
faster-tests
branch
from
September 22, 2024 13:37
e248d9d
to
e617916
Compare
/ok-to-test sha=e617916 |
/ok-to-test sha=a14b195 |
/ok-to-test sha=07a0248 |
/ok-to-test sha=0bef47b |
Merged
LukeMathWalker
added a commit
that referenced
this pull request
Oct 23, 2024
## 🤖 New release * `pavex`: 0.1.48 -> 0.1.49 * `pavex_bp_schema`: 0.1.48 -> 0.1.49 * `pavex_reflection`: 0.1.48 -> 0.1.49 * `pavex_macros`: 0.1.48 -> 0.1.49 * `persist_if_changed`: 0.1.48 -> 0.1.49 * `pavex_tracing`: 0.1.48 -> 0.1.49 * `pavex_cli`: 0.1.48 -> 0.1.49 * `pavex_cli_deps`: 0.1.48 -> 0.1.49 * `pavex_miette`: 0.1.48 -> 0.1.49 * `pavexc_cli_client`: 0.1.48 -> 0.1.49 * `pavexc`: 0.1.48 -> 0.1.49 * `pavex_cli_client`: 0.1.48 -> 0.1.49 * `pavex_session`: 0.1.48 -> 0.1.49 * `pavex_session_memory_store`: 0.1.48 -> 0.1.49 * `pavexc_cli`: 0.1.48 -> 0.1.49 * `generate_from_path`: 0.1.48 -> 0.1.49 <details><summary><i><b>Changelog</b></i></summary><p> ## `pavex` <blockquote> ## [0.1.49](0.1.48...0.1.49) - 2024-10-23 ### Added - Distinguish between methods and functions in error messages ([#344](#344)) - Start caching path dependencies. Use the hash of their contents to avoid serving stale data - Pavex deduplicates diagnostics, thus reducing visual noise when code generation fails ### Fixed - Pavex always uses a public path to refer to public items, even if they are defined in a private module - Detect infinite paths and break early to avoid stalls when generating server SDK crates - Ensure error observers are correctly added when dealing with errors in the call graph of a middleware of any kind - Perform cross-call-graph analysis to determine if additional .clone() statements are needed before invoking a middleware. - Don't discard spans if they match the provided log filter in pavexc ### Other - update Cargo.toml dependencies - Disable workspace hack before a release - Formatting - Speed up UI tests ([#342](#342)) - Update to latest cargo-deny ([#339](#339)) - HTTP sessions ([#338](#338)) - Update dependencies to latest possible version. In particular, update 'rustdoc-types' and the nightly version used by 'pavexc' </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). --------- Co-authored-by: pavex-releaser[bot] <ci@pavex.dev> Co-authored-by: pavex-releaser[bot] <167640712+pavex-releaser[bot]@users.noreply.github.com> Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
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.
We currently have ~140 different test projects, with the fastest platform taking almost 10 minutes to run the whole UI test suite. That's not sustainable.
This PR significantly restructures
pavex_test_runner
, the custom test harness used to write UI tests for Pavex.The main obstacle is
cargo
's locking system—each test needs to compile some crates (the generated app, sometimes an integration test) as well as generate some JSON documentation viarustdoc
. All these activities compete for the lock.This PR rearchitects
pavex_test_runner
to minimise lock contention and maximise core usage.In particular:
cargo
directly, thus avoid contention;ui_tests
. They share a single target folder and their features are unified via a dedicated workspace hack crate. This ensures that we get full cache re-use across tests.The speed-up has been substantial. In CI, we now run UI tests on Linux in ~7m compared to the ~11m we were seeing on
main
. The difference is even more extreme on Windows: from 16m to 9m. We also scored further wins there, by carving out some particularly slow tests, saving 5 minutes on executing unit tests.Some leftover work to be done in followup PRs:
test_config.toml
files are only using valid keys{prefix}_{hash}
) to avoid divergence over time