Add `--no-trunc` option to `docker stack deploy` for full error messages
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu từ điểm vào CLI của docker stack deploy và so sánh cách xử lý đầu ra với phần triển khai hiện có của docker service ps --no-trunc. Theo dõi trạng thái triển khai và đầu ra lỗi, sau đó xác minh rằng tùy chọn mới vẫn giữ nguyên các thông báo đầy đủ và các bài kiểm thử CLI liên quan đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Problem
When running docker stack deploy, deployment errors (especially scheduling constraint failures) are truncated in the CLI output. For example:
1/1: no suitable node (scheduling constraints not satisfied on 1 node; host-mod…
overall progress: 0 out of 1 tasks
This truncation makes it difficult to understand why a service could not be scheduled, as the most relevant part of the message is often cut off. This behavior appears to be hardcoded and does not respect terminal width or environment variables like COLUMNS.
Workarounds
- Manually running
docker service ps <service> --no-truncafter deployment - Inspecting tasks individually with
docker inspect - Writing custom scripts to combine deployment and diagnostic commands
These add friction and delay in understanding deployment issues.
Proposal
Add a --no-trunc flag to docker stack deploy, similar to the one already available in docker service ps, which disables truncation of deployment status and error messages.
Other alternatives could include:
- Respecting the actual terminal width or
COLUMNSenvironment variable - Automatically disabling truncation when output is non-interactive (e.g. in CI pipelines)
- Supporting full output when
--verboseor--debugis enabled
Benefits
- Immediate visibility into deployment failures without requiring follow-up commands
- Better support for CI/CD pipelines where error visibility is critical
- Makes
docker stack deployconsistent with other CLI commands that support--no-trunc
Related
docker service psalready supports--no-truncand behaves as expected- No current CLI flags exist to control truncation during stack deployment
- Ngôn ngữ chính
- Go
- Star
- 6.1k
- Fork
- 2.2k
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 47
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker/cli
-
kind/bug status/0-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
kind/bug status/0-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
kind/feature status/0-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
kind/bug status/0-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Issue tương tự
-
bug github_actions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
registrystack/registry-stack#1393 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
JakeChampion/lang#10213 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
oasisprotocol/oasis-sdk#2523 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100