Skip to content
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

chore(ci): Use TRACE logging for tests run by nextest #1902

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Conversation

flub
Copy link
Contributor

@flub flub commented Dec 19, 2023

Description

The default log-level being set to INFO makes it really difficult
to debug flaky tests on CI. This is a regression from earlier where
we had TRACE-level logging for tests using
iroh_test::logging::setup(), which was only possible for
single-threaded executor tests.

Now that we are running with cargo-nextest per-test output capturing
also works seamlessly for multi-threaded runners because of the
cargo-nextest execution model. This means we can set a detailed log
level again by default, thus giving us detailed logs on any failure
without having to reproduce it.

Notes & open questions

As can be seen in the doctests changes, where we can not use nextest,
we could also do this in some other ways. Given we now depend on
cargo-nextest I guess we can as well go for always setting TRACE level
as the CI configuration stays much simpler.

We could also take this much further and simplify the machinenry of
iroh-test::logging to not jump through all those hoops. Though I guess
people might still run the test suite with cargo-test which would
be nicer if we leave it in.

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.

The default log-level being set to INFO makes it really difficult
to debug flaky tests on CI.  This is a regression from earlier where
we had TRACE-level logging for tests using
iroh_test::logging::setup(), which was only possible for
single-threaded executor tests.

Now that we are running with cargo-nextest per-test output capturing
also works seamlessly for multi-threaded runners because of the
cargo-nextest execution model.  This means we can set a detailed log
level again by default, thus giving us detailed logs on any failure
without having to reproduce it.
Copy link
Collaborator

@Arqu Arqu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doctests need fixing but LGTM

@flub flub added this pull request to the merge queue Dec 19, 2023
Merged via the queue into main with commit b789a1f Dec 19, 2023
26 checks passed
@Arqu Arqu deleted the flub/ci-logging branch January 5, 2024 21:43
fubuloubu pushed a commit to ApeWorX/iroh that referenced this pull request Feb 21, 2024
## Description

The default log-level being set to INFO makes it really difficult
to debug flaky tests on CI.  This is a regression from earlier where
we had TRACE-level logging for tests using
iroh_test::logging::setup(), which was only possible for
single-threaded executor tests.

Now that we are running with cargo-nextest per-test output capturing
also works seamlessly for multi-threaded runners because of the
cargo-nextest execution model.  This means we can set a detailed log
level again by default, thus giving us detailed logs on any failure
without having to reproduce it.

## Notes & open questions

As can be seen in the doctests changes, where we can not use nextest,
we could also do this in some other ways.  Given we now depend on
cargo-nextest I guess we can as well go for always setting TRACE level
as the CI configuration stays much simpler.

We could also take this much further and simplify the machinenry of
iroh-test::logging to not jump through all those hoops.  Though I guess
people might still run the test suite with `cargo-test` which would
be nicer if we leave it in.

## Change checklist

- [x] Self-review.
- ~~Documentation updates if relevant.~~
- ~~Tests if relevant.~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants