Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/elastic/ela…
Browse files Browse the repository at this point in the history
…stic-agent-libs-0.17.4
  • Loading branch information
kruskall authored Dec 9, 2024
2 parents d85ce53 + 4132855 commit 74d615d
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 22 deletions.
41 changes: 33 additions & 8 deletions .ci/scripts/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,28 @@ function buildkite::download_last_artifact {
BUILDKITE_DOWNLOAD_URL="${download_url}" buildkite::req_download_artifact
}

#######################################
# Retry n number of times the given command
function retry() {
local retries=$1
shift

local count=0
until "$@"; do
exit=$?
wait=$((2 ** count))
count=$((count + 1))
if [ $count -lt "$retries" ]; then
>&2 echo "Retry $count/$retries exited $exit, retrying in $wait seconds..."
sleep $wait
else
>&2 echo "Retry $count/$retries exited $exit, no more retries left."
return $exit
fi
done
return 0
}

## Buildkite specific configuration
if [ "${CI}" == "true" ] ; then
# If HOME is not set then use the Buildkite workspace
Expand All @@ -147,17 +169,20 @@ if [ "${CI}" == "true" ] ; then
[ -z "${REPO}" ] && echo "Environment variable 'REPO' must be defined" && exit 1;
export BUILDKITE_TOKEN="${BUILDKITE_TOKEN_SECRET}"

echo "--- Setting up the :golang: environment..."
GO_VERSION=$(cat .go-version)
OS_NAME=linux
OS_ARCH=amd64
retry 5 curl -sL -o "${BASE_PROJECT}"/gvm "https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-${OS_NAME}-${OS_ARCH}"
chmod +x "${BASE_PROJECT}"/gvm
retry 5 "${BASE_PROJECT}"/gvm install "$GO_VERSION"
eval "$("${BASE_PROJECT}"/gvm use "$GO_VERSION")"
echo "Golang version:"
go version
GOPATH=$(command go env GOPATH)
# Redirect go env to current dir
export GOROOT="${BASE_PROJECT}/.go"
export GOPATH="${BASE_PROJECT}/go"
export PATH="${GOPATH}/bin:${PATH}"

# Install g (go version manager)
curl -sSL https://git.io/g-install | bash -s -- -y

# Install specific version
g install $(cat .go-version)

# Make sure gomod can be deleted automatically as part of the CI
function teardown {
local arg=${?}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45.0.5
with:
files: .go-version

Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.3
1.23.4
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].

--------------------------------------------------------------------------------
Dependency : github.com/elastic/beats/v7
Version: v7.0.0-alpha2.0.20241205111515-83251eafbc91
Version: v7.0.0-alpha2.0.20241209145558-2dbb60663c8e
Licence type (autodetected): Elastic
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20241205111515-83251eafbc91/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20241209145558-2dbb60663c8e/LICENSE.txt:

Source code in this repository is variously licensed under the Apache License
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/elastic/apm-aggregation v1.1.0
github.com/elastic/apm-data v1.14.2
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241205111515-83251eafbc91
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241209145558-2dbb60663c8e
github.com/elastic/elastic-agent-client/v7 v7.17.0
github.com/elastic/elastic-agent-libs v0.17.4
github.com/elastic/elastic-agent-system-metrics v0.11.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ github.com/elastic/apm-aggregation v1.1.0 h1:eTHGd5w99JoRFJ763MJP6nUX4hkkeSil3KW
github.com/elastic/apm-aggregation v1.1.0/go.mod h1:YBQ77Jt7vOy2/7w4q5SsEifhc0V02dJxRcyyeC6HsvQ=
github.com/elastic/apm-data v1.14.2 h1:xRWGMcDyTAF6e8Tn7sAIrxS23rjTTD8xvU1j8Z6ik3Y=
github.com/elastic/apm-data v1.14.2/go.mod h1:22zDuMPEHyEbfDrTVkgdwjoYph7gIhVelGFhBVtezeA=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241205111515-83251eafbc91 h1:Gb2i7xZTO4wKz95FubQEMiiXZZ4B+Zr+dWWDBgaK1zI=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241205111515-83251eafbc91/go.mod h1:PXesnqjLgwNDhPV0MD8+rhePhDYlcQ5y+o5Lmnb1qI4=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241209145558-2dbb60663c8e h1:jgmZtR3XjYGQj8UE1j4jPdB5cdInlJ5exeXd5uIKdHU=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241209145558-2dbb60663c8e/go.mod h1:FyVoWNdi9A85gOud6qreNDz0P8dUKNZhklLeLIw1STg=
github.com/elastic/elastic-agent-autodiscover v0.9.0 h1:+iWIKh0u3e8I+CJa3FfWe9h0JojNasPgYIA47gpuuns=
github.com/elastic/elastic-agent-autodiscover v0.9.0/go.mod h1:5iUxLHhVdaGSWYTveSwfJEY4RqPXTG13LPiFoxcpFd4=
github.com/elastic/elastic-agent-client/v7 v7.17.0 h1:TPLrEHF4kJ3RkmQzZPffrniY4WeW4vriHZbOAzM1hFo=
Expand Down
5 changes: 1 addition & 4 deletions internal/beatcmd/beat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,7 @@ func TestRunManager_Reloader(t *testing.T) {
require.NoError(t, err)

assert.Eventually(t, func() bool {
// TODO(carsonip): There's a bug in EA manager causing an extra reload even if apm tracing config did not change
// see https://github.com/elastic/apm-server/issues/14580.
//return runCount.Load() == 2 && stopCount.Load() == 2
return runCount.Load() == 3 && stopCount.Load() == 3
return runCount.Load() == 2 && stopCount.Load() == 2
}, 2*time.Second, 50*time.Millisecond)
}

Expand Down
2 changes: 1 addition & 1 deletion testing/infra/k8s/base/stack/apm-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: apm-server
spec:
# TODO: replace with a pinned version such as 9.0.0-aaaaaaaa-SNAPSHOT
version: 9.0.0-9fb742a6-SNAPSHOT
version: 9.0.0-6e50ee0f-SNAPSHOT
count: 1
http:
tls:
Expand Down
2 changes: 1 addition & 1 deletion testing/infra/k8s/base/stack/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: elasticsearch
spec:
# TODO: replace with a pinned version such as 9.0.0-aaaaaaaa-SNAPSHOT
version: 9.0.0-9fb742a6-SNAPSHOT
version: 9.0.0-6e50ee0f-SNAPSHOT
auth:
fileRealm:
- secretName: elasticsearch-admin
Expand Down
2 changes: 1 addition & 1 deletion testing/infra/k8s/base/stack/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: kibana
spec:
# TODO: replace with a pinned version such as 9.0.0-aaaaaaaa-SNAPSHOT
version: 9.0.0-9fb742a6-SNAPSHOT
version: 9.0.0-6e50ee0f-SNAPSHOT
count: 1
elasticsearchRef:
name: elasticsearch
Expand Down

0 comments on commit 74d615d

Please sign in to comment.