Skip to content

Commit 99aecce

Browse files
committed
Merge remote-tracking branch 'upstream/main' into beatsauth
2 parents 9c0a6b7 + 4d2f406 commit 99aecce

20 files changed

+1139
-885
lines changed

.package-version

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"version": "9.2.0-SNAPSHOT",
3-
"build_id": "9.2.0-a3e57754",
4-
"manifest_url": "https://snapshots.elastic.co/9.2.0-a3e57754/manifest-9.2.0-SNAPSHOT.json",
5-
"summary_url": "https://snapshots.elastic.co/9.2.0-a3e57754/summary-9.2.0-SNAPSHOT.html",
3+
"build_id": "9.2.0-24002800",
4+
"manifest_url": "https://snapshots.elastic.co/9.2.0-24002800/manifest-9.2.0-SNAPSHOT.json",
5+
"summary_url": "https://snapshots.elastic.co/9.2.0-24002800/summary-9.2.0-SNAPSHOT.html",
66
"core_version": "9.2.0",
7-
"stack_build_id": "9.2.0-a3e57754-SNAPSHOT"
7+
"stack_build_id": "9.2.0-24002800-SNAPSHOT"
88
}

NOTICE-fips.txt

Lines changed: 184 additions & 184 deletions
Large diffs are not rendered by default.

NOTICE.txt

Lines changed: 202 additions & 202 deletions
Large diffs are not rendered by default.
Lines changed: 32 additions & 0 deletions
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: bug-fix
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Include aggregated agent status in HTTP liveness checks
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: elastic-agent
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/9673
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/9576
Lines changed: 32 additions & 0 deletions
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: enhancement
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Update OTel components to v0.132.0
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: elastic-agent
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/owner/repo/1234
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/owner/repo/1234

dev-tools/mage/clean.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var DefaultCleanPaths = []string{
2525
"_meta/kibana/7/index-pattern/{{.BeatName}}.json",
2626
}
2727

28-
// Clean clean generated build artifacts.
28+
// Clean clean generated build artifacts and caches.
2929
func Clean(pathLists ...[]string) error {
3030
if len(pathLists) == 0 {
3131
pathLists = [][]string{DefaultCleanPaths}
@@ -38,5 +38,8 @@ func Clean(pathLists ...[]string) error {
3838
}
3939
}
4040
}
41+
if CrossBuildMountBuildCache {
42+
return sh.Run("docker", "volume", "rm", "-f", CrossBuildBuildCacheVolumeName)
43+
}
4144
return nil
4245
}

dev-tools/mage/crossbuild.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ func (b GolangCrossBuilder) Build() error {
274274
return fmt.Errorf("failed to determine repo root and package sub dir: %w", err)
275275
}
276276

277+
uid := os.Getuid()
278+
gid := os.Getgid()
279+
277280
mountPoint := filepath.ToSlash(filepath.Join("/go", "src", repoInfo.CanonicalRootImportPath))
278281
// use custom dir for build if given, subdir if not:
279282
cwd := repoInfo.SubDir
@@ -315,8 +318,8 @@ func (b GolangCrossBuilder) Build() error {
315318

316319
if runtime.GOOS != "windows" {
317320
args = append(args,
318-
"--env", "EXEC_UID="+strconv.Itoa(os.Getuid()),
319-
"--env", "EXEC_GID="+strconv.Itoa(os.Getgid()),
321+
"--env", fmt.Sprintf("EXEC_UID=%d", uid),
322+
"--env", fmt.Sprintf("EXEC_GID=%d", gid),
320323
)
321324
}
322325
if versionQualified {
@@ -328,6 +331,14 @@ func (b GolangCrossBuilder) Build() error {
328331
args = append(args, "-v", hostDir+":/go/pkg/mod:ro")
329332
}
330333

334+
buildCacheLocation := "/tmp/.cache/go-build"
335+
if CrossBuildMountBuildCache {
336+
// Mount the go build cache volume into the container.
337+
args = append(args,
338+
"-v", fmt.Sprintf("%s:%s", CrossBuildBuildCacheVolumeName, buildCacheLocation),
339+
)
340+
}
341+
331342
// Mount /opt/git-mirrors (if present) to resolve git alternates in CI
332343
if _, err := os.Stat("/opt/git-mirrors"); err == nil {
333344
args = append(args, "-v", "/opt/git-mirrors:/opt/git-mirrors:ro")
@@ -344,6 +355,7 @@ func (b GolangCrossBuilder) Build() error {
344355
args = append(args,
345356
"--rm",
346357
"--env", "GOFLAGS=-mod=readonly",
358+
"--env", fmt.Sprintf("GOCACHE=%s", buildCacheLocation), // ensure this is writable by the user
347359
"--env", "MAGEFILE_VERBOSE="+verbose,
348360
"--env", "MAGEFILE_TIMEOUT="+EnvOr("MAGEFILE_TIMEOUT", ""),
349361
"--env", fmt.Sprintf("SNAPSHOT=%v", Snapshot),

dev-tools/mage/settings.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ var (
7272

7373
// CrossBuildMountModcache mounts $GOPATH/pkg/mod into
7474
// the crossbuild images at /go/pkg/mod, read-only, when set to true.
75-
CrossBuildMountModcache = true
75+
CrossBuildMountModcache = EnvOr("CROSSBUILD_MOUNT_MODCACHE", "true") == "true"
76+
77+
// CrossBuildMountBuildCache mounts the Go build cache into golang-crossbuild containers
78+
CrossBuildMountBuildCache = EnvOr("CROSSBUILD_MOUNT_GOCACHE", "true") == "true"
79+
CrossBuildBuildCacheVolumeName = "elastic-agent-crossbuild-build-cache"
7680

7781
BeatName = EnvOr("BEAT_NAME", defaultName)
7882
BeatServiceName = EnvOr("BEAT_SERVICE_NAME", BeatName)

0 commit comments

Comments
 (0)