Skip to content

test(gateway): Fix progress bar being redrawn after child is spawned - #2969

Merged
pavelzw merged 2 commits into
conda:mainfrom
I-Al-Istannen:fix/download-reporter-complete-on-error
Oct 20, 2026
Merged

pavelzw merged 2 commits into
conda:mainfrom
I-Al-Istannen:fix/download-reporter-complete-on-error

Conversation

@I-Al-Istannen

Copy link
Copy Markdown
Contributor

Description

When using pixi exec the progress bar indicating repodata download progress might continue being drawn and refreshed over the child process it executes. This leads to flickering layout in TUIs which self-heal and annoying spam in CLI programs that do not use a TUI. See, for example:

image

How Has This Been Tested?

Unit tests I added that previously failed, the error sadly is non-deterministic and relies on external services to occur.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude Code

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.

…lation

A download reporter gets on_download_start but never
on_download_complete when a shard or shard index request fails or the
fetch is cancelled. Consumers that track in-flight downloads, such as
pixi's repodata progress bar, then keep them alive forever.

These tests fail until that is fixed.
…elled

Every repodata fetch reported on_download_start but only reported
on_download_complete on success. A failed request, an error status or a
cancelled future left the download in progress forever, and a progress
bar tracking it never finished.

Move the drop guard that run_exports_extractor already used into the
reporter module and use it for every repodata, shard, shard index and
channel notice download. Successful downloads still report completion
under the response url right after the body is read.
@I-Al-Istannen
I-Al-Istannen marked this pull request as ready for review October 20, 2026 09:48
@pavelzw
pavelzw merged commit 1ff68b0 into conda:main Oct 20, 2026
20 checks passed
This was referenced Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants