docs(03-04): complete container update plan
Tasks completed: 3/3 - Update command routing and container matching - Image pull and change detection - Container recreation workflow SUMMARY: .planning/phases/03-container-actions/03-04-SUMMARY.md Phase 3 complete - all container actions implemented
This commit is contained in:
+12
-9
@@ -8,21 +8,21 @@
|
|||||||
## Current Position
|
## Current Position
|
||||||
|
|
||||||
- **Milestone:** v1.0 — Conversational Docker Control
|
- **Milestone:** v1.0 — Conversational Docker Control
|
||||||
- **Phase:** 3 of 5 — Container Actions (IN PROGRESS)
|
- **Phase:** 3 of 5 — Container Actions (COMPLETE)
|
||||||
- **Plan:** 3 of 4 complete
|
- **Plan:** 4 of 4 complete
|
||||||
- **Status:** Plan 03-04 interrupted (rate limit), needs completion
|
- **Status:** Phase 3 complete, ready for Phase 4
|
||||||
- **Last activity:** 2026-01-30 - Executing 03-04-PLAN.md (interrupted)
|
- **Last activity:** 2026-01-30 - Completed 03-04-PLAN.md
|
||||||
|
|
||||||
## Progress
|
## Progress
|
||||||
|
|
||||||
```
|
```
|
||||||
Phase 1: Foundation [██████████] Complete (2/2 plans)
|
Phase 1: Foundation [██████████] Complete (2/2 plans)
|
||||||
Phase 2: Docker Integration [██████████] Complete (2/2 plans)
|
Phase 2: Docker Integration [██████████] Complete (2/2 plans)
|
||||||
Phase 3: Container Actions [████████░░] 3/4 plans (Wave 4 interrupted)
|
Phase 3: Container Actions [██████████] Complete (4/4 plans)
|
||||||
Phase 4: Logs & Intelligence[░░░░░░░░░░] Not started
|
Phase 4: Logs & Intelligence[░░░░░░░░░░] Not started
|
||||||
Phase 5: Polish & Deploy [░░░░░░░░░░] Not started
|
Phase 5: Polish & Deploy [░░░░░░░░░░] Not started
|
||||||
|
|
||||||
Overall: [██████░░░░] 55%
|
Overall: [██████████] 60%
|
||||||
```
|
```
|
||||||
|
|
||||||
## Recent Decisions
|
## Recent Decisions
|
||||||
@@ -47,6 +47,9 @@ Overall: [██████░░░░] 55%
|
|||||||
| Batch limit of 4 containers | callback_data array with 4 short IDs fits in 64 bytes | 2026-01-30 |
|
| Batch limit of 4 containers | callback_data array with 4 short IDs fits in 64 bytes | 2026-01-30 |
|
||||||
| Sequential batch execution | Single shell command with && chain, no n8n loops needed | 2026-01-30 |
|
| Sequential batch execution | Single shell command with && chain, no n8n loops needed | 2026-01-30 |
|
||||||
| RESULT_N:statusCode markers | Parseable output format for aggregating batch results | 2026-01-30 |
|
| RESULT_N:statusCode markers | Parseable output format for aggregating batch results | 2026-01-30 |
|
||||||
|
| Silent when no update | Only notify on actual image change, not when already up-to-date | 2026-01-30 |
|
||||||
|
| Single match only for update | Update requires exact container name, no batch updates | 2026-01-30 |
|
||||||
|
| Version from OCI labels | Check org.opencontainers.image.version, then version, then ID | 2026-01-30 |
|
||||||
|
|
||||||
## Pending Todos
|
## Pending Todos
|
||||||
|
|
||||||
@@ -59,10 +62,10 @@ Overall: [██████░░░░] 55%
|
|||||||
## Session Continuity
|
## Session Continuity
|
||||||
|
|
||||||
- **Last session:** 2026-01-30
|
- **Last session:** 2026-01-30
|
||||||
- **Stopped at:** Wave 4 execution interrupted (rate limit hit during 03-04 agent spawn)
|
- **Stopped at:** Completed 03-04-PLAN.md (Phase 3 complete)
|
||||||
- **Resume file:** None
|
- **Resume file:** None
|
||||||
- **Next step:** Complete plan 03-04 (Container Update Action)
|
- **Next step:** Begin Phase 4 - Logs & Intelligence
|
||||||
- **Resume command:** `/gsd:execute-phase 3` (will skip completed plans 01-03, execute 04)
|
- **Resume command:** `/gsd:execute-phase 4`
|
||||||
|
|
||||||
---
|
---
|
||||||
*Auto-maintained by GSD workflow*
|
*Auto-maintained by GSD workflow*
|
||||||
|
|||||||
@@ -0,0 +1,115 @@
|
|||||||
|
---
|
||||||
|
phase: 03-container-actions
|
||||||
|
plan: 04
|
||||||
|
subsystem: api
|
||||||
|
tags: [docker-api, container-update, telegram, n8n, image-pull, container-recreation]
|
||||||
|
|
||||||
|
# Dependency graph
|
||||||
|
requires:
|
||||||
|
- phase: 03-01-basic-actions
|
||||||
|
provides: Container lifecycle API patterns, fuzzy matching, action routing structure
|
||||||
|
provides:
|
||||||
|
- Container update command (pull new image + recreate)
|
||||||
|
- Image digest comparison for change detection
|
||||||
|
- Silent no-update behavior
|
||||||
|
- Container config preservation during recreation
|
||||||
|
affects: [04-logs, 05-polish]
|
||||||
|
|
||||||
|
# Tech tracking
|
||||||
|
tech-stack:
|
||||||
|
added: []
|
||||||
|
patterns:
|
||||||
|
- "Image pull via POST /images/create?fromImage=X"
|
||||||
|
- "Image digest comparison for update detection"
|
||||||
|
- "Container config extraction from inspect endpoint"
|
||||||
|
- "NetworkingConfig preservation from NetworkSettings"
|
||||||
|
|
||||||
|
key-files:
|
||||||
|
created: []
|
||||||
|
modified:
|
||||||
|
- n8n-workflow.json
|
||||||
|
|
||||||
|
key-decisions:
|
||||||
|
- "Silent when no update available - only notify on actual image change"
|
||||||
|
- "Single container match only for update - no batch updates"
|
||||||
|
- "Version detection from OCI labels with ID fallback"
|
||||||
|
- "Preserve Hostname/Domainname removal during container recreation"
|
||||||
|
|
||||||
|
patterns-established:
|
||||||
|
- "Multi-step container operations: inspect -> modify -> recreate"
|
||||||
|
- "Image version extraction from org.opencontainers.image.version or version labels"
|
||||||
|
- "Sequential container lifecycle: stop -> remove -> create -> start"
|
||||||
|
|
||||||
|
# Metrics
|
||||||
|
duration: 8min
|
||||||
|
completed: 2026-01-30
|
||||||
|
---
|
||||||
|
|
||||||
|
# Phase 03 Plan 04: Container Update Action Summary
|
||||||
|
|
||||||
|
**Container update workflow with image pull, digest comparison, and config-preserving recreation with version change reporting**
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
- **Duration:** 8 min
|
||||||
|
- **Started:** 2026-01-30T18:24:33Z
|
||||||
|
- **Completed:** 2026-01-30T18:33:00Z
|
||||||
|
- **Tasks:** 3
|
||||||
|
- **Files modified:** 1
|
||||||
|
|
||||||
|
## Accomplishments
|
||||||
|
- Update command routing with single-match-only requirement
|
||||||
|
- Image pull and digest comparison for detecting actual updates
|
||||||
|
- Container recreation preserving all configuration (Config, HostConfig, Networks)
|
||||||
|
- Version change display from image labels or ID substring
|
||||||
|
- Silent behavior when image already up-to-date
|
||||||
|
|
||||||
|
## Task Commits
|
||||||
|
|
||||||
|
All three tasks were implemented together (continuation of interrupted session):
|
||||||
|
|
||||||
|
1. **Tasks 1-3: Complete update workflow** - `04321c1` (feat)
|
||||||
|
- Update command routing and container matching
|
||||||
|
- Image pull and change detection
|
||||||
|
- Container recreation workflow
|
||||||
|
|
||||||
|
## Files Created/Modified
|
||||||
|
- `n8n-workflow.json` - Extended with 29 new nodes for update flow:
|
||||||
|
- Parse Update Command, Docker List for Update, Match Update Container
|
||||||
|
- Check Update Match Count, Handle Update Multiple, Send Update Error/No Match/Multiple
|
||||||
|
- Build Inspect Command, Inspect Container, Parse Container Config
|
||||||
|
- Build Pull Command, Pull Image, Build Image Inspect, Inspect New Image
|
||||||
|
- Compare Digests, Check If Update Needed
|
||||||
|
- Build Stop Command, Stop Container, Verify Stop Build Remove
|
||||||
|
- Remove Container, Build Create Body, Build Create Command
|
||||||
|
- Create Container, Parse Create Response
|
||||||
|
- Build Start Command, Start New Container
|
||||||
|
- Format Update Result, Send Update Result
|
||||||
|
|
||||||
|
## Decisions Made
|
||||||
|
- **Silent on no-update:** When image digest hasn't changed, send no message (per CONTEXT.md)
|
||||||
|
- **Single match only:** Update command requires exact container name; multiple matches show disambiguation message
|
||||||
|
- **Version detection hierarchy:** Check org.opencontainers.image.version label, then version label, then use image ID substring
|
||||||
|
- **NetworkingConfig preservation:** Extract from NetworkSettings.Networks with IPAMConfig, Links, and Aliases
|
||||||
|
|
||||||
|
## Deviations from Plan
|
||||||
|
|
||||||
|
None - plan executed exactly as written.
|
||||||
|
|
||||||
|
## Issues Encountered
|
||||||
|
- Session was interrupted during initial execution (rate limit)
|
||||||
|
- Nodes were created but connections were missing
|
||||||
|
- Connections were added to complete the workflow wiring
|
||||||
|
- All work committed as single comprehensive commit
|
||||||
|
|
||||||
|
## User Setup Required
|
||||||
|
None - no external service configuration required.
|
||||||
|
|
||||||
|
## Next Phase Readiness
|
||||||
|
- All container actions complete (start, stop, restart, update)
|
||||||
|
- Phase 03 fully complete
|
||||||
|
- Ready for Phase 04: Logs & Intelligence
|
||||||
|
|
||||||
|
---
|
||||||
|
*Phase: 03-container-actions*
|
||||||
|
*Completed: 2026-01-30*
|
||||||
Reference in New Issue
Block a user