Skip to content

Commit

Permalink
fix: kill plugins when FTL stops (#3180)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e authored Oct 24, 2024
1 parent c3ad689 commit 7fdebbe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/buildengine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,14 @@ func (e *Engine) watchForPluginEvents(originalCtx context.Context) {
e.rawEngineUpdates <- ModuleDeploySuccess{Module: event.Module}
}
case <-originalCtx.Done():
// kill all plugins
e.moduleMetas.Range(func(name string, meta moduleMeta) bool {
err := meta.plugin.Kill()
if err != nil {
log.FromContext(originalCtx).Errorf(err, "could not kill plugin")
}
return true
})
return
}
}
Expand Down

0 comments on commit 7fdebbe

Please sign in to comment.