Skip to content

Commit

Permalink
remove logging for missing SecureConfig (#238)
Browse files Browse the repository at this point in the history
In #207 we introduced a warning if the `SecureConfig` is unset. For Nomad and
other applications that have "internal" go-plugin consumers where the
application runs itself as a plugin, this causes spurious warn-level logs. For
Nomad in particular this means every task driver and logmon invocation emits the
log, which is our primary operation.

Setting a `SecureConfig` isn't required, and if a given go-plugin consumer
requires it to be, this seems more like a programming error than a runtime
error. Remove the log line.
  • Loading branch information
tgross committed Mar 2, 2023
1 parent 84014b7 commit d26b694
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
return nil, err
}

if c.config.SecureConfig == nil {
c.logger.Warn("plugin configured with a nil SecureConfig")
} else {
if c.config.SecureConfig != nil {
if ok, err := c.config.SecureConfig.Check(cmd.Path); err != nil {
return nil, fmt.Errorf("error verifying checksum: %s", err)
} else if !ok {
Expand Down

0 comments on commit d26b694

Please sign in to comment.