Skip to content

Commit 489def7

Browse files
authored
Bump version to 8.3.0 (#7740)
* Update to elastic/beats@34bdc3d46852 * Bump version to 8.3.0 * systemtest: ensure we install the local package
1 parent de04120 commit 489def7

File tree

7 files changed

+40
-48
lines changed

7 files changed

+40
-48
lines changed

NOTICE.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ SOFTWARE.
260260

261261
--------------------------------------------------------------------------------
262262
Dependency : github.com/elastic/beats/v7
263-
Version: v7.0.0-alpha2.0.20220329173557-e40223c86864
263+
Version: v7.0.0-alpha2.0.20220330230128-34bdc3d46852
264264
Licence type (autodetected): Elastic
265265
--------------------------------------------------------------------------------
266266

267-
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20220329173557-e40223c86864/LICENSE.txt:
267+
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20220330230128-34bdc3d46852/LICENSE.txt:
268268

269269
Source code in this repository is variously licensed under the Apache License
270270
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
@@ -18037,11 +18037,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1803718037

1803818038
--------------------------------------------------------------------------------
1803918039
Dependency : golang.org/x/sys
18040-
Version: v0.0.0-20220329152356-43be30ef3008
18040+
Version: v0.0.0-20220330033206-e17cdc41300f
1804118041
Licence type (autodetected): BSD-3-Clause
1804218042
--------------------------------------------------------------------------------
1804318043

18044-
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.0.0-20220329152356-43be30ef3008/LICENSE:
18044+
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.0.0-20220330033206-e17cdc41300f/LICENSE:
1804518045

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

apmpackage/apm/changelog.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# newer versions go on top
22
#
33
# change type can be one of: enhancement, bugfix, breaking-change
4+
- version: "8.3.0"
5+
changes:
6+
- description: Placeholder
7+
type: enhancement
8+
link: https://github.com/elastic/apm-server/pull/123
49
- version: "8.2.0"
510
changes:
611
- description: Field mapping for `source.nat.ip` and `source.nat.port` added to data streams

cmd/intake-receiver/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
package main
1919

2020
// version matches the APM Server's version
21-
const version = "8.2.0"
21+
const version = "8.3.0"

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
package cmd
1919

2020
// name matches github.com/elastic/beats/v7/dev-tools/mage/settings.go parseBeatVersion
21-
const defaultBeatVersion = "8.2.0"
21+
const defaultBeatVersion = "8.3.0"

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/dgraph-io/badger/v2 v2.2007.3-0.20201012072640-f5a7e0a1c83b
99
github.com/dustin/go-humanize v1.0.0
1010
github.com/elastic/apm-server/approvaltest v0.0.0-00010101000000-000000000000
11-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20220329173557-e40223c86864
11+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20220330230128-34bdc3d46852
1212
github.com/elastic/ecs v1.12.0
1313
github.com/elastic/gmux v0.2.0
1414
github.com/elastic/go-elasticsearch/v8 v8.1.0
@@ -172,7 +172,7 @@ require (
172172
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
173173
golang.org/x/mod v0.5.1 // indirect
174174
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
175-
golang.org/x/sys v0.0.0-20220329152356-43be30ef3008 // indirect
175+
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f // indirect
176176
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
177177
golang.org/x/text v0.3.7 // indirect
178178
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect

go.sum

+4-8
Original file line numberDiff line numberDiff line change
@@ -570,17 +570,15 @@ github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7j
570570
github.com/eclipse/paho.mqtt.golang v1.3.5 h1:sWtmgNxYM9P2sP+xEItMozsR3w0cqZFlqnNN1bdl41Y=
571571
github.com/eclipse/paho.mqtt.golang v1.3.5/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc=
572572
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
573-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20220329173557-e40223c86864 h1:/uhvSNEtsM4M6rhmWwaxzHW2ELVxIj8P8soclynnyKw=
574-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20220329173557-e40223c86864/go.mod h1:H2Jt5nsNzIEQS/VJPp6LJbcOfJIoExrFkbaKEApbsEE=
573+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20220330230128-34bdc3d46852 h1:IGJAHmUb/cD2PWbxVPEtD8pxGgwkh8cfz2J/sV+teA8=
574+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20220330230128-34bdc3d46852/go.mod h1:H2Jt5nsNzIEQS/VJPp6LJbcOfJIoExrFkbaKEApbsEE=
575575
github.com/elastic/ecs v1.12.0 h1:u6WZ2AWtxv5vHvTQ4EuVZdWZ51mKHQ2UIltRePcta5U=
576576
github.com/elastic/ecs v1.12.0/go.mod h1:pgiLbQsijLOJvFR8OTILLu0Ni/R/foUNg0L+T6mU9b4=
577577
github.com/elastic/elastic-agent-client/v7 v7.0.0-20210727140539-f0905d9377f6/go.mod h1:uh/Gj9a0XEbYoM4NYz4LvaBVARz3QXLmlNjsrKY9fTc=
578578
github.com/elastic/elastic-agent-client/v7 v7.0.0-20210922110810-e6f1f402a9ed h1:H5si6Yglir/pIyYQur/Es/ByTkQAoNDqidI8gBB2IGs=
579579
github.com/elastic/elastic-agent-client/v7 v7.0.0-20210922110810-e6f1f402a9ed/go.mod h1:uh/Gj9a0XEbYoM4NYz4LvaBVARz3QXLmlNjsrKY9fTc=
580580
github.com/elastic/elastic-agent-libs v0.1.1 h1:13Y268vfgkZK99Ql1X2WdT8jjpd01stln2wLvlewkbo=
581581
github.com/elastic/elastic-agent-libs v0.1.1/go.mod h1:h8K/f7RcdxM2f19VahcS1jeco170ItqV9N7HyYsn9Ss=
582-
github.com/elastic/elastic-transport-go/v8 v8.0.0-alpha h1:SW9xcMVxx4Nv9oRm5rQxzAMAatwiZV8xROP2a48y45Q=
583-
github.com/elastic/elastic-transport-go/v8 v8.0.0-alpha/go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI=
584582
github.com/elastic/elastic-transport-go/v8 v8.1.0 h1:NeqEz1ty4RQz+TVbUrpSU7pZ48XkzGWQj02k5koahIE=
585583
github.com/elastic/elastic-transport-go/v8 v8.1.0/go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI=
586584
github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270 h1:cWPqxlPtir4RoQVCpGSRXmLqjEHpJKbR60rxh1nQZY4=
@@ -589,8 +587,6 @@ github.com/elastic/gmux v0.2.0 h1:HzaJ6FQAZzKJ2RTrINIfDXN1voO5EEEJKLb1Hlrn8pw=
589587
github.com/elastic/gmux v0.2.0/go.mod h1:6+9rYPXZXAyCIb7g3WQ0OVWoLNpU/xHz2VXUrtw6BUg=
590588
github.com/elastic/go-concert v0.2.0 h1:GAQrhRVXprnNjtvTP9pWJ1d4ToEA4cU5ci7TwTa20xg=
591589
github.com/elastic/go-concert v0.2.0/go.mod h1:HWjpO3IAEJUxOeaJOWXWEp7imKd27foxz9V5vegC/38=
592-
github.com/elastic/go-elasticsearch/v8 v8.0.0-alpha.0.20220127111727-5269e7e57568 h1:OAAacmhEz3isPuT+H5HDvm7A5UeYFE/FGDYXPMzaa8Q=
593-
github.com/elastic/go-elasticsearch/v8 v8.0.0-alpha.0.20220127111727-5269e7e57568/go.mod h1:8NCWP26meGbncX+R9sxo2JD8IqBjRTuS7yXMstHpd40=
594590
github.com/elastic/go-elasticsearch/v8 v8.1.0 h1:6TLhYoes04FRK83GakeuMsOQsx1qRwXdP/LF1nxfx1U=
595591
github.com/elastic/go-elasticsearch/v8 v8.1.0/go.mod h1:yY52i2Vj0unLz+N3Nwx1gM5LXwoj3h2dgptNGBYkMLA=
596592
github.com/elastic/go-hdrhistogram v0.1.0 h1:7UVeQ9MsO5c9h8RJeH2S2lXCGi9hQB/94W6Pjjqprc4=
@@ -2449,8 +2445,8 @@ golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBc
24492445
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
24502446
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
24512447
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2452-
golang.org/x/sys v0.0.0-20220329152356-43be30ef3008 h1:pq9pwoi2rjLWvmiVser/lIOgiyA3fli4M+RfGVMA7nE=
2453-
golang.org/x/sys v0.0.0-20220329152356-43be30ef3008/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2448+
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f h1:rlezHXNlxYWvBCzNses9Dlc7nGFaNMJeqLolcmQSSZY=
2449+
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
24542450
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
24552451
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
24562452
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=

systemtest/kibana.go

+23-32
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ package systemtest
2020
import (
2121
"bytes"
2222
"encoding/json"
23-
"errors"
2423
"fmt"
2524
"io/ioutil"
2625
"log"
2726
"mime/multipart"
2827
"net/http"
2928
"net/url"
29+
"os"
30+
"path/filepath"
31+
"runtime"
3032
"testing"
3133
"time"
3234

@@ -56,6 +58,8 @@ var (
5658

5759
// IntegrationPackage holds the "apm" integration package details.
5860
IntegrationPackage *fleettest.Package
61+
62+
integrationPackageVersion string
5963
)
6064

6165
func init() {
@@ -67,6 +71,22 @@ func init() {
6771
u.User = url.UserPassword(adminKibanaUser, adminKibanaPass)
6872
KibanaURL = u
6973
Fleet = fleettest.NewClient(KibanaURL.String())
74+
75+
// Identify the integration package version in build/integrations/apm.
76+
_, filename, _, ok := runtime.Caller(0)
77+
if !ok {
78+
log.Fatal("could not locate systemtest directory")
79+
}
80+
systemtestDir := filepath.Dir(filename)
81+
apmIntegrationBuildDir := filepath.Join(systemtestDir, "..", "build", "integrations", "apm")
82+
entries, err := os.ReadDir(apmIntegrationBuildDir)
83+
if err != nil {
84+
log.Fatalf("error reading build/integrations/apm (run `make build-package`?): %s", err)
85+
}
86+
if n := len(entries); n != 1 {
87+
log.Fatalf("expected 1 entry in build/integrations/apm, got %d (run `make build-package`?)", n)
88+
}
89+
integrationPackageVersion = entries[0].Name()
7090
}
7191

7292
// InitFleet ensures Fleet is set up, destroys any existing agent policies previously
@@ -95,40 +115,11 @@ func InitFleet() error {
95115
// sets IntegrationPackage to the install package. InitFleetPackage assumes
96116
// that Fleet has been set up already.
97117
func InitFleetPackage(reinstall bool) error {
98-
packages, err := Fleet.ListPackages()
118+
err := Fleet.InstallPackage("apm", integrationPackageVersion)
99119
if err != nil {
100120
return err
101121
}
102-
for _, pkg := range packages {
103-
if pkg.Name != "apm" {
104-
continue
105-
}
106-
// ListPackages does not return all package details,
107-
// so we call Package to get them.
108-
IntegrationPackage, err = Fleet.Package(pkg.Name, pkg.Version)
109-
if err != nil {
110-
return err
111-
}
112-
if IntegrationPackage.Status == "installed" {
113-
if !reinstall {
114-
return nil
115-
}
116-
if err := Fleet.DeletePackage(pkg.Name, pkg.Version); err != nil {
117-
return fmt.Errorf(
118-
"failed to delete package %s-%s: %w",
119-
pkg.Name, pkg.Version, err,
120-
)
121-
}
122-
}
123-
break
124-
}
125-
if IntegrationPackage == nil {
126-
return errors.New("could not find package 'apm'")
127-
}
128-
if err := Fleet.InstallPackage(IntegrationPackage.Name, IntegrationPackage.Version); err != nil {
129-
return err
130-
}
131-
IntegrationPackage, err = Fleet.Package(IntegrationPackage.Name, IntegrationPackage.Version)
122+
IntegrationPackage, err = Fleet.Package("apm", integrationPackageVersion)
132123
return err
133124
}
134125

0 commit comments

Comments
 (0)