Skip to content

Show span annotations for each fixture in dependency chain#488

Merged
MatthewMckee4 merged 1 commit intomainfrom
fixture-chain-span-annotations
Feb 17, 2026
Merged

Show span annotations for each fixture in dependency chain#488
MatthewMckee4 merged 1 commit intomainfrom
fixture-chain-span-annotations

Conversation

@MatthewMckee4
Copy link
Member

Summary

  • Each intermediate fixture in a dependency chain now gets its own sub-diagnostic with a span annotation pointing to its definition
  • Replaces the previous (required by db->connection) suffix with individual annotated spans
  • Makes it easy to visually trace the full path from test to failing fixture

Before:

info: Fixture `config` failed here (required by `db` -> `connection`)

After:

info: Fixture `db` requires `connection`
  --> test.py:13:5
   |
12 | @fixture
13 | def db(connection):
   |     ^^

info: Fixture `connection` requires `config`
  --> test.py:9:5
   |
 8 | @fixture
 9 | def connection(config):
   |     ^^^^^^^^^^

info: Fixture `config` failed here
 --> test.py:6:5

Test plan

  • Updated snapshot for test_fixture_dependency_chain_failure with new span-annotated output
  • All 641 tests pass
  • Pre-commit checks pass

Instead of showing a single `(required by `db` -> `connection`)` suffix,
each intermediate fixture now gets its own sub-diagnostic with a span
annotation pointing to its definition. This makes it easy to trace the
full dependency path from the test to the failing fixture.
@MatthewMckee4 MatthewMckee4 added reporting Related to the output of Karva extensions/fixtures Related to fixtures labels Feb 17, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 17, 2026

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 1 untouched benchmark


Comparing fixture-chain-span-annotations (9e2df4f) with main (7b00a40)

Open in CodSpeed

@MatthewMckee4 MatthewMckee4 merged commit c4e6f8b into main Feb 17, 2026
9 checks passed
@MatthewMckee4 MatthewMckee4 deleted the fixture-chain-span-annotations branch February 17, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions/fixtures Related to fixtures reporting Related to the output of Karva

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant