oras icon indicating copy to clipboard operation
oras copied to clipboard

chore: convert console output to creack/pty

Open TerryHowe opened this issue 4 months ago • 8 comments

What this PR does / why we need it: The https://github.com/containerd/console we are using is pretty much a dead project. There has been a ticket about mac failures for over a year and no action over there other than bug fixes. The project is small time: Screenshot 2025-09-10 at 6 10 00 PM

The creack/pty project is a lot more active: Screenshot 2025-09-10 at 6 10 11 PM

Closes: https://github.com/oras-project/oras/issues/1449

TerryHowe avatar Sep 11 '25 00:09 TerryHowe

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 87.39%. Comparing base (6c3e3e5) to head (aa4253d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1850      +/-   ##
==========================================
+ Coverage   87.29%   87.39%   +0.09%     
==========================================
  Files         143      143              
  Lines        5535     5530       -5     
==========================================
+ Hits         4832     4833       +1     
+ Misses        417      414       -3     
+ Partials      286      283       -3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Sep 11 '25 00:09 codecov[bot]

Should the PR title start with "refactor"?

Wwwsylvia avatar Sep 11 '25 08:09 Wwwsylvia

It would be a good start on extending test coverage in Darwin. Thanks for your contribution. @TerryHowe

qweeah avatar Sep 11 '25 11:09 qweeah

The width on Window not the actual size though, the width is always 80. @Wwwsylvia @shizhMSFT What do you think?

image

qweeah avatar Sep 11 '25 12:09 qweeah

Should the PR title start with "refactor"?

Good point, fixed. This happenwd to be a case where the code was nicely encapsulated, so went easier than expected!

TerryHowe avatar Sep 11 '25 12:09 TerryHowe

@TerryHowe After investigating github.com/creack/pty, I found that it does not support Windows. 😢 When calling pty.Getsize(c.file), creack/pty returns ErrUnsupported on Windows. Then oras fallback to a 80x10 window.

shizhMSFT avatar Sep 11 '25 13:09 shizhMSFT

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Oct 27 '25 02:10 github-actions[bot]

Just fixing conflicts

TerryHowe avatar Nov 24 '25 12:11 TerryHowe