Skip to content

Commit

Permalink
build(deps): bump github.com/elastic/elastic-agent-libs from 0.7.5 to…
Browse files Browse the repository at this point in the history
… 0.9.4 (#39013)

* build(deps): bump github.com/elastic/elastic-agent-libs

Bumps [github.com/elastic/elastic-agent-libs](https://github.com/elastic/elastic-agent-libs) from 0.7.5 to 0.9.4.
- [Release notes](https://github.com/elastic/elastic-agent-libs/releases)
- [Commits](elastic/elastic-agent-libs@v0.7.5...v0.9.4)

---
updated-dependencies:
- dependency-name: github.com/elastic/elastic-agent-libs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update NOTICE.txt

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
  • Loading branch information
3 people committed May 7, 2024
1 parent 2f5bd9e commit 89aa35e
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 31 deletions.
20 changes: 10 additions & 10 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12969,11 +12969,11 @@ SOFTWARE

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

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

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -22336,11 +22336,11 @@ Contents of probable licence file $GOMODCACHE/github.com/prometheus/common@v0.30

--------------------------------------------------------------------------------
Dependency : github.com/prometheus/procfs
Version: v0.9.0
Version: v0.13.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/prometheus/procfs@v0.9.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/prometheus/procfs@v0.13.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -25507,11 +25507,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : golang.org/x/sync
Version: v0.5.0
Version: v0.6.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.5.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.6.0/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -25544,11 +25544,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : golang.org/x/sys
Version: v0.18.0
Version: v0.19.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.18.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.19.0/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -26952,11 +26952,11 @@ Contents of probable licence file $GOMODCACHE/gotest.tools/gotestsum@v1.7.0/LICE

--------------------------------------------------------------------------------
Dependency : howett.net/plist
Version: v1.0.0
Version: v1.0.1
Licence type (autodetected): BSD-2-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/howett.net/plist@v1.0.0/LICENSE:
Contents of probable licence file $GOMODCACHE/howett.net/plist@v1.0.1/LICENSE:

Copyright (c) 2013, Dustin L. Howett. All rights reserved.

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.30.0
github.com/prometheus/procfs v0.9.0
github.com/prometheus/procfs v0.13.0
github.com/prometheus/prometheus v1.8.2-0.20210701133801-b0944590a1c9
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e // indirect
Expand All @@ -156,8 +156,8 @@ require (
golang.org/x/mod v0.14.0
golang.org/x/net v0.23.0
golang.org/x/oauth2 v0.10.0
golang.org/x/sync v0.5.0
golang.org/x/sys v0.18.0
golang.org/x/sync v0.6.0
golang.org/x/sys v0.19.0
golang.org/x/text v0.14.0
golang.org/x/time v0.3.0
golang.org/x/tools v0.16.0
Expand All @@ -173,7 +173,7 @@ require (
gopkg.in/yaml.v2 v2.4.0
gotest.tools v2.2.0+incompatible
gotest.tools/gotestsum v1.7.0
howett.net/plist v1.0.0
howett.net/plist v1.0.1
k8s.io/api v0.23.4
k8s.io/apimachinery v0.23.4
k8s.io/client-go v0.23.4
Expand Down Expand Up @@ -204,7 +204,7 @@ require (
github.com/elastic/bayeux v1.0.5
github.com/elastic/ebpfevents v0.6.0
github.com/elastic/elastic-agent-autodiscover v0.6.14
github.com/elastic/elastic-agent-libs v0.7.5
github.com/elastic/elastic-agent-libs v0.9.4
github.com/elastic/elastic-agent-shipper-client v0.5.1-0.20230228231646-f04347b666f3
github.com/elastic/elastic-agent-system-metrics v0.9.2
github.com/elastic/go-elasticsearch/v8 v8.13.1
Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ github.com/elastic/elastic-agent-autodiscover v0.6.14 h1:0zJYNyv9GKTOiNqCHqEVboP
github.com/elastic/elastic-agent-autodiscover v0.6.14/go.mod h1:39/fHHlnyTK6oUNZfAhxJwBTVahO9tNasEIjzsxGMu8=
github.com/elastic/elastic-agent-client/v7 v7.8.1 h1:J9wZc/0mUvSEok0X5iR5+n60Jgb+AWooKddb3XgPWqM=
github.com/elastic/elastic-agent-client/v7 v7.8.1/go.mod h1:axl1nkdqc84YRFkeJGD9jExKNPUrOrzf3DFo2m653nY=
github.com/elastic/elastic-agent-libs v0.7.5 h1:4UMqB3BREvhwecYTs/L23oQp1hs/XUkcunPlmTZn5yg=
github.com/elastic/elastic-agent-libs v0.7.5/go.mod h1:pGMj5myawdqu+xE+WKvM5FQzKQ/MonikkWOzoFTJxaU=
github.com/elastic/elastic-agent-libs v0.9.4 h1:I6c1NAj3grJ1YZgo+U04w0csMAWGIn6eZTb23Z5MbAI=
github.com/elastic/elastic-agent-libs v0.9.4/go.mod h1:SkMnpLm+tXybBrIWK6f3rcOhrDIztLbYCV46m8gwc8g=
github.com/elastic/elastic-agent-shipper-client v0.5.1-0.20230228231646-f04347b666f3 h1:sb+25XJn/JcC9/VL8HX4r4QXSUq4uTNzGS2kxOE7u1U=
github.com/elastic/elastic-agent-shipper-client v0.5.1-0.20230228231646-f04347b666f3/go.mod h1:rWarFM7qYxJKsi9WcV6ONcFjH/NA3niDNpTxO+8/GVI=
github.com/elastic/elastic-agent-system-metrics v0.9.2 h1:/tvTKOt55EerU0WwGFoDhBlyWLgxyv7d8xCbny0bciw=
Expand Down Expand Up @@ -1511,8 +1511,8 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx
github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o=
github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g=
github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY=
github.com/prometheus/prometheus v1.8.2-0.20210701133801-b0944590a1c9 h1:If7jYp33vwa8ZQ7GGwrAs0SBjiW0aWeAB/oV1aG7bZ4=
github.com/prometheus/prometheus v1.8.2-0.20210701133801-b0944590a1c9/go.mod h1:A97P+iwS3Ffpxpejz4+ASZl6i9EqSJDzxObq8DjV2SU=
Expand Down Expand Up @@ -1994,8 +1994,8 @@ golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -2112,8 +2112,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down Expand Up @@ -2472,8 +2472,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM=
howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY=
k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s=
k8s.io/api v0.23.4 h1:85gnfXQOWbJa1SiWGpE9EEtHs0UVvDyIsSMpEtl2D4E=
Expand Down
5 changes: 3 additions & 2 deletions heartbeat/monitors/active/dialchain/dialers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package dialchain

import (
"context"
"fmt"
"net"
"strconv"
Expand Down Expand Up @@ -69,7 +70,7 @@ func UDPDialer(to time.Duration) NetDialer {
// CreateNetDialer returns a NetDialer with the given timeout.
func CreateNetDialer(timeout time.Duration) NetDialer {
return func(event *beat.Event) (transport.Dialer, error) {
return makeDialer(func(network, address string) (net.Conn, error) {
return makeDialer(func(ctx context.Context, network, address string) (net.Conn, error) {
var namespace string

switch network {
Expand Down Expand Up @@ -100,7 +101,7 @@ func CreateNetDialer(timeout time.Duration) NetDialer {
dialer := &net.Dialer{Timeout: timeout}

start := time.Now()
conn, err := transport.DialWith(dialer, network, host, addresses, port)
conn, err := transport.DialWith(ctx, dialer, network, host, addresses, port)
if err != nil {
return nil, ecserr.NewCouldNotConnectErr(host, port, err)
}
Expand Down
7 changes: 4 additions & 3 deletions heartbeat/monitors/active/dialchain/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package dialchain

import (
"context"
"net"
"time"

Expand Down Expand Up @@ -58,23 +59,23 @@ func (t *timer) stop() { t.e = time.Now() }
func (t *timer) duration() time.Duration { return t.e.Sub(t.s) }

// makeDialer aliases transport.DialerFunc
func makeDialer(fn func(network, address string) (net.Conn, error)) transport.Dialer {
func makeDialer(fn func(ctx context.Context, network, address string) (net.Conn, error)) transport.Dialer {
return transport.DialerFunc(fn)
}

// beforeDial will always call fn before executing the underlying dialer.
// The callback must return the original or a new address to be used with
// the dialer.
func beforeDial(dialer transport.Dialer, fn func(string) string) transport.Dialer {
return makeDialer(func(network, address string) (net.Conn, error) {
return makeDialer(func(ctx context.Context, network, address string) (net.Conn, error) {
address = fn(address)
return dialer.Dial(network, address)
})
}

// afterDial will run fn after the dialer did successfully return a connection.
func afterDial(dialer transport.Dialer, fn func(net.Conn) (net.Conn, error)) transport.Dialer {
return makeDialer(func(network, address string) (net.Conn, error) {
return makeDialer(func(ctx context.Context, network, address string) (net.Conn, error) {
conn, err := dialer.Dial(network, address)
if err == nil {
conn, err = fn(conn)
Expand Down
3 changes: 2 additions & 1 deletion metricbeat/helper/dialer/dialer_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package dialer

import (
"context"
"errors"
"net"
"strings"
Expand Down Expand Up @@ -60,7 +61,7 @@ func (t *NpipeDialerBuilder) String() string {
func (t *NpipeDialerBuilder) Make(timeout time.Duration) (transport.Dialer, error) {
to := timeout
return transport.DialerFunc(
func(_, _ string) (net.Conn, error) {
func(_ context.Context, _ string, _ string) (net.Conn, error) {
return winio.DialPipe(
strings.TrimSuffix(npipe.TransformString(t.Path), "/"),
&to,
Expand Down
5 changes: 5 additions & 0 deletions x-pack/filebeat/input/cel/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,11 @@ func (d socketDialer) Dial(_, _ string) (net.Conn, error) {
return net.Dial("unix", d.path)
}

func (d socketDialer) DialContext(ctx context.Context, _, _ string) (net.Conn, error) {
var nd net.Dialer
return nd.DialContext(ctx, "unix", d.path)
}

func checkRedirect(cfg *ResourceConfig, log *logp.Logger) func(*http.Request, []*http.Request) error {
return func(req *http.Request, via []*http.Request) error {
log.Debug("http client: checking redirect")
Expand Down
5 changes: 5 additions & 0 deletions x-pack/filebeat/input/cel/transport_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package cel

import (
"context"
"errors"
"net"
)
Expand All @@ -19,3 +20,7 @@ type npipeDialer struct {
func (npipeDialer) Dial(_, _ string) (net.Conn, error) {
return nil, errors.New("named pipe only available on windows")
}

func (npipeDialer) DialContext(_ context.Context, _, _ string) (net.Conn, error) {
return nil, errors.New("named pipe only available on windows")
}
5 changes: 5 additions & 0 deletions x-pack/filebeat/input/cel/transport_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package cel

import (
"context"
"net"
"path/filepath"

Expand All @@ -21,3 +22,7 @@ type npipeDialer struct {
func (d npipeDialer) Dial(_, _ string) (net.Conn, error) {
return winio.DialPipe(`\\.\pipe`+filepath.FromSlash(d.path), nil)
}

func (d npipeDialer) DialContext(ctx context.Context, _, _ string) (net.Conn, error) {
return winio.DialPipeContext(ctx, `\\.\pipe`+filepath.FromSlash(d.path))
}
5 changes: 5 additions & 0 deletions x-pack/filebeat/input/httpjson/client_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package httpjson

import (
"context"
"errors"
"net"
)
Expand All @@ -19,3 +20,7 @@ type npipeDialer struct {
func (npipeDialer) Dial(_, _ string) (net.Conn, error) {
return nil, errors.New("named pipe only available on windows")
}

func (npipeDialer) DialContext(_ context.Context, _, _ string) (net.Conn, error) {
return nil, errors.New("named pipe only available on windows")
}
5 changes: 5 additions & 0 deletions x-pack/filebeat/input/httpjson/client_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package httpjson

import (
"context"
"net"
"path/filepath"

Expand All @@ -21,3 +22,7 @@ type npipeDialer struct {
func (d npipeDialer) Dial(_, _ string) (net.Conn, error) {
return winio.DialPipe(`\\.\pipe`+filepath.FromSlash(d.path), nil)
}

func (d npipeDialer) DialContext(ctx context.Context, _, _ string) (net.Conn, error) {
return winio.DialPipeContext(ctx, `\\.\pipe`+filepath.FromSlash(d.path))
}
5 changes: 5 additions & 0 deletions x-pack/filebeat/input/httpjson/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ func (d socketDialer) Dial(_, _ string) (net.Conn, error) {
return net.Dial("unix", d.path)
}

func (d socketDialer) DialContext(ctx context.Context, _, _ string) (net.Conn, error) {
var nd net.Dialer
return nd.DialContext(ctx, "unix", d.path)
}

func checkRedirect(config *requestConfig, log *logp.Logger) func(*http.Request, []*http.Request) error {
return func(req *http.Request, via []*http.Request) error {
log.Debug("http client: checking redirect")
Expand Down

0 comments on commit 89aa35e

Please sign in to comment.