Skip to content

Conversation

@v1v
Copy link
Member

@v1v v1v commented Mar 24, 2025

What does this PR do?

Add new files to be changed by the updatecli pipeline

Why is it important?

See #7454 (comment)

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

diff --git a/.ci/updatecli/values.d/scm.yml b/.ci/updatecli/values.d/scm.yml
index 2708262728..26308c9e94 100644
--- a/.ci/updatecli/values.d/scm.yml
+++ b/.ci/updatecli/values.d/scm.yml
@@ -1,8 +1,8 @@
 scm:
   enabled: true
-  owner: elastic
+  owner: v1v
   repository: elastic-agent
-  branch: main
+  branch: test/support-updatecli
   commitusingapi: true
   # begin updatecli-compose policy values
   user: 'github-actions[bot]'

Then I ran

$ GITHUB_TOKEN=$(gh auth token) \
  GITHUB_ACTOR=v1v \
  updatecli apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml
Expand to view

+++++++++++
+ PREPARE +
+++++++++++

Loading Pipeline ".ci/updatecli/updatecli-bump-golang.yml"

SCM repository retrieved: 1


++++++++++++++++++
+ AUTO DISCOVERY +
++++++++++++++++++



++++++++++++
+ PIPELINE +
++++++++++++



#########################################
# BUMP GOLANG-VERSION TO LATEST VERSION #
#########################################

source: source#minor
------------
The shell 🐚 command "/bin/sh /var/folders/t7/ghqdh8cx2g12pwb_w0ncmw900000gn/T/updatecli/bin/da26fe6ffb9baa1b6b3d076ae3238317c26a8ea8940ea813fa5637cdd7129c6f.sh" ran successfully with the following output:
----
1.24.0
----
✔ shell command executed successfully
[transformers]
✔ Result correctly transformed from "1.24.0" to "24"

source: source#latestGoVersion
----------------------
WARNING: ⚠ No GitHub Release found, we fallback to published git tags
Searching for version matching pattern "go1\\.24\\.(\\d*)$"
✔ GitHub release version "go1.24.1" found matching pattern "go1\\.24\\.(\\d*)$" of kind "regex"
[transformers]
✔ Result correctly transformed from "go1.24.1" to "1.24.1"


CHANGELOG:
----------
no GitHub Release found for go1.24.1 on "https://github.com/golang/go"

condition: condition#goDefaultVersion-check
--------------------------------
The shell 🐚 command "/bin/sh /var/folders/t7/ghqdh8cx2g12pwb_w0ncmw900000gn/T/updatecli/bin/c263360e547e9a33b1bc8a59eb7f41e27afc52a82d4498beca10a3983f0b2d1e.sh" ran successfully with the following output:
----
----
✔ shell condition of type "console/output", passing

condition: condition#dockerTag
-------------------
✔ docker image golang:1.24.1 found

target: target#update-gomod-full-version
--------------------------------
"go.mod" updated with content "go 1.24.1"

--- go.mod
+++ go.mod
@@ -1,6 +1,6 @@
module github.com/elastic/elastic-agent

-go 1.24.0
+go 1.24.1

