feat: v0.2.5 — redeploy via build_stream (proper DSM image pull)
Replace the delete-before-start workaround with the real mechanism: SYNO.Docker.Project/build_stream is what the DSM "Erstellen" button calls (confirmed via DevTools). It pulls updated images and starts the project. DsmClient.trigger_build_stream(project_id): fires a streaming GET to build_stream, reads the first SSE chunk to confirm DSM accepted the request, then closes. ReadTimeout is swallowed (build running server-side). Immediate JSON error responses are parsed and raised as SynologyError. redeploy_project simplified from 4 steps to 3: 1. Stop (skip for STOPPED, suppress for BUILD_FAILED) 2. trigger_build_stream — DSM pulls images + starts project 3. Poll for RUNNING (timeout raised from 30s → 5min for large pulls) build_stream errors are now fatal (abort with clear message). Removes _read_compose_images_for_project, _try_delete_image and their json/yaml/re imports — no longer needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,27 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.2.5] - 2026-04-21
|
||||
|
||||
### Changed
|
||||
|
||||
- `redeploy_project`: Replaced the delete-before-start image workaround with
|
||||
`SYNO.Docker.Project/build_stream` — the programmatic equivalent of the DSM
|
||||
"Erstellen" (Build) button, confirmed via browser DevTools capture.
|
||||
New 3-step flow for all project states:
|
||||
1. Stop (skipped for STOPPED; error-suppressed for BUILD_FAILED)
|
||||
2. `build_stream` — DSM pulls updated images and starts the project via SSE
|
||||
3. Poll for RUNNING (timeout raised from 30 s to 5 min to accommodate image pulls)
|
||||
`build_stream` errors are now fatal (abort the redeploy with a clear message).
|
||||
|
||||
### Added
|
||||
|
||||
- `DsmClient.trigger_build_stream(project_id)` — fires a streaming GET to
|
||||
`SYNO.Docker.Project/build_stream`, reads the first SSE chunk to confirm DSM
|
||||
accepted the request, then closes the connection. The build continues
|
||||
server-side. Handles immediate JSON error responses; swallows `ReadTimeout`
|
||||
(stream still open = build running).
|
||||
|
||||
## [0.2.4] - 2026-04-21
|
||||
|
||||
### Changed
|
||||
|
||||
Reference in New Issue
Block a user