Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions NOTICE-fips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1254,11 +1254,11 @@ SOFTWARE

--------------------------------------------------------------------------------
Dependency : github.com/elastic/elastic-agent-libs
Version: v0.22.0
Version: v0.23.1
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.22.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.23.1/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1254,11 +1254,11 @@ SOFTWARE

--------------------------------------------------------------------------------
Dependency : github.com/elastic/elastic-agent-libs
Version: v0.22.0
Version: v0.23.1
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.22.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.23.1/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae
github.com/elastic/elastic-agent-autodiscover v0.10.0
github.com/elastic/elastic-agent-client/v7 v7.17.2
github.com/elastic/elastic-agent-libs v0.22.0
github.com/elastic/elastic-agent-libs v0.23.1
github.com/elastic/elastic-agent-system-metrics v0.11.16
github.com/elastic/elastic-transport-go/v8 v8.7.0
github.com/elastic/go-elasticsearch/v8 v8.19.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQB
github.com/elastic/elastic-agent-autodiscover v0.10.0/go.mod h1:Nf3zh9FcJ9nTTswTwDTUAqXmvQllOrNliM6xmORSxwE=
github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk4MDDLWA0d8iHHOxLA=
github.com/elastic/elastic-agent-client/v7 v7.17.2/go.mod h1:5irRFqp6HLqtu1S+OeY0jg8x7K6PLL+DW+PwVk1vJnk=
github.com/elastic/elastic-agent-libs v0.22.0 h1:36OSYIJ340kzNxwH8bkpSgt3fLbyAPGMj1zD6hcoSok=
github.com/elastic/elastic-agent-libs v0.22.0/go.mod h1:xSeIP3NtOIT4N2pPS4EyURmS1Q8mK0lWZ8Wd1Du6q3w=
github.com/elastic/elastic-agent-libs v0.23.1 h1:5w1fAuK7mMUpr2jZKC7OyZApfUpYEoHnWMWNpDkSDTM=
github.com/elastic/elastic-agent-libs v0.23.1/go.mod h1:xSeIP3NtOIT4N2pPS4EyURmS1Q8mK0lWZ8Wd1Du6q3w=
github.com/elastic/elastic-agent-system-metrics v0.11.16 h1:cLjuO8pE5cUwPGWUHmy1VOERmJVDaep8gY+U4YRQ5vs=
github.com/elastic/elastic-agent-system-metrics v0.11.16/go.mod h1:qiZC5p1hd8te4XVnhh7FkXdcYhxFnl5i9GJpROtf6zo=
github.com/elastic/elastic-transport-go/v8 v8.7.0 h1:OgTneVuXP2uip4BA658Xi6Hfw+PeIOod2rY3GVMGoVE=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ func (h *PolicyReassign) Handle(ctx context.Context, a fleetapi.Action, acker ac
h.log.Debugf("handlerPolicyReassign: action '%+v' received", a)

if err := acker.Ack(ctx, a); err != nil {
h.log.Errorf("failed to acknowledge POLICY_REASSIGN action with id '%s'", a.ID)
h.log.Errorf("failed to acknowledge POLICY_REASSIGN action with id '%s'", a.ID())
} else if err := acker.Commit(ctx); err != nil {
h.log.Errorf("failed to commit acker after acknowledging action with id '%s'", a.ID)
h.log.Errorf("failed to commit acker after acknowledging action with id '%s'", a.ID())
}

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ func (btr *BackoffRoundTripper) RoundTrip(req *http.Request) (*http.Response, er
if resettableBody != nil {
_, err = resettableBody.Seek(0, io.SeekStart)
if err != nil {
btr.logger.Errorf("error while resetting request body: %w", err)
btr.logger.Errorf("error while resetting request body: %s", err.Error())
}
}

attempt++
resp, err = btr.next.RoundTrip(req) //nolint:bodyclose // the response body is closed when status code >= 400 or it is closed by the caller
if err != nil {
btr.logger.Errorf("attempt %d: error round-trip: %w", err)
btr.logger.Errorf("attempt %d: error round-trip: %s", attempt, err.Error())
return err
}

if resp.StatusCode >= 400 {
if err := resp.Body.Close(); err != nil {
btr.logger.Errorf("attempt %d: error closing the response body: %w", attempt, err)
btr.logger.Errorf("attempt %d: error closing the response body: %s", attempt, err.Error())
}
btr.logger.Errorf("attempt %d: received response status: %d", attempt, resp.StatusCode)
return errors.New(fmt.Sprintf("received response status: %d", resp.StatusCode))
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/agent/application/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func (u *Upgrader) Upgrade(ctx context.Context, version string, sourceURI string
// in case of error fallback to keep-all
detectedFlavor, err := install.UsedFlavor(paths.Top(), "")
if err != nil {
u.log.Warnf("error encountered when detecting used flavor with top path %q: %w", paths.Top(), err)
u.log.Warnf("error encountered when detecting used flavor with top path %q: %s", paths.Top(), err.Error())
}
u.log.Debugf("detected used flavor: %q", detectedFlavor)
unpackRes, err := u.unpack(version, archivePath, paths.Data(), detectedFlavor)
Expand Down
6 changes: 3 additions & 3 deletions internal/pkg/agent/migration/migrate_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func MigrateToEncryptedConfig(ctx context.Context, l *logp.Logger, unencryptedCo

unencStat, unencFileErr := os.Stat(unencryptedConfigPath)

l.Debugf(fmt.Sprintf("checking stat of enc config %q: %+v, err: %v", encryptedConfigPath, encStat, encFileErr))
l.Debugf(fmt.Sprintf("checking stat of unenc config %q: %+v, err: %v", unencryptedConfigPath, unencStat, unencFileErr))
l.Debugf("checking stat of enc config %q: %+v, err: %v", encryptedConfigPath, encStat, encFileErr)
l.Debugf("checking stat of unenc config %q: %+v, err: %v", unencryptedConfigPath, unencStat, unencFileErr)

isEncryptedConfigEmpty := errors.Is(encFileErr, fs.ErrNotExist) || encStat.Size() == 0
isUnencryptedConfigPresent := unencFileErr == nil && unencStat.Size() > 0
Expand All @@ -54,7 +54,7 @@ func MigrateToEncryptedConfig(ctx context.Context, l *logp.Logger, unencryptedCo
defer func() {
err = reader.Close()
if err != nil {
l.Errorf(fmt.Sprintf("Error closing unencrypted store reader for %q: %v", unencryptedConfigPath, err))
l.Errorf("Error closing unencrypted store reader for %q: %v", unencryptedConfigPath, err)
}
}()
store, err := storage.NewEncryptedDiskStore(ctx, encryptedConfigPath, storageOpts...)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (p *dynamicProvider) watchResource(
}
p.config.Node, err = kubernetes.DiscoverKubernetesNode(p.logger, nd)
if err != nil {
p.logger.Debugf("Kubernetes provider skipped, unable to discover node: %w", err)
p.logger.Debugf("Kubernetes provider skipped, unable to discover node: %s", err.Error())
return nil, nil
}

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/config/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (l *Loader) Load(files []string) (*Config, error) {
return nil, fmt.Errorf("cannot get configuration from '%s': %w", f, err)
}
inputsList = append(inputsList, inp...)
l.logger.Debugf("Loaded %s input(s) from configuration from %s", len(inp), f)
l.logger.Debugf("Loaded %d input(s) from configuration from %s", len(inp), f)
} else {
if err := merger.Add(cfg.access(), err); err != nil {
return nil, fmt.Errorf("failed to merge configuration file '%s' to existing one: %w", f, err)
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/remote/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (c *Client) Send(
errs = append(errs, fmt.Errorf("%s: %w", msg, err))

// Using debug level as the error is only relevant if all clients fail.
c.log.With("error", err).Debugf(msg)
c.log.With("error", err).Debug(msg)
continue
}
c.checkApiVersionHeaders(req, resp)
Expand Down
2 changes: 1 addition & 1 deletion pkg/testing/ess/serverless_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (log *defaultLogger) Logf(format string, args ...any) {
if len(args) == 0 {

} else {
log.wrapped.Infof(format, args)
log.wrapped.Infof(format, args...)
}

}
Expand Down
Loading