From b30fae6e40f7d68b3c0b50ce4093996d8203815e Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Thu, 2 Feb 2023 12:44:41 +0000 Subject: [PATCH 1/3] More info logs when plugins are being terminated --- clients/destination/v0/destination_terminate.go | 2 ++ clients/source/v1/source_terminate.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/clients/destination/v0/destination_terminate.go b/clients/destination/v0/destination_terminate.go index aebd7e8afc..8b025ca53f 100644 --- a/clients/destination/v0/destination_terminate.go +++ b/clients/destination/v0/destination_terminate.go @@ -13,10 +13,12 @@ func (c *Client) terminateProcess() error { c.logger.Error().Err(err).Msg("failed to send interrupt signal to destination plugin") } timer := time.AfterFunc(5*time.Second, func() { + c.logger.Info().Msg("sending kill signal to destination plugin") if err := c.cmd.Process.Kill(); err != nil { c.logger.Error().Err(err).Msg("failed to kill destination plugin") } }) + c.logger.Info().Msg("waiting for destination plugin to terminate") st, err := c.cmd.Process.Wait() timer.Stop() if err != nil { diff --git a/clients/source/v1/source_terminate.go b/clients/source/v1/source_terminate.go index 11e8313fc3..d634837572 100644 --- a/clients/source/v1/source_terminate.go +++ b/clients/source/v1/source_terminate.go @@ -13,10 +13,12 @@ func (c *Client) terminateProcess() error { c.logger.Error().Err(err).Msg("failed to send interrupt signal to source plugin") } timer := time.AfterFunc(5*time.Second, func() { + c.logger.Info().Msg("sending kill signal to source plugin") if err := c.cmd.Process.Kill(); err != nil { c.logger.Error().Err(err).Msg("failed to kill source plugin") } }) + c.logger.Info().Msg("waiting for source plugin to terminate") st, err := c.cmd.Process.Wait() timer.Stop() if err != nil { From ea22788c8a5ca8da56eb18573285c76f3b9e9d9e Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Thu, 2 Feb 2023 12:48:22 +0000 Subject: [PATCH 2/3] Add to windows as well --- clients/destination/v0/destination_terminate_windows.go | 1 + clients/source/v1/source_terminate_windows.go | 1 + 2 files changed, 2 insertions(+) diff --git a/clients/destination/v0/destination_terminate_windows.go b/clients/destination/v0/destination_terminate_windows.go index 366d19ed24..ca6e302b81 100644 --- a/clients/destination/v0/destination_terminate_windows.go +++ b/clients/destination/v0/destination_terminate_windows.go @@ -6,6 +6,7 @@ func (c *Client) terminateProcess() error { if err := c.cmd.Process.Kill(); err != nil { c.logger.Error().Err(err).Msg("failed to kill destination plugin") } + c.logger.Info().Msg("waiting for source plugin to terminate") st, err := c.cmd.Process.Wait() if err != nil { return err diff --git a/clients/source/v1/source_terminate_windows.go b/clients/source/v1/source_terminate_windows.go index e5d993990b..3675655eb8 100644 --- a/clients/source/v1/source_terminate_windows.go +++ b/clients/source/v1/source_terminate_windows.go @@ -6,6 +6,7 @@ func (c *Client) terminateProcess() error { if err := c.cmd.Process.Kill(); err != nil { c.logger.Error().Err(err).Msg("failed to kill source plugin") } + c.logger.Info().Msg("waiting for source plugin to terminate") st, err := c.cmd.Process.Wait() if err != nil { return err From 40db5e6fa9d3106de4551592e883913fdf863381 Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Thu, 2 Feb 2023 13:16:42 +0000 Subject: [PATCH 3/3] Update destination_terminate_windows.go --- clients/destination/v0/destination_terminate_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/destination/v0/destination_terminate_windows.go b/clients/destination/v0/destination_terminate_windows.go index ca6e302b81..429363ac3d 100644 --- a/clients/destination/v0/destination_terminate_windows.go +++ b/clients/destination/v0/destination_terminate_windows.go @@ -6,7 +6,7 @@ func (c *Client) terminateProcess() error { if err := c.cmd.Process.Kill(); err != nil { c.logger.Error().Err(err).Msg("failed to kill destination plugin") } - c.logger.Info().Msg("waiting for source plugin to terminate") + c.logger.Info().Msg("waiting for destination plugin to terminate") st, err := c.cmd.Process.Wait() if err != nil { return err