Repository navigation
Feature request: select CI-friendly failure output by default #3469
ratatui-user
started this conversation in
Feature requests
Replies: 2 comments
|
Thanks for the feature request. In general I deliberately do not do this kind of auto-detection within nextest, because I think it's important that you can copy-paste a command-line from CI and have the same experience locally. I've been frustrated many times by this exact issue.) The only exception is for showing the progress bar which is truly transient state. Besides, I don't actually think |
0 replies
|
Also, in the future, please file issues in your own writing rather than using an LLM. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Motivation
When a GitHub Actions test job fails, I click through to the failed step and land near the end of nextest's output. With nextest's default configuration, the end contains the final test disposition, while the actionable failure output was printed earlier and may be far up the log.
The current workaround is to configure every repository using nextest with:
This places the actionable failure details near the end of the log, which makes GitHub's default navigation substantially more useful. However, this is repetitive configuration for what seems like a reasonable zero-configuration CI default.
Proposal
When nextest detects a CI environment and the user has not explicitly selected a profile, automatically select a built-in
default-ciprofile with:The selection precedence could be:
--profileorNEXTEST_PROFILE.default-miriwhen running under Miri.default-ciwhen running in a detected CI environment.defaultotherwise.This should remain fully overridable through an explicit profile, repository configuration, environment variables, or command-line output options. For example, a user who prefers immediate failure output in CI could continue to select
defaultor setfailure-output = "immediate".This proposal is intentionally limited to presentation behavior. It would not automatically change execution behavior such as
fail-fast.Nextest already depends on
is_ciand uses CI detection to adjust reporter behavior. It also automatically selectsdefault-miribased on the execution environment, and thedefault-*profile namespace is reserved for built-in profiles. A built-in, automatically selecteddefault-ciprofile appears consistent with those existing patterns.Alternatives
Configure each repository
Repositories can continue defining and explicitly selecting their own CI profiles:
This works today, but requires repeated configuration across every repository using nextest.
Change display behavior without selecting a profile
Nextest could special-case
failure-outputinside the reporter whenever CI is detected, without selecting a profile. A profile seems preferable because it makes the selected behavior visible in the run header, provides a straightforward escape hatch, and creates a natural place for other carefully considered CI presentation defaults in the future.Display failure output both immediately and at the end
Nextest could use
failure-output = "immediate-final"in CI. This retains immediate feedback while also putting actionable output at the end of the log, but it duplicates potentially large failure output.Emit GitHub Actions annotations
Nextest could detect GitHub Actions and emit workflow commands such as:
This could create a source-linked annotation for each failed test, allowing users to jump directly from the workflow summary to the likely failure location.
Nextest already heuristically extracts relevant panic and error output for JUnit reporting, so some of the required failure-identification machinery exists. Producing useful annotations would still require extracting a structured repository-relative path, line, and column from test output.
Annotations also have limitations:
should_panictests, retries, and property tests can contain panic-like output that should not become annotations unless the test's final result is a failure.Annotations could be complementary rather than mutually exclusive: a CI-friendly failure-output default would improve the underlying log for every CI provider, while an optional GitHub reporter could provide richer navigation where supported.
Additional context
This is not a request for GitHub annotations or GitHub-specific workflow commands. The causal problem is simpler: clicking through to a failed GitHub Actions step lands near the bottom of the log, so the bottom should contain the failure details needed to begin debugging rather than only the final nextest disposition.
All reactions