Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/elastic/go-…
Browse files Browse the repository at this point in the history
…elasticsearch/v8-8.11.0
  • Loading branch information
pierrehilbert authored Dec 18, 2023
2 parents b08f10f + 52a4275 commit d174e5c
Show file tree
Hide file tree
Showing 112 changed files with 3,031 additions and 976 deletions.
1 change: 0 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ steps:
manual:
allowed: true


- wait: ~
continue_on_failure: true
- label: "Processing test results"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MAGE_SUBTARGET="${3:-""}"
# Override the agent package version using a string with format <major>.<minor>.<patch>
# NOTE: use only after version bump when the new version is not yet available, for example:
# OVERRIDE_AGENT_PACKAGE_VERSION="8.10.3" otherwise OVERRIDE_AGENT_PACKAGE_VERSION="".
OVERRIDE_AGENT_PACKAGE_VERSION=""
OVERRIDE_AGENT_PACKAGE_VERSION="8.12.0"

if [[ -n "$OVERRIDE_AGENT_PACKAGE_VERSION" ]]; then
OVERRIDE_TEST_AGENT_VERSION=${OVERRIDE_AGENT_PACKAGE_VERSION}"-SNAPSHOT"
Expand Down
134 changes: 134 additions & 0 deletions .ci/bump-golang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
name: Bump golang-version to latest version

scms:
githubConfig:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
owner: elastic
repository: elastic-agent
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
branch: main

actions:
elastic-agent:
kind: github/pullrequest
scmid: githubConfig
sourceid: latestGoVersion
spec:
automerge: false
labels:
- dependencies
- backport-skip
title: '[Automation] Bump Golang version to {{ source "latestGoVersion" }}'
description: |
It requires the version to be bumped first in golang-crossbuild project, then a new release will be added to:
https://github.com/elastic/golang-crossbuild/releases/tag/v{{ source "latestGoVersion" }}.
Otherwise it will fail until the docker images are available.
sources:
minor:
name: Get minor version in .go-version
kind: shell
transformers:
- findsubmatch:
pattern: '^\d+.(\d+).\d+$'
captureindex: 1
spec:
command: cat .go-version

latestGoVersion:
name: Get Latest Go Release
kind: githubrelease
dependson:
- minor
transformers:
- trimprefix: go
spec:
owner: golang
repository: go
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
versionfilter:
kind: regex
pattern: go1\.{{ source "minor" }}\.(\d*)$

gomod:
dependson:
- latestGoVersion
name: Get version in go.mod format
kind: shell
transformers:
- findsubmatch:
pattern: '^(\d+.\d+).\d+'
captureindex: 1
spec:
command: echo {{ source "latestGoVersion" }}

conditions:
dockerTag:
name: Is docker image golang:{{ source "latestGoVersion" }} published
kind: dockerimage
spec:
image: golang
tag: '{{ source "latestGoVersion" }}'
sourceid: latestGoVersion

goDefaultVersion-check:
name: Check if defined golang version differs
kind: shell
sourceid: latestGoVersion
spec:
command: 'grep -v -q {{ source "latestGoVersion" }} .go-version #'

targets:
update-go-version:
name: "Update .go-version"
sourceid: latestGoVersion
scmid: githubConfig
kind: file
spec:
content: '{{ source "latestGoVersion" }}'
file: .go-version
matchpattern: '\d+.\d+.\d+'
update-golang.ci:
name: "Update .golangci.yml"
sourceid: latestGoVersion
scmid: githubConfig
kind: file
spec:
content: '{{ source "latestGoVersion" }}'
file: .golangci.yml
matchpattern: '\d+.\d+.\d+'
update-version.asciidoc:
name: "Update version.asciidoc"
sourceid: latestGoVersion
scmid: githubConfig
kind: file
spec:
content: ':go-version: {{ source "latestGoVersion" }}'
file: version/docs/version.asciidoc
matchpattern: ':go-version: \d+.\d+.\d+'
update-dockerfiles:
name: "Update from dockerfiles"
sourceid: latestGoVersion
scmid: githubConfig
kind: file
spec:
content: 'ARG GO_VERSION={{ source "latestGoVersion" }}'
files:
- Dockerfile
- Dockerfile.skaffold
matchpattern: 'ARG GO_VERSION=\d+.\d+.\d+'
update-gomod:
name: "Update go.mod"
sourceid: gomod
scmid: githubConfig
kind: file
spec:
content: 'go {{ source "gomod" }}'
file: go.mod
matchpattern: 'go \d+.\d+'
57 changes: 57 additions & 0 deletions .ci/scripts/install-go.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
set GOPATH=%WORKSPACE%
set MAGEFILE_CACHE=%WORKSPACE%\.magefile

set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\bin;%PATH%

curl --version >nul 2>&1 && (
echo found curl
) || (
choco install curl -y --no-progress --skipdownloadcache
)

mkdir %WORKSPACE%\bin

IF EXIST "%PROGRAMFILES(X86)%" (
REM Force the gvm installation.
SET GVM_BIN=gvm.exe
curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-amd64.exe
IF ERRORLEVEL 1 (
REM gvm installation has failed.
del bin\gvm.exe /s /f /q
exit /b 1
)
) ELSE (
REM Windows 7 workers got a broken gvm installation.
curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-386.exe
IF ERRORLEVEL 1 (
REM gvm installation has failed.
del bin\gvm.exe /s /f /q
exit /b 1
)
)

SET GVM_BIN=gvm.exe
WHERE /q %GVM_BIN%
%GVM_BIN% version

REM Install the given go version
%GVM_BIN% --debug install %GO_VERSION%

REM Configure the given go version
FOR /f "tokens=*" %%i IN ('"%GVM_BIN%" use %GO_VERSION% --format=batch') DO %%i

go env
IF ERRORLEVEL 1 (
REM go is not configured correctly.
rmdir %WORKSPACE%\.gvm /s /q
exit /b 1
)

where mage
mage -version
IF ERRORLEVEL 1 (
go get github.com/magefile/mage
IF ERRORLEVEL 1 (
exit /b 1
)
)
43 changes: 43 additions & 0 deletions .ci/scripts/install-go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
set -exuo pipefail

MSG="environment variable missing"
GO_VERSION=${GO_VERSION:?$MSG}
PROPERTIES_FILE=${PROPERTIES_FILE:-"go_env.properties"}
HOME=${HOME:?$MSG}
OS=$(uname -s| tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m| tr '[:upper:]' '[:lower:]')
GVM_CMD="${HOME}/bin/gvm"

if command -v go
then
set +e
echo "Found Go. Checking version.."
FOUND_GO_VERSION=$(go version|awk '{print $3}'|sed s/go//)
if [ "$FOUND_GO_VERSION" == "$GO_VERSION" ]
then
echo "Versions match. No need to install Go. Exiting."
exit 0
fi
set -e
fi

if [ "${ARCH}" == "aarch64" ] ; then
GVM_ARCH_SUFFIX=arm64
elif [ "${ARCH}" == "x86_64" ] ; then
GVM_ARCH_SUFFIX=amd64
elif [ "${ARCH}" == "i686" ] ; then
GVM_ARCH_SUFFIX=386
else
GVM_ARCH_SUFFIX=arm
fi

echo "UNMET DEP: Installing Go"
mkdir -p "${HOME}/bin"

curl -sSLo "${GVM_CMD}" "https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-${OS}-${GVM_ARCH_SUFFIX}"
chmod +x "${GVM_CMD}"

${GVM_CMD} "${GO_VERSION}" |cut -d ' ' -f 2|tr -d '\"' > ${PROPERTIES_FILE}

eval "$("${GVM_CMD}" "${GO_VERSION}")"
13 changes: 13 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,16 @@ pull_request_rules:
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 8.12 branch
conditions:
- merged
- label=backport-v8.12.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.12"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,7 @@ help: Makefile
## notice : Generates the NOTICE file.
.PHONY: notice
notice:
@echo "Generating NOTICE"
go mod tidy
go mod download
go list -m -json all | go run go.elastic.co/go-licence-detector \
-includeIndirect \
-rules dev-tools/notice/rules.json \
-overrides dev-tools/notice/overrides.json \
-noticeTemplate dev-tools/notice/NOTICE.txt.tmpl \
-noticeOut NOTICE.txt \
-depsOut ""
cat dev-tools/notice/NOTICE.txt.append >> NOTICE.txt
@mage notice

## check-ci: Run all the checks under the ci, this doesn't include the linter which is run via a github action.
.PHONY: check-ci
Expand Down
8 changes: 4 additions & 4 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1377,11 +1377,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-l

--------------------------------------------------------------------------------
Dependency : github.com/elastic/elastic-agent-system-metrics
Version: v0.8.1
Version: v0.9.1
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.8.1/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.9.1/LICENSE.txt:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -2222,11 +2222,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/go-licenser@v0.

--------------------------------------------------------------------------------
Dependency : github.com/elastic/go-sysinfo
Version: v1.11.1
Version: v1.11.2
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].1/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].2/LICENSE.txt:


Apache License
Expand Down
1 change: 1 addition & 0 deletions _meta/config/common.p2.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ outputs:
api_key: "example-key"
#username: "elastic"
#password: "changeme"
preset: balanced



Expand Down
5 changes: 5 additions & 0 deletions _meta/config/common.reference.p2.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ outputs:
# username: "elastic"
# password: "changeme"

# Performance preset for elasticsearch outputs. One of "balanced", "throughput",
# "scale", "latency" and "custom".
# The default if unspecified is "custom".
preset: balanced

inputs:
- type: system/metrics
# Each input must have a unique ID.
Expand Down
1 change: 1 addition & 0 deletions _meta/config/elastic-agent.docker.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ outputs:
hosts: '${ELASTICSEARCH_HOSTS:http://elasticsearch:9200}'
username: '${ELASTICSEARCH_USERNAME:elastic}'
password: '${ELASTICSEARCH_PASSWORD:changeme}'
preset: balanced

inputs:
- type: system/metrics
Expand Down
53 changes: 53 additions & 0 deletions changelog/8.11.2.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// begin 8.11.2 relnotes

[[release-notes-8.11.2]]
== 8.11.2

Review important information about the 8.11.2 release.

[discrete]
[[security-updates-8.11.2]]
=== Security updates


elastic-agent::

* Update Go Version To 1.20.11. {elastic-agent-pull}https://github.com/elastic/elastic-agent/pull/3748[#https://github.com/elastic/elastic-agent/pull/3748]










[discrete]
[[enhancements-8.11.2]]
=== Enhancements


elastic-agent::

* Add Configuration Parameters For The Kubernetes `Leader_election` Provider. {elastic-agent-pull}https://github.com/elastic/elastic-agent/pull/3625[#https://github.com/elastic/elastic-agent/pull/3625]




[discrete]
[[bug-fixes-8.11.2]]
=== Bug fixes


Upgrader::

* Fix Fleet-Managed Agent Ignoring The `Agent.download.proxy_url` Setting After A Policy Is Updated. {Upgrader-pull}https://github.com/elastic/elastic-agent/pull/3803[#https://github.com/elastic/elastic-agent/pull/3803] {Upgrader-issue}https://github.com/elastic/elastic-agent/issues/3560[#https://github.com/elastic/elastic-agent/issues/3560]
component::

* Custom-Yaml-Marshal-For-Component. {component-pull}https://github.com/elastic/elastic-agent/pull/3835[#https://github.com/elastic/elastic-agent/pull/3835] {component-issue}https://github.com/elastic/elastic-agent/issues/2940[#https://github.com/elastic/elastic-agent/issues/2940]
elastic-agent::

* Fix Logging Calls That Incorrectly Use Non-F Variants And Have Missing Arguments. {elastic-agent-pull}https://github.com/elastic/elastic-agent/pull/3679[#https://github.com/elastic/elastic-agent/pull/3679]

// end 8.11.2 relnotes
Loading

0 comments on commit d174e5c

Please sign in to comment.