Add `--no-trunc` option to `docker stack deploy` for full error messages
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start at the docker stack deploy CLI entry point and compare its output handling with the existing docker service ps --no-trunc implementation. Trace the deployment status and error output, then verify that the new option preserves full messages and that the relevant CLI tests pass.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 47
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/cli
-
kind/bug status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
kind/bug status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
kind/feature status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
kind/bug status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
googleapis/librarian#7670 · 2 comments ·