Skip to content

fix(progress): stop inverting success in EventProcessor.Done - #14503

Merged
glours merged 2 commits into
docker:mainfrom
glours:fix-event-processor-done-success
Nov 16, 2026
Merged

glours merged 2 commits into
docker:mainfrom
glours:fix-event-processor-done-success

Conversation

@glours

@glours glours commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Run passed err != nil as the success argument of EventProcessor.Done, so custom processors received true when the operation failed. The built-in writers ignore the argument, which is why nothing showed in the CLI.

This passes err == nil, documents the meaning of success on the interface, and adds a test covering both outcomes.

Fixes #14498

AI tool: Claude Code (fix and test drafted with it).

…on succeeds

The documented contract of EventProcessor.Done is success == true when
the operation succeeded, but Run was passing err != nil, so custom
processors received an inverted value. No built-in writer uses the
argument, which is why this went unnoticed.

Pass err == nil, document the meaning of success on the interface, and
add a test covering both the success and the failure case.

Fixes docker#14498

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
@glours
glours requested review from a team as code owners November 13, 2026 17:00
@glours
glours requested a review from ndeloof November 13, 2026 17:00
@glours glours changed the title fix(progress): report success to EventProcessor.Done when the operation succeeds fix(progress): stop inverting success in EventProcessor.Done Nov 13, 2026

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ndeloof ndeloof left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One optional nit inline.

Comment thread pkg/api/event.go Outdated
On(events ...Resource)
// Done is triggered as a Compose operation completed
// Done is triggered as a Compose operation completed.
// success is true when the operation completed without error.

@ndeloof ndeloof Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (optional): say in the Done doc that success is also false when the operation is cancelled, so custom processors know how Ctrl-C is reported.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 7a70ab7. One caveat I left out of the doc to keep it generic: an attached up calls Done("up", …) once its containers are created, before it streams logs, so a Ctrl-C during the log phase comes after Done and isn't reported there.

ndeloof
ndeloof previously approved these changes Nov 14, 2026
…lure

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
@glours
glours merged commit 2167baf into docker:main Nov 16, 2026
62 checks passed
@glours
glours deleted the fix-event-processor-done-success branch November 16, 2026 13:34
CLHatch added a commit to GhostWriters/DockSTARTer2 that referenced this pull request Nov 17, 2026
…as success

- docker/compose v5.7.1 -> v5.8.0, compose-go v2.16.2 -> v2.17.0 (with
  docker/cli v29.10.0).
- v5.7.2 stopped inverting EventProcessor.Done's success flag
  (docker/compose#14503, reported as #14498), so Done now reads it as
  success. Kept in the same commit as the bump: either change alone shows
  successful runs as Error or failed ones as success.
- Renovate opens compose and compose-go updates as PRs without
  automerging them, with a note to check event changes and test a build
  before merging.
CLHatch added a commit to GhostWriters/DockSTARTer2 that referenced this pull request Nov 17, 2026
…as success (#313)

- docker/compose v5.7.1 -> v5.8.0, compose-go v2.16.2 -> v2.17.0 (with
  docker/cli v29.10.0).
- v5.7.2 stopped inverting EventProcessor.Done's success flag
  (docker/compose#14503, reported as #14498), so Done now reads it as
  success. Kept in the same commit as the bump: either change alone shows
  successful runs as Error or failed ones as success.
- Renovate opens compose and compose-go updates as PRs without
  automerging them, with a note to check event changes and test a build
  before merging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EventProcessor.Done receives success inverted (err != nil)

3 participants