fix: hook up repodata fetch reporter to gateway queries#6112
Open
baszalmstra wants to merge 5 commits into
Open
fix: hook up repodata fetch reporter to gateway queries#6112baszalmstra wants to merge 5 commits into
baszalmstra wants to merge 5 commits into
Conversation
Adds `CondaSolveReporter::create_gateway_reporter` so reporters can hand out a per-call `rattler_repodata_gateway::Reporter`, and wires the gateway queries in `SolveCondaKey` and the ephemeral-env binary repodata fetch through it. `TopLevelProgress` now returns its existing `RepodataReporter` from this hook, so the previously unused "fetching repodata" progress bar actually receives events.
Replaces the bolt-on `CondaSolveReporter::create_gateway_reporter` with a standalone `GatewayReporter` trait. It is registered independently on the `CommandDispatcher`'s `DataStore` and looked up by every gateway-query site (`SolveCondaKey::compute` and `fetch_binary_repodata`). `create_gateway_reporter` now receives the `OperationId` of the already-started parent operation (pixi-solve or backend-instantiate, depending on caller), obtained via `OperationId::current()` — both call sites already run inside the parent's `scope_active`. This lets reporter implementations attribute the repodata fetch to the right operation while keeping gateway-querying code reporter-agnostic. `TopLevelProgress` implements the new trait and registers itself via `with_gateway_reporter` in `register_with`.
Adds a `GatewayQuery { id, op_id }` event recorded each time a
gateway-query site asks `EventReporter::create_gateway_reporter`,
where `op_id` is the started parent op the fetch belongs to and
`id` is a fresh op id whose parent in the registry is `op_id`. The
event-tree renderer adds a "Repodata fetch" node so the snapshot
shows where every fetch lands relative to the surrounding pixi
solve / backend-instantiate operations.
The existing snapshot (e.g. `integration__simple_test.snap`)
captures the pre-wiring tree and will need refreshing via
`cargo insta review` once the slow integration tests are run in an
environment that can host the git fixtures.
47805ab to
cc4e90b
Compare
This file contains hidden or 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
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.
Description
The "fetching repodata" progress bar owned by
TopLevelProgresswas never receiving events because no reporter was attached to theGatewayqueries inSolveCondaKey::computeorephemeral_env::fetch_binary_repodata.This PR introduces a standalone
GatewayReportertrait registered on the dispatcher'sDataStore. Every gateway-query site looks it up and passesOperationId::current()(the surrounding pixi-solve or instantiate-backend op, which is already started viascope_active) intocreate_gateway_reporter.TopLevelProgressimplements the trait and returns its existingRepodataReporter, so the bar finally drives.The integration
EventReporteralso implements the trait and records aGatewayQueryevent so the event tree shows where each fetch lands.How Has This Been Tested?
cargo check --workspace --all-targetscargo test -p pixi_command_dispatcher --test integration --features slow_integration_testslocally; theintegration__simple_test.snapsnapshot was refreshed to include the new "Repodata fetch" nodes.AI Disclosure
Tools: Claude Code
Checklist: