Skip to content

Commit

Permalink
Merge branch 'bugfix/3912-borken-stat-store' of github.com:elastic/el…
Browse files Browse the repository at this point in the history
…astic-agent into bugfix/3912-borken-stat-store
  • Loading branch information
AndersonQ committed Jun 17, 2024
2 parents c84451a + 5221ad4 commit 4d76b70
Show file tree
Hide file tree
Showing 33 changed files with 10,516 additions and 3,902 deletions.
2 changes: 1 addition & 1 deletion .agent-versions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"testVersions": [
"8.14.1",
"8.14.1-SNAPSHOT",
"8.14.0",
"8.13.5-SNAPSHOT",
"8.13.4",
"7.17.22-SNAPSHOT",
Expand Down
48 changes: 48 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,51 @@ steps:
image: "family/core-ubuntu-2204"
env:
- GH_VERSION=2.4.0

# Trigger for pull requests
- label: "Trigger Integration tests for Pull request"
if: |
(build.pull_request.id != null && !build.env("GITHUB_PR_LABELS") =~ /skip-it/) ||
build.env("GITHUB_PR_TRIGGER_COMMENT") =~ /.*extended.*/
plugins:
- monorepo-diff#v1.0.1:
diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"
watch:
- path:
- internal/
- dev-tools/
- pkg/
- testing/
- version/
- specs/
- .agent-versions.json
- .go-version
- .package-version
- go.mod
- go.sum
- magefile.go
- main.go

- .buildkite/integration.pipeline.yml
- .buildkite/pipeline.yml
- .buildkite/scripts/
- .buildkite/hooks/

config:
trigger: "elastic-agent-extended-testing"
build:
commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
env:
- BUILDKITE_PULL_REQUEST=${BUILDKITE_PULL_REQUEST}
- BUILDKITE_PULL_REQUEST_BASE_BRANCH=${BUILDKITE_PULL_REQUEST_BASE_BRANCH}
- GITHUB_PR_LABELS=${GITHUB_PR_LABELS}

# Trigger for branches
- label: "Triggering Integration tests for branches"
if: build.pull_request.id == null
trigger: "elastic-agent-extended-testing"
build:
commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
21 changes: 2 additions & 19 deletions .buildkite/pull-requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,13 @@
"set_commit_status": true,
"build_on_commit": true,
"build_on_comment": true,
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))|^/test$",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))|^/test$",
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it|extended))|^/test\\W*(?:extended|)",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it|extended))|^/test\\W*(?:extended|)",
"skip_ci_labels": [ "skip-ci" ],
"skip_target_branches": [ ],
"skip_ci_on_only_changed": [ "^.ci/", "^changelog", "^docs/", "\\.md$", "^docker-compose.yml", "^.pre-commit-config.yaml", "skaffold.yaml", "^Dockerfile.skaffold", "^Dockerfile"],
"always_require_ci_on_changed": [ ]
},
{
"enabled": true,
"build_drafts": false,
"pipelineSlug": "elastic-agent-extended-testing",
"allow_org_users": true,
"allowed_repo_permissions": ["admin", "write"],
"allowed_list": ["dependabot[bot]", "mergify[bot]", "github-actions[bot]"],
"set_commit_status": true,
"build_on_commit": true,
"build_on_comment": true,
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:extended))|^/test extended$",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:extended))|^/test extended$",
"skip_ci_labels": [ "skip-ci", "skip-it" ],
"skip_target_branches": [ ],
"skip_ci_on_only_changed": [ "^.ci/", "^changelog", "^docs/", "\\.md$", "^sonar-project.properties", "^docker-compose.yml", "^.pre-commit-config.yaml", "skaffold.yaml", "^Dockerfile.skaffold", "^Dockerfile"],
"always_require_ci_on_changed": [ ]
},
{
"enabled": true,
"pipelineSlug": "elastic-agent-package",
Expand Down
13,250 changes: 9,552 additions & 3,698 deletions NOTICE.txt

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,10 @@ spec:
name: elastic-agent-extended-testing
description: Buildkite pipeline for the Elastic Agent extended testing
spec:
branch_configuration: "main 7.* 8.* v7.* v8.*"
repository: elastic/elastic-agent
pipeline_file: ".buildkite/integration.pipeline.yml"
provider_settings:
build_pull_request_forks: false
build_pull_requests: true
build_tags: true
filter_enabled: true
filter_condition: >-
build.pull_request.id == null || (build.creator.name == 'elasticmachine' && build.pull_request.id != null)
trigger_mode: none # don't trigger jobs from github activity
cancel_intermediate_builds: true
cancel_intermediate_builds_branch_filter: "!main !7.* !8.* !9.*"
skip_intermediate_builds: true
Expand Down
32 changes: 32 additions & 0 deletions changelog/fragments/1716320508-add-endpoint-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Kind can be one of:
# - breaking-change: a change to previously-documented behavior
# - deprecation: functionality that is being removed in a later release
# - bug-fix: fixes a problem in a previous version
# - enhancement: extends functionality but does not break or fix existing behavior
# - feature: new functionality
# - known-issue: problems that we are aware of in a given version
# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: feature

# Change summary; a 80ish characters long description of the change.
summary: Add monitoring of endpoint usage metrics

# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
#description:

# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
component:

# PR URL; optional; the PR number that added the changeset.
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
# Please provide it if you are adding a fragment for a different PR.
pr: https://github.com/elastic/elastic-agent/pull/4789

# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
# If not present is automatically filled by the tooling with the issue linked to the PR number.
issue: https://github.com/elastic/elastic-agent/issues/4083
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Kind can be one of:
# - breaking-change: a change to previously-documented behavior
# - deprecation: functionality that is being removed in a later release
# - bug-fix: fixes a problem in a previous version
# - enhancement: extends functionality but does not break or fix existing behavior
# - feature: new functionality
# - known-issue: problems that we are aware of in a given version
# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: feature

# Change summary; a 80ish characters long description of the change.
summary: Makes the `resourcedetection` processor available to users running Elastic Agent in `otel` mode.

# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
#description:

# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
component: elastic-agent

# PR URL; optional; the PR number that added the changeset.
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
# Please provide it if you are adding a fragment for a different PR.
#pr: https://github.com/owner/repo/1234

# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
# If not present is automatically filled by the tooling with the issue linked to the PR number.
#issue: https://github.com/owner/repo/1234
34 changes: 34 additions & 0 deletions changelog/fragments/1718200496-Add-unprivileged-mode-support.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Kind can be one of:
# - breaking-change: a change to previously-documented behavior
# - deprecation: functionality that is being removed in a later release
# - bug-fix: fixes a problem in a previous version
# - enhancement: extends functionality but does not break or fix existing behavior
# - feature: new functionality
# - known-issue: problems that we are aware of in a given version
# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: feature

# Change summary; a 80ish characters long description of the change.
summary: Add unprivileged mode support (beta)

# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
description: |
Add new --unprivileged installation option. This option installs the Elastic Agent as a non-root or non-Administrator
user that has limited permissions on the host.
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
component: elastic-agent

# PR URL; optional; the PR number that added the changeset.
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
# Please provide it if you are adding a fragment for a different PR.
#pr: https://github.com/owner/repo/1234

# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
# If not present is automatically filled by the tooling with the issue linked to the PR number.
#issue: https://github.com/owner/repo/1234
3 changes: 3 additions & 0 deletions changelog/fragments/1718268915-increase-remove-timeout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: bug-fix
summary: Increase removal timeout when uninstall
component: "elastic-agent"
1 change: 1 addition & 0 deletions dev-tools/notice/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
{"name": "kernel.org/pub/linux/libs/security/libcap/cap", "licenceType": "BSD-3-Clause", "note": "dual licensed as GPL-v2 and BSD"}
{"name": "kernel.org/pub/linux/libs/security/libcap/psx", "licenceType": "BSD-3-Clause", "note": "dual licensed as GPL-v2 and BSD"}
{"name": "github.com/awslabs/kinesis-aggregation/go", "licenceType": "Apache-2.0", "url": "https://github.com/awslabs/kinesis-aggregation/blob/master/LICENSE.txt"}
{"name": "github.com/pascaldekloe/goe", "licenceFile": "LICENSE", "licenceType": "CC0-1.0"}
1 change: 1 addition & 0 deletions dev-tools/notice/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"BSD-2-Clause",
"BSD-2-Clause-FreeBSD",
"BSD-3-Clause",
"CC0-1.0",
"Elastic",
"ISC",
"MIT",
Expand Down
49 changes: 32 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/elastic/go-sysinfo v1.14.0
github.com/elastic/go-ucfg v0.8.8
github.com/elastic/mock-es v0.0.0-20240605193845-b5546a703d6f
github.com/fatih/color v1.15.0
github.com/fatih/color v1.16.0
github.com/fsnotify/fsnotify v1.7.0
github.com/gofrs/flock v0.8.1
github.com/gofrs/uuid v4.4.0+incompatible
Expand All @@ -42,7 +42,15 @@ require (
github.com/mitchellh/hashstructure v1.1.0
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c
github.com/oklog/ulid v1.3.1
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.102.0
github.com/otiai10/copy v1.14.0
github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0
github.com/pkg/errors v0.9.1
Expand All @@ -60,6 +68,11 @@ require (
go.elastic.co/apm/module/apmgorilla v1.15.0
go.elastic.co/ecszap v1.0.1
go.elastic.co/go-licence-detector v0.5.0
go.opentelemetry.io/collector/exporter/debugexporter v0.102.1
go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1
go.opentelemetry.io/collector/extension/memorylimiterextension v0.102.1
go.opentelemetry.io/collector/processor/batchprocessor v0.102.1
go.opentelemetry.io/collector/receiver/otlpreceiver v0.102.1
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.23.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
Expand Down Expand Up @@ -87,14 +100,6 @@ require (
require (
github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e // indirect
github.com/distribution/reference v0.5.0 // indirect
// open telemetry dependencies
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.102.0
go.opentelemetry.io/collector/component v0.102.1
go.opentelemetry.io/collector/confmap v0.102.1
go.opentelemetry.io/collector/confmap/converter/expandconverter v0.102.1
Expand All @@ -104,24 +109,24 @@ require (
go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.102.1
go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.102.1
go.opentelemetry.io/collector/exporter v0.102.1
go.opentelemetry.io/collector/exporter/debugexporter v0.102.1
go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1
go.opentelemetry.io/collector/extension v0.102.1
go.opentelemetry.io/collector/extension/memorylimiterextension v0.102.1
go.opentelemetry.io/collector/featuregate v1.9.0
go.opentelemetry.io/collector/otelcol v0.102.1
go.opentelemetry.io/collector/processor v0.102.1
go.opentelemetry.io/collector/processor/batchprocessor v0.102.1
go.opentelemetry.io/collector/receiver v0.102.1
go.opentelemetry.io/collector/receiver/otlpreceiver v0.102.1
)

require (
cloud.google.com/go/compute/metadata v0.3.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.23.0 // indirect
github.com/Jeffail/gabs/v2 v2.6.0 // indirect
github.com/Showmax/go-fqdn v1.0.0 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/akavel/rsrc v0.8.0 // indirect
github.com/alecthomas/participle/v2 v2.1.1 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/aws/aws-sdk-go v1.53.11 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
Expand All @@ -130,11 +135,11 @@ require (
github.com/dnephin/pflag v1.0.7 // indirect
github.com/docker/docker v25.0.5+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/elastic/go-docappender/v2 v2.1.4 // indirect
github.com/elastic/go-docappender/v2 v2.1.2 // indirect
github.com/elastic/go-elasticsearch/v7 v7.17.10 // indirect
github.com/elastic/go-structform v0.0.10 // indirect
github.com/elastic/go-windows v1.0.1 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/elastic/gosigar v0.14.3 // indirect
github.com/elastic/pkcs8 v1.0.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
Expand All @@ -159,13 +164,21 @@ require (
github.com/google/licenseclassifier v0.0.0-20221004142553-c1ed8fcf4bab // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/hashicorp/consul/api v1.28.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/serf v0.10.1 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jaypipes/pcidb v1.0.0 // indirect
github.com/jcchavezs/porto v0.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/karrick/godirwalk v1.16.1 // indirect
github.com/klauspost/compress v1.17.8 // indirect
Expand All @@ -179,7 +192,7 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/markbates/pkger v0.17.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mileusna/useragent v1.3.4 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
Expand All @@ -193,10 +206,12 @@ require (
github.com/mostynb/go-grpc-compression v1.2.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.102.0 // indirect
Expand Down
Loading

0 comments on commit 4d76b70

Please sign in to comment.