Repository navigation
Description
PastaClaw flagged this while reviewing #4283, where it was deferred to a follow-up instead of being fixed in that pull request. This issue tracks the follow-up.
Update reimplements the shared Docker pull parser (suggestion)
Where: packages/dashmate/src/update/updateNodeFactory.js:34-51 at ac6de106458c:
platform/packages/dashmate/src/update/updateNodeFactory.js
Lines 34 to 51 in ac6de10
| return new Promise((resolve) => { | |
| docker.pull(image, (err, stream) => { | |
| if (err) { | |
| // A registry response body can reach the operator's terminal | |
| // through this message, so it is made safe to print | |
| resolve({ | |
| name, title, image, updated: 'error', error: sanitizeRemoteText(err.message), | |
| }); | |
| return; | |
| } | |
| // followProgress owns the stream: it joins messages split across | |
| // chunks, splits them the way Docker writes them and reports | |
| // transport failures. A failed pull arrives as a regular message | |
| docker.modem.followProgress(stream, (streamError, output) => { | |
| const error = sanitizeRemoteText(streamError?.message) | |
| ?? findPullStreamError(output); |
This factory bypasses the newly centralized
dockerPullFactoryand duplicatesdocker.pullplusfollowProgresshandling, while importingfindPullStreamErrordirectly. That leaves two owners for stream framing, transport-error handling, and pull-error extraction; future fixes to the Docker adapter will not apply todashmate update. Inject the shared pull abstraction and convert its rejection into the per-image result, or expose a result-oriented adapter method while keeping Docker stream parsing in the Docker layer.
Origin
- Pull request: fix(dashmate): keep the node up when an image pull fails, and stop reporting success when it did not #4283
- Review thread: fix(dashmate): keep the node up when an image pull fails, and stop reporting success when it did not #4283 (comment)
- Filed by PastaClaw when it accepted the deferral, as nothing else tracked it.
Activity