Parse Docker ps output with tab-separated fields#1227
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughDocker container listing commands now emit tab-separated ID, status, name, and image fields. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/data/model/container/ps.dart`:
- Around line 150-157: Update the Docker PS parsing flow around DockerPs.parse
and ContainerPs.fromRaw so malformed rows are handled independently: catch
FormatException for each raw line during the per-row mapping, skip or otherwise
discard invalid rows, and allow valid rows to continue parsing without setting
the overall parsePs operation to an error.
In `@lib/data/provider/container.dart`:
- Around line 490-491: Update the Docker command template in the
ContainerType.docker branch to use Docker’s human-readable {{.Status}} field
instead of {{.State}}, so ContainerStatus.fromDockerState() and DockerPs.parse()
receive values such as “Up 2 hours” and detect statuses correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7fad4b62-20a1-4520-96a2-9a65e1a482ad
📒 Files selected for processing (3)
lib/data/model/container/ps.dartlib/data/provider/container.darttest/container_test.dart
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/container_test.dart`:
- Around line 61-65: Update the test for ContainerCmdType.ps.exec in the “docker
ps command uses human-readable status” case to assert the complete tab-delimited
--format string in the expected ID, Status, Names, and Image order, including
separators, rather than checking individual fields only.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1816bbd5-2221-43a7-a168-34875fda926e
📒 Files selected for processing (2)
lib/data/provider/container.darttest/container_test.dart
#1226
Summary
psoutput parsing to a tab-delimited format so long swarm names no longer break field alignment.FormatExceptionwhen a row does not contain the expected four fields.Testing
Summary by CodeRabbit
Summary
docker psoutput.docker pscommand output to use status ({{.Status}}) and preserve image values correctly (including unusually long container names).