require (
github.com/Jeffail/gabs/v2 v2.6.0


⚠ - 1 file(s) updated with "go 1.24.1":
	* go.mod

target: target#update-buildkite-pipeline
--------------------------------
".buildkite/pipeline.yml" updated with content "golang:1.24.1"

--- .buildkite/pipeline.yml
+++ .buildkite/pipeline.yml
@@ -202,7 +202,7 @@
artifact_paths:
- "build/TEST-go-unit.cov"
agents:

  •  image: "golang:1.24.0"
    
  •  image: "golang:1.24.1"
    
    depends_on:
    - unit-tests
    - extended-windows

⚠ - 1 file(s) updated with "golang:1.24.1":
	* .buildkite/pipeline.yml

target: target#update-go-version
------------------------
".go-version" updated with content "1.24.1"

--- .go-version
+++ .go-version
@@ -1 +1 @@
-1.24.0
+1.24.1


⚠ - 1 file(s) updated with "1.24.1":
	* .go-version

target: target#update-runner-test-go
----------------------------
"pkg/testing/runner/runner_test.go" updated with content "$1:$2\"1.24.1\""

--- pkg/testing/runner/runner_test.go
+++ pkg/testing/runner/runner_test.go
@@ -28,7 +28,7 @@
AgentVersion: "8.10.0",
StackVersion: "8.10.0-SNAPSHOT",
BuildDir: filepath.Join(tmpdir, "build"),

  •   GOVersion:    "1.24.0",
    
  •   GOVersion:    "1.24.1",
      RepoDir:      filepath.Join(tmpdir, "repo"),
      StateDir:     stateDir,
      ExtraEnv:     nil,
    

⚠ - 1 file(s) updated with "$1:$2\"1.24.1\"":
	* pkg/testing/runner/runner_test.go

target: target#update-dockerfiles
-------------------------
"Dockerfile" updated with content "ARG GO_VERSION=1.24.1"

--- Dockerfile
+++ Dockerfile
@@ -1,4 +1,4 @@
-ARG GO_VERSION=1.24.0
+ARG GO_VERSION=1.24.1
FROM circleci/golang:${GO_VERSION}


"Dockerfile.skaffold" updated with content "ARG GO_VERSION=1.24.1"

--- Dockerfile.skaffold
+++ Dockerfile.skaffold
@@ -1,4 +1,4 @@
-ARG GO_VERSION=1.24.0
+ARG GO_VERSION=1.24.1
ARG crossbuild_image="docker.elastic.co/beats-dev/golang-crossbuild"
ARG AGENT_VERSION=8.9.0-SNAPSHOT
ARG AGENT_IMAGE="docker.elastic.co/beats/elastic-agent"


⚠ - 2 file(s) updated with "ARG GO_VERSION=1.24.1":
	* Dockerfile
	* Dockerfile.skaffold

target: target#update-version.asciidoc
------------------------------
"version/docs/version.asciidoc" updated with content ":go-version: 1.24.1"

--- version/docs/version.asciidoc
+++ version/docs/version.asciidoc
@@ -3,7 +3,7 @@
// FIXME: once elastic.co docs have been switched over to use main, remove
// the doc-site-branch line below as well as any references to it in the code.
:doc-site-branch: master
-:go-version: 1.24.0
+:go-version: 1.24.1
:release-state: unreleased
:python: 3.7
:docker: 1.12


⚠ - 1 file(s) updated with ":go-version: 1.24.1":
	* version/docs/version.asciidoc


ACTIONS
========


Bump golang-version to latest version
  => Bump golang-version to latest version


Pull Request available at:

	https://github.com/v1v/elastic-agent/pull/4

Existing GitHub pull request found: https://github.com/v1v/elastic-agent/pull/4

=============================

SUMMARY:



⚠ Bump golang-version to latest version:
	Source:
		✔ [latestGoVersion] Get Latest Go Release
		✔ [minor] Get minor version in .go-version
	Condition:
		✔ [dockerTag] Is docker image golang:1.24.1 published
		✔ [goDefaultVersion-check] Check if defined golang version differs
	Target:
		⚠ [update-buildkite-pipeline] Update .buildkite/pipeline.yml
		⚠ [update-dockerfiles] Update from dockerfiles
		⚠ [update-go-version] Update .go-version
		⚠ [update-gomod-full-version] Update go.mod version
		⚠ [update-runner-test-go] Update pkg/testing/runner/runner_test.go
		⚠ [update-version.asciidoc] Update version.asciidoc


Run Summary
===========
Pipeline(s) run:
  * Changed:	1
  * Failed:	0
  * Skipped:	0
  * Succeeded:	0
  * Total:	1

One action to follow up:
  * https://github.com/v1v/elastic-agent/pull/4

and it created v1v#4

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@v1v v1v requested a review from a team as a code owner March 24, 2025 20:38
@mergify mergify bot assigned v1v Mar 24, 2025
@mergify
Copy link
Contributor

mergify bot commented Mar 24, 2025

This pull request does not have a backport label. Could you fix it @v1v? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@v1v v1v enabled auto-merge (squash) March 25, 2025 09:54
@v1v v1v merged commit af26be5 into elastic:main Mar 25, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants