Skip to content

Commit 34faf07

Browse files
committed
Update to v7.6.0 client and fixes from code review.
1 parent 6db6284 commit 34faf07

File tree

6 files changed

+67
-30
lines changed

6 files changed

+67
-30
lines changed

NOTICE.txt

Lines changed: 57 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -933,11 +933,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-a
933933

934934
--------------------------------------------------------------------------------
935935
Dependency : github.com/elastic/elastic-agent-client/v7
936-
Version: v7.5.0
936+
Version: v7.6.0
937937
Licence type (autodetected): Elastic
938938
--------------------------------------------------------------------------------
939939

940-
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-client/v7@v7.5.0/LICENSE.txt:
940+
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-client/v7@v7.6.0/LICENSE.txt:
941941

942942
ELASTIC LICENSE AGREEMENT
943943

@@ -6242,11 +6242,11 @@ THE SOFTWARE.
62426242

62436243
--------------------------------------------------------------------------------
62446244
Dependency : golang.org/x/crypto
6245-
Version: v0.14.0
6245+
Version: v0.16.0
62466246
Licence type (autodetected): BSD-3-Clause
62476247
--------------------------------------------------------------------------------
62486248

6249-
Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.14.0/LICENSE:
6249+
Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.16.0/LICENSE:
62506250

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

@@ -6316,11 +6316,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63166316

63176317
--------------------------------------------------------------------------------
63186318
Dependency : golang.org/x/sync
6319-
Version: v0.3.0
6319+
Version: v0.5.0
63206320
Licence type (autodetected): BSD-3-Clause
63216321
--------------------------------------------------------------------------------
63226322

6323-
Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.3.0/LICENSE:
6323+
Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.5.0/LICENSE:
63246324

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

@@ -6353,11 +6353,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63536353

63546354
--------------------------------------------------------------------------------
63556355
Dependency : golang.org/x/sys
6356-
Version: v0.13.0
6356+
Version: v0.15.0
63576357
Licence type (autodetected): BSD-3-Clause
63586358
--------------------------------------------------------------------------------
63596359

6360-
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.13.0/LICENSE:
6360+
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.15.0/LICENSE:
63616361

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

@@ -6390,11 +6390,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63906390

63916391
--------------------------------------------------------------------------------
63926392
Dependency : golang.org/x/term
6393-
Version: v0.13.0
6393+
Version: v0.15.0
63946394
Licence type (autodetected): BSD-3-Clause
63956395
--------------------------------------------------------------------------------
63966396

6397-
Contents of probable licence file $GOMODCACHE/golang.org/x/term@v0.13.0/LICENSE:
6397+
Contents of probable licence file $GOMODCACHE/golang.org/x/term@v0.15.0/LICENSE:
63986398

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

@@ -6427,11 +6427,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64276427

64286428
--------------------------------------------------------------------------------
64296429
Dependency : golang.org/x/text
6430-
Version: v0.13.0
6430+
Version: v0.14.0
64316431
Licence type (autodetected): BSD-3-Clause
64326432
--------------------------------------------------------------------------------
64336433

6434-
Contents of probable licence file $GOMODCACHE/golang.org/x/text@v0.13.0/LICENSE:
6434+
Contents of probable licence file $GOMODCACHE/golang.org/x/text@v0.14.0/LICENSE:
64356435

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

@@ -6501,11 +6501,48 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65016501

65026502
--------------------------------------------------------------------------------
65036503
Dependency : golang.org/x/tools
6504-
Version: v0.7.0
6504+
Version: v0.16.0
65056505
Licence type (autodetected): BSD-3-Clause
65066506
--------------------------------------------------------------------------------
65076507

6508-
Contents of probable licence file $GOMODCACHE/golang.org/x/tools@v0.7.0/LICENSE:
6508+
Contents of probable licence file $GOMODCACHE/golang.org/x/tools@v0.16.0/LICENSE:
6509+
6510+
Copyright (c) 2009 The Go Authors. All rights reserved.
6511+
6512+
Redistribution and use in source and binary forms, with or without
6513+
modification, are permitted provided that the following conditions are
6514+
met:
6515+
6516+
* Redistributions of source code must retain the above copyright
6517+
notice, this list of conditions and the following disclaimer.
6518+
* Redistributions in binary form must reproduce the above
6519+
copyright notice, this list of conditions and the following disclaimer
6520+
in the documentation and/or other materials provided with the
6521+
distribution.
6522+
* Neither the name of Google Inc. nor the names of its
6523+
contributors may be used to endorse or promote products derived from
6524+
this software without specific prior written permission.
6525+
6526+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
6527+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6528+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6529+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
6530+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
6531+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
6532+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
6533+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
6534+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6535+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
6536+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6537+
6538+
6539+
--------------------------------------------------------------------------------
6540+
Dependency : golang.org/x/tools/go/vcs
6541+
Version: v0.1.0-deprecated
6542+
Licence type (autodetected): BSD-3-Clause
6543+
--------------------------------------------------------------------------------
6544+
6545+
Contents of probable licence file $GOMODCACHE/golang.org/x/tools/go/vcs@v0.1.0-deprecated/LICENSE:
65096546

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

@@ -17519,11 +17556,11 @@ THE SOFTWARE.
1751917556

1752017557
--------------------------------------------------------------------------------
1752117558
Dependency : golang.org/x/exp
17522-
Version: v0.0.0-20220722155223-a9213eeb770e
17559+
Version: v0.0.0-20231127185646-65229373498e
1752317560
Licence type (autodetected): BSD-3-Clause
1752417561
--------------------------------------------------------------------------------
1752517562

17526-
Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/LICENSE:
17563+
Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20231127185646-65229373498e/LICENSE:
1752717564

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

@@ -17556,11 +17593,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1755617593

1755717594
--------------------------------------------------------------------------------
1755817595
Dependency : golang.org/x/mod
17559-
Version: v0.9.0
17596+
Version: v0.14.0
1756017597
Licence type (autodetected): BSD-3-Clause
1756117598
--------------------------------------------------------------------------------
1756217599

17563-
Contents of probable licence file $GOMODCACHE/golang.org/x/mod@v0.9.0/LICENSE:
17600+
Contents of probable licence file $GOMODCACHE/golang.org/x/mod@v0.14.0/LICENSE:
1756417601

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

@@ -17593,11 +17630,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1759317630

1759417631
--------------------------------------------------------------------------------
1759517632
Dependency : golang.org/x/net
17596-
Version: v0.17.0
17633+
Version: v0.19.0
1759717634
Licence type (autodetected): BSD-3-Clause
1759817635
--------------------------------------------------------------------------------
1759917636

17600-
Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.17.0/LICENSE:
17637+
Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.19.0/LICENSE:
1760117638

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

changelog/fragments/1701975889-Fix-component-control-protocol-to-allow-checkin-to-be-chunked-across-multiple-messages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# - security: impacts on the security of a product or a user’s deployment.
99
# - upgrade: important information for someone upgrading from a prior version
1010
# - other: does not fit into any of the other categories
11-
kind: feature
11+
kind: bug-fix
1212

1313
# Change summary; a 80ish characters long description of the change.
1414
summary: Fix component control protocol to allow checkin to be chunked across multiple messages

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5
1414
github.com/elastic/e2e-testing v1.1.0
1515
github.com/elastic/elastic-agent-autodiscover v0.6.5
16-
github.com/elastic/elastic-agent-client/v7 v7.5.0
16+
github.com/elastic/elastic-agent-client/v7 v7.6.0
1717
github.com/elastic/elastic-agent-libs v0.7.2
1818
github.com/elastic/elastic-agent-system-metrics v0.9.1
1919
github.com/elastic/elastic-transport-go/v8 v8.3.0
@@ -177,7 +177,6 @@ replace (
177177
github.com/Shopify/sarama => github.com/elastic/sarama v1.19.1-0.20220310193331-ebc2b0d8eef3
178178
github.com/dop251/goja => github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20
179179
github.com/dop251/goja_nodejs => github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6
180-
github.com/elastic/elastic-agent-client/v7 => github.com/blakerouse/elastic-agent-client/v7 v7.0.0-20231206170140-87b7594d1a40 // Remove once merged upstream. See https://github.com/elastic/elastic-agent-client/pull/89 for PR.
181180
github.com/fsnotify/fsnotify => github.com/adriansr/fsnotify v1.4.8-0.20211018144411-a81f2b630e7c
182181
github.com/tonistiigi/fifo => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c
183182
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,6 @@ github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngE
517517
github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
518518
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
519519
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
520-
github.com/blakerouse/elastic-agent-client/v7 v7.0.0-20231206170140-87b7594d1a40 h1:3qH6CFLQELghE810OcDnuIAJe6wkPx6gVF1jdkEbPuY=
521-
github.com/blakerouse/elastic-agent-client/v7 v7.0.0-20231206170140-87b7594d1a40/go.mod h1:GlUKrbVd/O1CRAZonpBeN3J0RlVqP6VGcrBjFWca+aM=
522520
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 h1:oMCHnXa6CCCafdPDbMh/lWRhRByN0VFLvv+g+ayx1SI=
523521
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI=
524522
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
@@ -781,6 +779,8 @@ github.com/elastic/e2e-testing v1.1.0 h1:Y+K215EWkf3ojAWmBK2JrxH/rITjkKM1zR8mnwI
781779
github.com/elastic/e2e-testing v1.1.0/go.mod h1:8q2d8dmwavJXISowwaoreHFBnbR/uK4qanfRGhC/W9A=
782780
github.com/elastic/elastic-agent-autodiscover v0.6.5 h1:5DeMpuNc8c/tN6HN0A4A2uOFTNFHSg7xrKApzfhvF1U=
783781
github.com/elastic/elastic-agent-autodiscover v0.6.5/go.mod h1:chulyCAyZb/njMHgzkhC/yWnt8v/Y6eCRUhmFVnsA5o=
782+
github.com/elastic/elastic-agent-client/v7 v7.6.0 h1:FEn6FjzynW4TIQo5G096Tr7xYK/P5LY9cSS6wRbXZTc=
783+
github.com/elastic/elastic-agent-client/v7 v7.6.0/go.mod h1:GlUKrbVd/O1CRAZonpBeN3J0RlVqP6VGcrBjFWca+aM=
784784
github.com/elastic/elastic-agent-libs v0.7.2 h1:yT0hF0UAxJCdQqhHh6SFpgYrcpB10oFzPj8IaytPS2o=
785785
github.com/elastic/elastic-agent-libs v0.7.2/go.mod h1:pVBEElQJUO9mr4WStWNXuQGsJn54lcjAoYAHmsvBLBc=
786786
github.com/elastic/elastic-agent-system-metrics v0.9.1 h1:r0ofKHgPpl+W09ie7tzGcCDC0d4NZbQUv37rSgHf4FM=

pkg/component/runtime/manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ func (m *Manager) CheckinV2(server proto.ElasticAgent_CheckinV2Server) error {
664664
for _, support := range initCheckin.Supports {
665665
if support == proto.ConnectionSupports_CheckinChunking {
666666
runtime.comm.chunkingAllowed = true
667+
break
667668
}
668669
}
669670

pkg/component/runtime/runtime_comm.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"github.com/gofrs/uuid"
1919

2020
"github.com/elastic/elastic-agent-client/v7/pkg/client"
21+
"github.com/elastic/elastic-agent-client/v7/pkg/client/chunk"
2122
"github.com/elastic/elastic-agent-client/v7/pkg/proto"
22-
"github.com/elastic/elastic-agent-client/v7/pkg/utils"
2323
"github.com/elastic/elastic-agent/internal/pkg/agent/application/info"
2424
"github.com/elastic/elastic-agent/internal/pkg/core/authority"
2525
"github.com/elastic/elastic-agent/pkg/core/logger"
@@ -280,7 +280,7 @@ func (c *runtimeComm) checkin(server proto.ElasticAgent_CheckinV2Server, init *p
280280
go func() {
281281
for {
282282
// always allow a chunked observed message to be received
283-
checkin, err := utils.RecvChunkedObserved(server)
283+
checkin, err := chunk.RecvObserved(server)
284284
if err != nil {
285285
if reportableErr(err) {
286286
c.logger.Debugf("check-in stream failed to receive data: %s", err)
@@ -412,12 +412,12 @@ func genServerName() (string, error) {
412412
return strings.Replace(u.String(), "-", "", -1), nil
413413
}
414414

415-
func sendExpectedChunked(server proto.ElasticAgent_CheckinV2Server, msg *proto.CheckinExpected, chunk bool, maxSize int) error {
416-
if !chunk {
415+
func sendExpectedChunked(server proto.ElasticAgent_CheckinV2Server, msg *proto.CheckinExpected, chunkingAllowed bool, maxSize int) error {
416+
if !chunkingAllowed {
417417
// chunking is disabled
418418
return server.Send(msg)
419419
}
420-
msgs, err := utils.ChunkedExpected(msg, maxSize)
420+
msgs, err := chunk.Expected(msg, maxSize)
421421
if err != nil {
422422
return err
423423
}

0 commit comments

Comments
 (0)