-
Notifications
You must be signed in to change notification settings - Fork 660
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
ci: improve test resilience and run style checks within cargo nextest
#9608
Conversation
This way running `cargo nextest` locally is the only thing you need to do to figure out if there are going to be any issues with landing your code. One other reason is that running the tools locally the naive way will clobber the build cache which can make iteration times slower.
When run on an m1 these can result in a very significant logging!
Checking clippy can take quite some time, and locally it is better to spend some disk space for quick reruns over having to wait 2 minutes or so before the test concludes.
It seems like we end up blocking on some directories sometimes, and
In particular a CI-specific profile that retries individual failing tests a couple times before calling the entire CI run failing is a big one as that will save on time for everybody even in presence of some spurious tests that we have. But also threads-required seems like a nice option to add to these specific time intensive tests to hopefully reduce the duration of these individual tests. I wonder if it also makes those heavy tests start in the beginning of the run?
Land the remaining improvements while waiting for the infrastructure setup to get completed.
This will mean that some tests will run multiple times until infrastructure can be changed...
Cause CI scripts can't be changed…
I anticipate that changing the script will not let the CI run…
@nikurt @Longarithm could I request a review here? |
} | ||
|
||
#[test] | ||
fn clippy() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function duplicates scripts/run_clippy.sh
. I see that you plan to delete that file in #9290.
Should be fine, but maybe add a TODO to remove the duplicated files.
@@ -31,24 +31,24 @@ fn setup_subscriber_from_filter(mut env_filter: EnvFilter) { | |||
} | |||
|
|||
pub fn init_test_logger() { | |||
let env_filter = EnvFilter::new("tokio_reactor=info,tokio_core=info,hyper=info,debug"); | |||
let env_filter = EnvFilter::new("cranelift=warn,wasmtime=warn,h2=warn,tower=warn,trust_dns=warn,tokio_reactor=info,tokio_core=info,hyper=info,debug"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -117,7 +117,7 @@ impl<S: Subscriber + for<'span> LookupSpan<'span>> Layer<S> for IoTraceLayer { | |||
} | |||
} | |||
|
|||
#[allow(clippy::integer_arithmetic)] | |||
#[allow(clippy::arithmetic_side_effects)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update docs/practices/style.md
285:`clippy::integer_arithmetic` lints.
…t` (#9608) I got absolutely fed up with waiting for prerequisite infrastructure work for #9290 (why does it have to be _that_ hard?) However the PR in question had some other important improvements that do not necessarily *rely* on changes to said infrastructure to work. In particular: * `nextest` now retries failing tests a few times before giving up, to make sure they aren't spuriously failing; * This should help some timing out integration tests in particular, as those often fail because of some deadlockish situation in my experience. * style checks still run with `cargo nextest` – unfortunately that means that in CI this will run these checks multiple times, but that doesn’t sound particularly terrible of a tradeoff (especially if the other changes mean we won't be retrying entire test suites as often anymore;) * This should allow for a greater portion of the test suite to run on Macs – unfortunately not verified by the CI, but people do complain and this should make the situation better. cc #9367
…t` (#9608) I got absolutely fed up with waiting for prerequisite infrastructure work for #9290 (why does it have to be _that_ hard?) However the PR in question had some other important improvements that do not necessarily *rely* on changes to said infrastructure to work. In particular: * `nextest` now retries failing tests a few times before giving up, to make sure they aren't spuriously failing; * This should help some timing out integration tests in particular, as those often fail because of some deadlockish situation in my experience. * style checks still run with `cargo nextest` – unfortunately that means that in CI this will run these checks multiple times, but that doesn’t sound particularly terrible of a tradeoff (especially if the other changes mean we won't be retrying entire test suites as often anymore;) * This should allow for a greater portion of the test suite to run on Macs – unfortunately not verified by the CI, but people do complain and this should make the situation better. cc #9367
…t` (#9608) I got absolutely fed up with waiting for prerequisite infrastructure work for #9290 (why does it have to be _that_ hard?) However the PR in question had some other important improvements that do not necessarily *rely* on changes to said infrastructure to work. In particular: * `nextest` now retries failing tests a few times before giving up, to make sure they aren't spuriously failing; * This should help some timing out integration tests in particular, as those often fail because of some deadlockish situation in my experience. * style checks still run with `cargo nextest` – unfortunately that means that in CI this will run these checks multiple times, but that doesn’t sound particularly terrible of a tradeoff (especially if the other changes mean we won't be retrying entire test suites as often anymore;) * This should allow for a greater portion of the test suite to run on Macs – unfortunately not verified by the CI, but people do complain and this should make the situation better. cc #9367
I got absolutely fed up with waiting for prerequisite infrastructure work for #9290 (why does it have to be that hard?)
However the PR in question had some other important improvements that do not necessarily rely on changes to said infrastructure to work. In particular:
nextest
now retries failing tests a few times before giving up, to make sure they aren't spuriously failing;cargo nextest
– unfortunately that means that in CI this will run these checks multiple times, but that doesn’t sound particularly terrible of a tradeoff (especially if the other changes mean we won't be retrying entire test suites as often anymore;)cc #9367