luci-app-dockerman: supports multiplexed stream format logs - #8976
luci-app-dockerman: supports multiplexed stream format logs#8976jjm2473 wants to merge 1 commit into
Conversation
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit; see inline comments. The ucode-side parser matches the byte semantics of ord()/substr() correctly; the JS-side parser in api.js operates on a UTF-8-decoded string and does not.
Generated by Claude Code
c90e845 to
93ba06d
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit (force-push of 93ba06d, diffed against c90e845). All three findings from the previous round are addressed: parse_multiplexed_stream now operates on a Uint8Array from response.arrayBuffer() with a TextDecoder per payload, so byte offsets and frame boundaries are correct for payloads ≥ 128 bytes and for multi-byte UTF-8; the >>> 0 on the length field is right; and the No logs available fallback is restored after the frame join. Two remaining inline notes, one of them a nit.
Generated by Claude Code
1094402 to
a315188
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit (force-push of a315188, diffed against 93ba06d). Both notes from the previous round are addressed: the ?.['content-type'] optional chain no longer throws when the rpcd path resolves with a bare ubus status number, and the frame walk now advances with subarray() views instead of copying slice(), removing the quadratic re-copy. Commit message matches the change; CI on the head SHA is green or still running. One low-severity inline note left.
Generated by Claude Code
a315188 to
c13ebfe
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit (force-push of c13ebfe, diffed against a315188). The remaining note from the previous round is addressed, and in the more accurate of the two forms offered: per-stream-type TextDecoders with { stream: true }, so a UTF-8 sequence split across frames is reassembled without mixing state between stdout and stderr. Commit message still matches the change, and all eight checks on the head SHA are green.
Two nits left, both in parse_multiplexed_stream.
Generated by Claude Code
https://docs.docker.com/reference/api/engine/version/v1.43/#stream-format Co-authored-by: OpenWrt AI review account <openwrt-ai@hauke-m.de> Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
af49bac to
45109fc
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit (force-push of 45109fc, diffed against c13ebfe); no new issues found.
The delta is exactly the two nits from the previous round: the dead stream_type >= 0 half of the range test is gone, and { stream: true } now carries the inner padding used elsewhere in the file. The arrow-function reformat in container.js:1690 is cosmetic and matches the surrounding style. Commit message still matches the change, and all eight checks on the head SHA are green.
Also noting your reply on the trailing-flush thread — with the whole body read in one shot and a fresh set of decoders per call, the remnant only matters for a stream whose final frame ends mid-sequence, which Docker's json-file driver won't produce. Happy to leave it.
Generated by Claude Code
|
ping @systemcrash |
https://docs.docker.com/reference/api/engine/version/v1.43/#stream-format
Pull request details
Description
docker.container logsdoes not work with "application/vnd.docker.multiplexed-stream" response.-t)docker run --name testlog alpine ls -laubus call docker.container logs '{"id":"testlog","query":{"stdout":true,"stderr":true,"tail":100}}'Before this patch:
{ "code": 200, "headers": { "api-version": "1.47", "content-type": "application/vnd.docker.multiplexed-stream", "docker-experimental": "false", "ostype": "linux", "server": "Docker/27.3.1 (linux)", "date": "Mon, 24 Aug 2026 13:15:12 GMT", "connection": "close", "transfer-encoding": "chunked" }, "body": "\u0001" }After patch:
{ "code": 200, "headers": { "api-version": "1.47", "content-type": "application/vnd.docker.multiplexed-stream", "docker-experimental": "false", "ostype": "linux", "server": "Docker/27.3.1 (linux)", "date": "Mon, 24 Aug 2026 13:16:07 GMT", "connection": "close", "transfer-encoding": "chunked" }, "body": [ { "type": 1, "payload": "total 64\n" }, { "type": 1, "payload": "drwxr-xr-x 1 root root 4096 Aug 24 12:29 .\n" }, { "type": 1, "payload": "drwxr-xr-x 1 root root 4096 Aug 24 12:29 ..\n" }, { "type": 1, "payload": "-rwxr-xr-x 1 root root 0 Aug 24 12:29 .dockerenv\n" }, { "type": 1, "payload": "drwxr-xr-x 2 root root 4096 Oct 8 2025 bin\n" }, ... ] }Screenshot or video of changes (if applicable)
Before:

After:

Maintainer (preferred)
@systemcrash
Tested on
OpenWrt version: OpenWrt 25.12.5
LuCI version: LuCI openwrt-25.12 branch
Web browser(s): Chrome 151.0.7922.76
(Both JS API and RPC were tested)
Checklist