-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Fixed progress UI to adapt to terminal width #13519
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
Conversation
d5f751b to
1175c65
Compare
1175c65 to
80c34f6
Compare
|
updated (with a fix) and some tests added |
this is the exact issue this PR expect to fix :'( |
80c34f6 to
0974167
Compare
|
Found (yet another) but computing, as status alignment was computed without considering other status strings may have a distinct length 😅 - test case added |
|
This no longer truncates or messes up lines. I'll check some more and be back :) EDIT: pulling and running works - also for multiple images $ ./docker-compose pull
[+] pull 2/2
✔ Image debian:latest Pulled 7.4s
$ ./docker-compose run -it --rm debian bash
[+] 1/1te 1/1
✔ Network build_default Created 0.0s
Container build-debian-run-a7d669391344 Creating
Container build-debian-run-a7d669391344 Created
root@22ae48ef1546:/#
exit
$ ./docker-compose pull
[+] pull 4/4
✔ Image ubuntu:latest Pulled 2.4s
✔ Image debian:12 Pulled 7.5sHowever, there's no progress anymore. There is progress when building though: |
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
|
.. then found another issue in test due to |
0974167 to
edbf4e3
Compare
cc @ndeloof |
|
@KiGamji I also noticed this issue, fixing issues one after the other |
glours
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me, my tests were ok, I focused on main paths (up, down, build) and also on pull
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [docker/compose](https://github.com/docker/compose) | patch | `v5.0.1` → `v5.0.2` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>docker/compose (docker/compose)</summary> ### [`v5.0.2`](https://github.com/docker/compose/releases/tag/v5.0.2) [Compare Source](docker/compose@v5.0.1...v5.0.2) #### What's Changed ##### 🐛 Fixes - Fixed progress UI to adapt to terminal width by [@​ndeloof](https://github.com/ndeloof) in [#​13519](docker/compose#13519) - Removed warning when no explicit build has been requested. by [@​ndeloof](https://github.com/ndeloof) in [#​13493](docker/compose#13493) - Restored `runtime_flags` support in `models` by [@​ilopezluna](https://github.com/ilopezluna) in [#​13460](docker/compose#13460) - Added service name completion to `down` command by [@​bmo-at](https://github.com/bmo-at) in [#​13470](docker/compose#13470) - Fixed tilde in `--env-file` paths expanded to user home directory by [@​tensorworkerr](https://github.com/tensorworkerr) in [#​13510](docker/compose#13510) - Handle `healthcheck.disable: true` by [@​stavros-k](https://github.com/stavros-k) in [#​13494](docker/compose#13494) - Fixed shutdown and error handling for large file change batches in `watch` by [@​amyssnippet](https://github.com/amyssnippet) in [#​13525](docker/compose#13525) ##### 🔧 Internal - Added unit test for upOptions.OnExit method by [@​htoyoda18](https://github.com/htoyoda18) in [#​13489](docker/compose#13489) - clean up temporary compose files after conversion by [@​htoyoda18](https://github.com/htoyoda18) in [#​13483](docker/compose#13483) - Fixed typo in isSwarmEnabled method name by [@​htoyoda18](https://github.com/htoyoda18) in [#​13481](docker/compose#13481) - Fixed incorrect usage of errgroup.WithContext by [@​htoyoda18](https://github.com/htoyoda18) in [#​13480](docker/compose#13480) - Fixed timeout initialization when waitTimeout is zero by [@​htoyoda18](https://github.com/htoyoda18) in [#​13471](docker/compose#13471) - Extracted API version constants to dedicated file by [@​htoyoda18](https://github.com/htoyoda18) in [#​13503](docker/compose#13503) - Replace tabbed indentation in sdk.md by [@​pkqk](https://github.com/pkqk) in [#​13505](docker/compose#13505) - Improved attach error handling and cleanup by [@​htoyoda18](https://github.com/htoyoda18) in [#​13488](docker/compose#13488) - Modernize tests by [@​dgageot](https://github.com/dgageot) in [#​13531](docker/compose#13531) - set fsnotify build tag when building for OSX by [@​ndeloof](https://github.com/ndeloof) in [#​13532](docker/compose#13532) ##### ⚙️ Dependencies - build(deps): bump github.com/klauspost/compress to v1.18.2 by [@​thaJeztah](https://github.com/thaJeztah) in [#​13499](docker/compose#13499) - go.mod: remove exclude rules by [@​thaJeztah](https://github.com/thaJeztah) in [#​13498](docker/compose#13498) - build(deps): bump github.com/containerd/containerd/v2 to v2.2.1 by [@​thaJeztah](https://github.com/thaJeztah) in [#​13497](docker/compose#13497) - build(deps): bump golang.org/x/sys from 0.39.0 to 0.40.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​13502](docker/compose#13502) - build(deps): bump google.golang.org/grpc from 1.77.0 to 1.78.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​13475](docker/compose#13475) - build(deps): bump github.com/go-viper/mapstructure/v2 from 2.4.0 to 2.5.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​13506](docker/compose#13506) - build(deps): bump github.com/sirupsen/logrus v1.9.4 by [@​thaJeztah](https://github.com/thaJeztah) in [#​13518](docker/compose#13518) - Bump compose to v2.10.1 by [@​ndeloof](https://github.com/ndeloof) in [#​13528](docker/compose#13528) #### New Contributors - [@​bmo-at](https://github.com/bmo-at) made their first contribution in [#​13470](docker/compose#13470) - [@​pkqk](https://github.com/pkqk) made their first contribution in [#​13505](docker/compose#13505) - [@​tensorworkerr](https://github.com/tensorworkerr) made their first contribution in [#​13510](docker/compose#13510) - [@​stavros-k](https://github.com/stavros-k) made their first contribution in [#​13494](docker/compose#13494) - [@​amyssnippet](https://github.com/amyssnippet) made their first contribution in [#​13525](docker/compose#13525) - [@​dgageot](https://github.com/dgageot) made their first contribution in [#​13531](docker/compose#13531) **Full Changelog**: <docker/compose@v5.0.1...v5.0.2> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44Ni4xIiwidXBkYXRlZEluVmVyIjoiNDIuODYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->






What I did
Rewrote tty progress UI to be more deterministic regarding terminal width and height.
New logic is:
lineDatastruct to collect data to be formatted on terminalnote: sub task rendering (layers details during push/pull) has been removed to keep this beast (relatively) simple.
I tried to make the code bit more structured to get a more deterministic rendering, still this is all based on manual padding computation and string concatenations... We should look into an alternative TUI using https://github.com/charmbracelet/bubbles or comparable
Related issue
fixes #13474
also fixes #10256 by dropping extra lines if terminal height is too low
(not mandatory) A picture of a cute animal, if possible in relation to what you did