Skip to content

Commit 65f0717

Browse files
authored
Merge branch 'main' into otel-hybrid
2 parents 2b9d859 + 825a15d commit 65f0717

File tree

8 files changed

+194
-73
lines changed

8 files changed

+194
-73
lines changed

.buildkite/bk.integration.pipeline.yml

+23-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ steps:
5656
- group: "Stateful(Sudo): Ubuntu"
5757
key: integration-tests-ubuntu
5858
depends_on:
59-
- package-it
6059
- integration-ess
6160
steps:
6261
- label: "x86_64:Group: {{matrix}}"
@@ -71,6 +70,8 @@ steps:
7170
image: "family/platform-ingest-elastic-agent-ubuntu-2404"
7271
matrix:
7372
- default
73+
- container
74+
- fleet-upgrade-to-pr-build
7475
- upgrade
7576
- fleet
7677
- fqdn
@@ -88,9 +89,11 @@ steps:
8889
agents:
8990
provider: "aws"
9091
imagePrefix: "platform-ingest-beats-ubuntu-2404-aarch64"
91-
instanceType: "m6g.xlarge"
92+
instanceType: "m6g.2xlarge"
9293
matrix:
9394
- default
95+
- container
96+
- fleet-upgrade-to-pr-build
9497
- upgrade
9598
- fleet
9699
- fqdn
@@ -99,10 +102,28 @@ steps:
99102
- fleet-privileged
100103
- fleet-airgapped-privileged
101104

105+
- group: "Stateful(Sudo): RHEL8"
106+
key: integration-tests-rhel8
107+
depends_on:
108+
- package-it
109+
- integration-ess
110+
steps:
111+
- label: "x86_64:Group: rpm"
112+
command: |
113+
buildkite-agent artifact download build/distributions/** . --step 'package-it'
114+
.buildkite/scripts/steps/integration_tests_tf_sudo.sh rpm
115+
artifact_paths:
116+
- build/**
117+
agents:
118+
provider: "gcp"
119+
machineType: "n1-standard-8"
120+
image: "family/platform-ingest-elastic-agent-rhel-8"
121+
102122
- label: ESS stack cleanup
103123
depends_on:
104124
- integration-tests-ubuntu
105125
- integration-tests-win
126+
- integration-tests-rhel8
106127
allow_dependency_failure: true
107128
command: |
108129
buildkite-agent artifact download "test_infra/ess/**" . --step "integration-ess"

.buildkite/pipeline.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ steps:
1313
retry:
1414
manual:
1515
allowed: true
16+
1617
- group: "Unit tests"
1718
key: "unit-tests"
1819
steps:
@@ -88,26 +89,27 @@ steps:
8889
manual:
8990
allowed: true
9091

91-
# Runs inly on the main branch
92-
- label: "Unit tests - MacOS 13 ARM"
93-
key: "unit-tests-macos-13-arm"
92+
- group: "macOS tests"
93+
key: "macos-unit-tests"
94+
steps:
95+
- label: "Unit tests - macOS 15 ARM"
9496
command: ".buildkite/scripts/steps/unit-tests.sh"
95-
branches: main
9697
artifact_paths:
9798
- "build/TEST-*.html"
9899
- "build/TEST-*.xml"
99100
- "build/diagnostics/*"
100101
- "coverage-*.out"
101102
agents:
102103
provider: orka
103-
imagePrefix: generic-13-ventura-arm
104+
imagePrefix: generic-base-15-arm-002
104105
retry:
105106
manual:
106107
allowed: true
107108

108-
- label: "Unit tests - MacOS 13"
109-
key: "unit-tests-macos-13"
109+
# Runs only on main and release branches
110+
- label: "Unit tests - macOS 13"
110111
command: ".buildkite/scripts/steps/unit-tests.sh"
112+
branches: "main 8.* 9.*"
111113
artifact_paths:
112114
- "build/TEST-*.html"
113115
- "build/TEST-*.xml"
@@ -178,9 +180,7 @@ steps:
178180
allow_failure: true
179181
- step: "unit-tests-win2016"
180182
allow_failure: true
181-
- step: "unit-tests-macos-13-arm"
182-
allow_failure: true
183-
- step: "unit-tests-macos-13"
183+
- step: "macos-unit-tests"
184184
allow_failure: true
185185
- step: "unit-tests-win10"
186186
allow_failure: true

.buildkite/scripts/sudo-integration-tests.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/usr/bin/env bash
22

3+
# Fixes source asdf.sh, otherwise it relies on unexisting /root/.asdf directory
4+
export HOME=/opt/buildkite-agent
5+
36
# The script is used to run integration tests with sudo
4-
source /opt/buildkite-agent/hooks/pre-command
7+
source /opt/buildkite-agent/hooks/pre-command
58
source .buildkite/hooks/pre-command || echo "No pre-command hook found"
69

710
# Make sure that all tools are installed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Skip notify Fleet on Windows uninstall
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component:
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
pr: https://github.com/elastic/elastic-agent/pull/6065
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
issue: https://github.com/elastic/elastic-agent/issues/5952

internal/pkg/agent/install/uninstall.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ func Uninstall(ctx context.Context, cfgFile, topPath, uninstallToken string, log
144144
}
145145
pt.Describe("Removed install directory")
146146

147-
if notifyFleet {
147+
// Skip on Windows because of https://github.com/elastic/elastic-agent/issues/5952
148+
// Once the root-cause is identified then this can be re-enabled on Windows.
149+
if notifyFleet && runtime.GOOS != "windows" {
148150
notifyFleetAuditUninstall(ctx, log, pt, cfg, ai) //nolint:errcheck // ignore the error as we can't act on it
149151
}
150152

testing/integration/install_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,15 @@ func TestInstallUninstallAudit(t *testing.T) {
293293
Stack: &define.Stack{}, // needs a fleet-server.
294294
Sudo: true,
295295
Local: false,
296+
// Skip Windows as it has been disabled because of https://github.com/elastic/elastic-agent/issues/5952
297+
OS: []define.OS{
298+
{
299+
Type: define.Linux,
300+
},
301+
{
302+
Type: define.Darwin,
303+
},
304+
},
296305
})
297306

298307
ctx, cancel := testcontext.WithDeadline(t, context.Background(), time.Now().Add(10*time.Minute))

testing/integration/logs_ingestion_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ func testMonitoringLogsAreShipped(
208208
"add_cloud_metadata: received error for provider digitalocean: failed with http status code 404",
209209
"add_cloud_metadata: received error for provider azure: failed with http status code 404",
210210
"add_cloud_metadata: received error for provider openstack: failed with http status code 404",
211+
"add_cloud_metadata: received error for provider gcp: failed with http status code 404",
211212
"elastic-agent-client error: rpc error: code = Canceled desc = context canceled", // can happen on restart
212213
"failed to invoke rollback watcher: failed to start Upgrade Watcher", // on debian this happens probably need to fix.
213214
"falling back to IMDSv1: operation error ec2imds: getToken", // okay for the cloud metadata to not work

0 commit comments

Comments
 (0)