Skip to content

Commit 3575c50

Browse files
authored
Merge branch 'main' into otel-adapter
2 parents 1d9793f + 3048b8f commit 3575c50

File tree

38 files changed

+802
-137
lines changed

38 files changed

+802
-137
lines changed

.github/workflows/benchmarks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
119119
- uses: hashicorp/setup-terraform@v3
120120
with:
121-
terraform_version: 1.3.7
121+
terraform_version: ~1.10.0
122122
terraform_wrapper: false
123123

124124
- name: Init terraform module

.github/workflows/smoke-tests-ess.yml

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
- uses: actions/checkout@v4
5858
with:
5959
ref: ${{ inputs.branch }}
60+
- uses: hashicorp/setup-terraform@v3
61+
with:
62+
terraform_version: ~1.10.0
63+
terraform_wrapper: false
6064
- name: Setup cluster env
6165
uses: ./.github/workflows/setup-cluster-env
6266

.github/workflows/smoke-tests-os.yml

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ jobs:
5050
- uses: actions/checkout@v4
5151
with:
5252
ref: ${{ inputs.branch }}
53+
- uses: hashicorp/setup-terraform@v3
54+
with:
55+
terraform_version: ~1.10.0
56+
terraform_wrapper: false
5357
- name: Get version
5458
run: echo "VERSION=$(make get-version)" >> "${GITHUB_ENV}"
5559
- name: Setup cluster env

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ repos:
44
hooks:
55
- id: check-executables-have-shebangs
66
- id: check-shebang-scripts-are-executable
7+
exclude: (.*/.*.(tmpl|tftpl)$)
78
- id: check-merge-conflict
89
args: ['--assume-in-merge']

cmd/apm-server/main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ func main() {
2828
rootCmd := beatcmd.NewRootCommand(beatcmd.BeatParams{
2929
NewRunner: func(args beatcmd.RunnerParams) (beatcmd.Runner, error) {
3030
return beater.NewRunner(beater.RunnerParams{
31-
Config: args.Config,
32-
Logger: args.Logger,
31+
Config: args.Config,
32+
Logger: args.Logger,
33+
3334
MeterProvider: args.MeterProvider,
3435
MetricsGatherer: args.MetricsGatherer,
3536
})

functionaltests/8_15_test.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"go.uber.org/zap"
2626
"go.uber.org/zap/zaptest"
2727

28+
"github.com/elastic/apm-server/functionaltests/internal/ecclient"
2829
"github.com/elastic/apm-server/functionaltests/internal/esclient"
2930
"github.com/elastic/apm-server/functionaltests/internal/gen"
3031
"github.com/elastic/apm-server/functionaltests/internal/terraform"
@@ -59,6 +60,8 @@ func TestUpgrade_8_15_4_to_8_16_0(t *testing.T) {
5960
}
6061
})
6162

63+
var deploymentID string
64+
require.NoError(t, tf.Output("deployment_id", &deploymentID))
6265
var escfg esclient.Config
6366
tf.Output("apm_url", &escfg.APMServerURL)
6467
tf.Output("es_url", &escfg.ElasticsearchURL)
@@ -68,6 +71,9 @@ func TestUpgrade_8_15_4_to_8_16_0(t *testing.T) {
6871

6972
t.Logf("created deployment %s", escfg.KibanaURL)
7073

74+
c, err := ecclient.New(endpointFrom(*target))
75+
require.NoError(t, err)
76+
7177
ecc, err := esclient.New(escfg)
7278
require.NoError(t, err)
7379

@@ -81,7 +87,8 @@ func TestUpgrade_8_15_4_to_8_16_0(t *testing.T) {
8187
previous, err := getDocsCountPerDS(t, ctx, ecc)
8288
require.NoError(t, err)
8389

84-
g.RunBlockingWait(ctx, ecc, expectedIngestForASingleRun(), previous, 1*time.Minute)
90+
require.NoError(t, g.RunBlockingWait(ctx, c, deploymentID))
91+
t.Logf("time elapsed: %s", time.Now().Sub(start))
8592

8693
beforeUpgradeCount, err := getDocsCountPerDS(t, ctx, ecc)
8794
require.NoError(t, err)
@@ -124,7 +131,8 @@ func TestUpgrade_8_15_4_to_8_16_0(t *testing.T) {
124131
IndicesManagedBy: []string{"Data stream lifecycle"},
125132
}, dss)
126133

127-
g.RunBlockingWait(ctx, ecc, expectedIngestForASingleRun(), previous, 1*time.Minute)
134+
require.NoError(t, g.RunBlockingWait(ctx, c, deploymentID))
135+
t.Logf("time elapsed: %s", time.Now().Sub(start))
128136

129137
t.Log("check number of documents")
130138
afterUpgradeIngestionCount, err := getDocsCountPerDS(t, ctx, ecc)

functionaltests/TestUpgrade_8_15_4_to_8_16_0/outputs.tf

+4
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ output "password" {
1717
output "kb_url" {
1818
value = module.ec_deployment.kibana_url
1919
}
20+
21+
output "deployment_id" {
22+
value = module.ec_deployment.deployment_id
23+
}

functionaltests/go.mod

+22
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.23.2
44

55
require (
66
github.com/elastic/apm-perf v0.0.0-20241230130730-2ad47482b731
7+
github.com/elastic/cloud-sdk-go v1.23.0
78
github.com/elastic/go-elasticsearch/v8 v8.16.0
89
github.com/hashicorp/terraform-exec v0.21.0
910
github.com/stretchr/testify v1.10.0
@@ -13,13 +14,32 @@ require (
1314
require (
1415
github.com/Microsoft/go-winio v0.6.2 // indirect
1516
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
17+
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
18+
github.com/blang/semver/v4 v4.0.0 // indirect
1619
github.com/davecgh/go-spew v1.1.1 // indirect
1720
github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect
1821
github.com/go-logr/logr v1.4.2 // indirect
1922
github.com/go-logr/stdr v1.2.2 // indirect
23+
github.com/go-openapi/analysis v0.21.2 // indirect
24+
github.com/go-openapi/errors v0.20.2 // indirect
25+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
26+
github.com/go-openapi/jsonreference v0.20.0 // indirect
27+
github.com/go-openapi/loads v0.21.1 // indirect
28+
github.com/go-openapi/runtime v0.23.0 // indirect
29+
github.com/go-openapi/spec v0.20.4 // indirect
30+
github.com/go-openapi/strfmt v0.21.2 // indirect
31+
github.com/go-openapi/swag v0.21.1 // indirect
32+
github.com/go-openapi/validate v0.20.3 // indirect
33+
github.com/hashicorp/errwrap v1.1.0 // indirect
34+
github.com/hashicorp/go-multierror v1.1.1 // indirect
2035
github.com/hashicorp/go-version v1.6.0 // indirect
2136
github.com/hashicorp/terraform-json v0.22.1 // indirect
37+
github.com/josharian/intern v1.0.0 // indirect
2238
github.com/klauspost/compress v1.17.11 // indirect
39+
github.com/mailru/easyjson v0.7.7 // indirect
40+
github.com/mitchellh/mapstructure v1.5.0 // indirect
41+
github.com/oklog/ulid v1.3.1 // indirect
42+
github.com/opentracing/opentracing-go v1.2.0 // indirect
2343
github.com/pkg/errors v0.9.1 // indirect
2444
github.com/pmezard/go-difflib v1.0.0 // indirect
2545
github.com/tidwall/gjson v1.18.0 // indirect
@@ -29,6 +49,7 @@ require (
2949
github.com/zclconf/go-cty v1.14.4 // indirect
3050
go.elastic.co/apm/v2 v2.6.2 // indirect
3151
go.elastic.co/fastjson v1.4.0 // indirect
52+
go.mongodb.org/mongo-driver v1.10.0 // indirect
3253
go.opentelemetry.io/otel v1.32.0 // indirect
3354
go.opentelemetry.io/otel/metric v1.32.0 // indirect
3455
go.opentelemetry.io/otel/trace v1.32.0 // indirect
@@ -38,5 +59,6 @@ require (
3859
golang.org/x/sys v0.28.0 // indirect
3960
golang.org/x/text v0.21.0 // indirect
4061
golang.org/x/time v0.8.0 // indirect
62+
gopkg.in/yaml.v2 v2.4.0 // indirect
4163
gopkg.in/yaml.v3 v3.0.1 // indirect
4264
)

0 commit comments

Comments
 (0)