You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Compose forwards a line of output from the container, it splits the line after 32768 characters. I tested with ASCII, emoji and a Chinese character, all yielding the same result. I also tested just running the image using Docker alone and I see no line breaks.
This is causing us trouble when the logs are following a strict schema like JSON.
Steps To Reproduce
# Dockerfile
FROM python:3.7-alpine
CMD ["python", "-c", "print('x'*32769)"]
# compose.yaml
services:
test:
build: .
docker compose build
docker compose up
Expected output:
a single line containing 32769 characters.
compose-long-line-test-test-1 | xxxxx....xxxxxx
compose-long-line-test-test-1 exited with code 0
Actual output:
Two lines, one with 32768 characters and one with the remaining one character.
compose-long-line-test-test-1 | xxxxx....xxxxxx
compose-long-line-test-test-1 | x
compose-long-line-test-test-1 exited with code 0
Compose Version
This works as expected with Compose V1. Tested on MacOS with this version:
hubertgrzeskowiak
changed the title
[BUG] Compose breaks line at 32 KiB
[BUG] Compose breaks lines at 32769 characters
Aug 22, 2023
hubertgrzeskowiak
changed the title
[BUG] Compose breaks lines at 32769 characters
[BUG] Compose breaks lines at 32768 characters
Aug 22, 2023
hubertgrzeskowiak
changed the title
[BUG] Compose breaks lines at 32768 characters
[BUG] Compose up logger breaks lines at 32768 characters
Aug 23, 2023
Description
When Compose forwards a line of output from the container, it splits the line after 32768 characters. I tested with ASCII, emoji and a Chinese character, all yielding the same result. I also tested just running the image using Docker alone and I see no line breaks.
This is causing us trouble when the logs are following a strict schema like JSON.
Steps To Reproduce
Expected output:
Actual output:
Compose Version
This works as expected with Compose V1. Tested on MacOS with this version:
The bug occurs only on V2, specifically
Docker Environment
Anything else?
Tags: logs, logging, logger, line, lines, break, breaks, newline, format, formatter, breaks JSON, breaks YAML, breaks XML
The text was updated successfully, but these errors were encountered: