Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate the go version update #26343

Merged
merged 5 commits into from Jun 23, 2021

Conversation

v1v
Copy link
Member

@v1v v1v commented Jun 16, 2021

What does this PR do?

Delegate the update for the go-version to be done automatically.
I used #26186 as a reference for the implementation

You can use this script locally:

.ci/bump-go-release-version.sh <new-go-version>

NOTE: it will add and commit the changes in the existing branch. The push and PR creation is not done within this script.

Why is it important?

No more manual actions.

Further details

This automation will not merge the PR automatically, neither it will create any backports nor changelog entries
We do want the teams to do so:

  • Review the changes and validate the CI status
  • Add entry in the CHANGELOG-developer.next.asciidoc
  • Create the relevant backports either with mergify or manually with some other tooling.

This particular automation will run on weekly basis. The pipeline is bump-go-release-version-pipeline

Tests

$ .ci/bump-go-release-version.sh 1.16.6
[feature/support-go-bump-for-other-projects 84975dcda3] [Automation] Update go release version to 1.16.6
 12 files changed, 12 insertions(+), 12 deletions(-)
commit 84975dcda31ba760ec201e284491b7b5223d702d (HEAD -> feature/support-go-bump-for-other-projects)
Author: Victor Martinez <VictorMartinezRubio@gmail.com>
Date:   Wed Jun 16 13:44:40 2021 +0100

    [Automation] Update go release version to 1.16.6
You can now push and create a Pull Request

produces

diff --git a/.go-version b/.go-version
index 0d92a10285..de646d2fc1 100644
--- a/.go-version
+++ b/.go-version
@@ -1 +1 @@
-1.16.5
+1.16.6
diff --git a/auditbeat/Dockerfile b/auditbeat/Dockerfile
index 657afaa62b..1cc82d4f94 100644
--- a/auditbeat/Dockerfile
+++ b/auditbeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt-get update \
diff --git a/filebeat/Dockerfile b/filebeat/Dockerfile
index ce08a77226..01d3d1455d 100644
--- a/filebeat/Dockerfile
+++ b/filebeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt-get update \
diff --git a/heartbeat/Dockerfile b/heartbeat/Dockerfile
index 4684c21e8e..12a8db2967 100644
--- a/heartbeat/Dockerfile
+++ b/heartbeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt-get update \
diff --git a/journalbeat/Dockerfile b/journalbeat/Dockerfile
index 8185be4c28..0cb48807b1 100644
--- a/journalbeat/Dockerfile
+++ b/journalbeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt-get update \
diff --git a/libbeat/Dockerfile b/libbeat/Dockerfile
index e1d532843b..637aca6036 100644
--- a/libbeat/Dockerfile
+++ b/libbeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt-get update \
diff --git a/libbeat/docs/version.asciidoc b/libbeat/docs/version.asciidoc
index 42e6e20127..78390e58d2 100644
--- a/libbeat/docs/version.asciidoc
+++ b/libbeat/docs/version.asciidoc
@@ -1,6 +1,6 @@
 :stack-version: 8.0.0
 :doc-branch: master
-:go-version: 1.16.5
+:go-version: 1.16.6
 :release-state: unreleased
 :python: 3.7
 :docker: 1.12
diff --git a/metricbeat/Dockerfile b/metricbeat/Dockerfile
index 063efa1cc9..4adb542e90 100644
--- a/metricbeat/Dockerfile
+++ b/metricbeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt update \
diff --git a/packetbeat/Dockerfile b/packetbeat/Dockerfile
index 528d4f25e5..101b27b286 100644
--- a/packetbeat/Dockerfile
+++ b/packetbeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt-get update \
diff --git a/x-pack/elastic-agent/Dockerfile b/x-pack/elastic-agent/Dockerfile
index 807cbd2ead..463351d15e 100644
--- a/x-pack/elastic-agent/Dockerfile
+++ b/x-pack/elastic-agent/Dockerfile
@@ -1,4 +1,4 @@
-ARG GO_VERSION=1.16.5
+ARG GO_VERSION=1.16.6
 FROM circleci/golang:${GO_VERSION}
 
 
diff --git a/x-pack/functionbeat/Dockerfile b/x-pack/functionbeat/Dockerfile
index fbdfc5736d..6f30f22e0c 100644
--- a/x-pack/functionbeat/Dockerfile
+++ b/x-pack/functionbeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt-get update \
diff --git a/x-pack/libbeat/Dockerfile b/x-pack/libbeat/Dockerfile
index bf894365b7..d9af989f3c 100644
--- a/x-pack/libbeat/Dockerfile
+++ b/x-pack/libbeat/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.16.5
+FROM golang:1.16.6
 
 RUN \
     apt-get update \

@v1v v1v requested review from ph, urso, michel-laterman and a team June 16, 2021 12:47
@v1v v1v requested a review from a team as a code owner June 16, 2021 12:47
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label Team:Automation Label for the Observability productivity team and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 16, 2021
@v1v v1v self-assigned this Jun 16, 2021
@urso
Copy link

urso commented Jun 16, 2021

Nice, that will be helpful.

About auto-updating:
For patch releases the release notes should still be inspected. Fixed bugs that do affect Beats might be added to our changelog. Security fixes need some special attention.
Minor releases are not frictionless. We sometimes need to add workarounds for breaking changes or run into other issues with go modules. This is unfortunately a very manual process.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 16, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #26343 updated

  • Start Time: 2021-06-23T08:41:53.756+0000

  • Duration: 13 min 28 sec

  • Commit: d3e2b57

Trends 🧪

Image of Build Times

❕ Flaky test report

No test was executed to be analysed.

@v1v v1v added backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify labels Jun 23, 2021
.mergify.yml Outdated
@@ -92,3 +92,11 @@ pull_request_rules:
- files~=^testing/environments/snapshot.*\.yml$
actions:
delete_head_branch:
- name: delete upstream branch after merging changes on .go-version
conditions:
- merged
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when I close the PR? Is the branch deleted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there is actually a conditions: -closed that I was not aware of :)

@v1v v1v merged commit 35c8608 into elastic:master Jun 23, 2021
mergify bot pushed a commit that referenced this pull request Jun 23, 2021
(cherry picked from commit 35c8608)

# Conflicts:
#	.mergify.yml
mergify bot pushed a commit that referenced this pull request Jun 23, 2021
(cherry picked from commit 35c8608)

# Conflicts:
#	.mergify.yml
@v1v v1v deleted the feature/support-go-bump-for-other-projects branch June 23, 2021 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants