fix: restore stoppingEvent/stoppedEvent helpers for plugin stop hook#13794
Conversation
The stop lifecycle hook added in 672dc14 calls stoppingEvent and stoppedEvent from pkg/compose/plugins.go, but the helpers had been removed by the earlier wrapper-cleanup in da530c7. The result was a broken go build for pkg/compose on upstream/main. Restore the two helpers alongside the symmetric creating/created and removing/removed pairs so call sites in plugins.go match the existing pattern used in the same switch. Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Restores the missing progress event helper functions used by the plugin stop lifecycle hook so pkg/compose builds again and the plugin progress reporting follows the same helper pattern as other lifecycle hooks.
Changes:
- Reintroduces
stoppingEventandstoppedEventhelper functions inpkg/compose/progress.go. - Uses existing
api.StatusStopping/api.StatusStoppedstatus texts vianewEventto match the establishedcreating/createdandremoving/removedpattern.
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
This PR correctly restores the stoppingEvent and stoppedEvent helper functions in pkg/compose/progress.go that were accidentally removed during the refactor in da530c723. The restored helpers follow the same pattern as the existing creatingEvent/createdEvent and removingEvent/removedEvent pairs, and the fix resolves the broken build caused by the missing functions referenced in plugins.go.
No issues found. The change is minimal, targeted, and correct.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What I did
The stop lifecycle hook added in 672dc14 calls stoppingEvent and stoppedEvent from pkg/compose/plugins.go, but the helpers had been removed by the earlier wrapper-cleanup in da530c7. The result was a broken go build for pkg/compose on upstream/main.
Restore the two helpers alongside the symmetric creating/created and removing/removed pairs so call sites in plugins.go match the existing pattern used in the same switch.
Related issue
N/A
(not mandatory) A picture of a cute animal, if possible in relation to what you did