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

progress: look at stdout rather than stdin when choosing a suitable meter #15038

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bboozzoo
Copy link
Contributor

@bboozzoo bboozzoo commented Feb 6, 2025

Look at stdout rather than stdin when trying to choose appropriate progress meter. The ensures that when snap is invoked under dpkg, it will emit progress regardless of stdin being closed/redirected. At the same time, do not produce a rich output when stdout is redirected.

Related: SNAPDENG-34147

@bboozzoo
Copy link
Contributor Author

bboozzoo commented Feb 6, 2025

This needs a dedicated spread test

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (master@72b960e). Learn more about missing BASE report.
Report is 79 commits behind head on master.

Files with missing lines Patch % Lines
progress/progress.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #15038   +/-   ##
=========================================
  Coverage          ?   77.99%           
=========================================
  Files             ?     1150           
  Lines             ?   153366           
  Branches          ?        0           
=========================================
  Hits              ?   119617           
  Misses            ?    26374           
  Partials          ?     7375           
Flag Coverage Δ
unittests 77.99% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Feb 6, 2025

Fri Feb 7 10:41:56 UTC 2025
The following results are from: https://github.com/canonical/snapd/actions/runs/13198020900

No spread failures reported

…eter

Look at stdout rather than stdin when trying to choose appropriate
progress meter. The ensures that when snap is invoked under dpkg, it
will emit progress regardless of stdin being closed/redirected. At the
same time, do not produce a rich output when stdout is redirected.

Signed-off-by: Maciej Borzecki <[email protected]>
@bboozzoo bboozzoo force-pushed the bboozzoo/progress-reporting branch from 8779a50 to 84f7092 Compare February 7, 2025 10:29
@bboozzoo bboozzoo marked this pull request as ready for review February 7, 2025 10:30
@bboozzoo bboozzoo force-pushed the bboozzoo/progress-reporting branch from 84f7092 to 6d59585 Compare February 7, 2025 10:30
@bboozzoo bboozzoo force-pushed the bboozzoo/progress-reporting branch from 6d59585 to 3a918ab Compare February 7, 2025 10:31
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.

1 participant