SAM build streams docker progress bar when run non-interactively
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
When `sam build` is run from a non-interactive workflow, `_docker_client.images.build` will produce a progress bar that the SAM CLI will stream to the build logs, negatively impacting log legibility:
https://github.com/aws/aws-sam-cli/blob/d264edd40cc14a8f2f5f80f12c4ce58d17b8eabf/samcli/lib/build/app_builder.py#L447
It appears that could be handled here as well:
https://github.com/aws/aws-sam-cli/blob/d264edd40cc14a8f2f5f80f12c4ce58d17b8eabf/samcli/lib/docker/log_streamer.py#L66
The Docker CLI is pretty good about identifying whether there's a terminal for the purpose of deciding whether to generate progress bars, but I'm unclear on how that works with the Python client, and whether it's the responsibility of the client or of the AWS CLI to indicate how to stream progress? If the latter, it would be nice if `sam build` could support a `--no-progressbar` option for this purpose similar to the one that `sam package` uses for suppressing progress bars for S3 and ECR.
Contributor guide
Assessment
This issue has not been assessed yet.