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

feat: bump go to 1.23.6 #5309

Merged
merged 26 commits into from
Feb 19, 2025
Merged

feat: bump go to 1.23.6 #5309

merged 26 commits into from
Feb 19, 2025

Conversation

kruskall
Copy link
Member

What does this PR do?

Update dockerfile go versions
Update documentation go version
Update go.mod
Remove go version from golangci config so it
defaults to the one used in go.mod

Why is it important?

Bump to the latest go version: https://go.dev/doc/go1.23
Also adds some nice feature that allows us to drop two more dependency (x/exp and copy)

Checklist

  • 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

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?
  • ...

@kruskall kruskall added the enhancement New feature or request label Aug 16, 2024
@kruskall kruskall requested a review from a team as a code owner August 16, 2024 17:30
@kruskall kruskall changed the title feat: bump to go 1.23.0 feat: bump go to 1.23.0 Aug 16, 2024
Copy link
Contributor

mergify bot commented Aug 16, 2024

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

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Aug 17, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@blakerouse
Copy link
Contributor

This cannot be merged or get a green CI until 1.23 is released here https://github.com/elastic/golang-crossbuild

A PR would also need to be done for github.com/elastic/beats as we want to keep the go versions in sync between Elastic Agent and beats.

Copy link
Contributor

mergify bot commented Aug 19, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b bump/go1.23 upstream/bump/go1.23
git merge upstream/main
git push upstream bump/go1.23

@ycombinator
Copy link
Contributor

Thanks for this PR, @kruskall. Just wondering if there is any specific reason to create this manually, since we do have automation for Go version updates, e.g. #5305

@blakerouse
Copy link
Contributor

@ycombinator Automation only bumps minors of golang, not majors. Golang 1.22 required me to do a manual PR - #5036

@v1v
Copy link
Member

v1v commented Aug 29, 2024

/package

@v1v
Copy link
Member

v1v commented Aug 29, 2024

IIUC,

"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:package)\\W+(?:this|it))|^/package$",
explains that /package is a valid command

Copy link
Contributor

mergify bot commented Sep 3, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b bump/go1.23 upstream/bump/go1.23
git merge upstream/main
git push upstream bump/go1.23

@kruskall
Copy link
Member Author

kruskall commented Sep 4, 2024

@v1v seems to fail with gvm: error: unknown version 1.23 for ubuntu and macOS. Any idea what's happening ?

@v1v
Copy link
Member

v1v commented Sep 4, 2024

@v1v seems to fail with gvm: error: unknown version 1.23 for ubuntu and macOS. Any idea what's happening ?

Unfortunately, I don't know much about this project's existing build and CI system. AFAIS, those are not related to the packaging but the build/test itself. Maybe those CI runners have been configured with some tools and gvm does not support 1.23 yet.

https://github.com/andrewkroh/gvm is the tool If I recall correctly and I cannot reproduce the error locally using macOS m2:

image

if [[ -z "${SETUP_GVM_VERSION-""}" ]]; then
SETUP_GVM_VERSION="v0.5.0" # https://github.com/andrewkroh/gvm/issues/44#issuecomment-1013231151
fi
, so I guess the version needs to be bumped from v0.5.0 to v0.5.2.

Let me contribute to your PR and see if it works; otherwise, it's worth asking the @elastic/ingest-eng-prod or @elastic/elastic-agent-control-plane if they know what's happening.

@v1v
Copy link
Member

v1v commented Sep 4, 2024

After bumping the version in 8fa9c4b (#5309) no gvm: error: unknown version 1.23 are found:

installing golang 1.23.0 for linux/amd64
--
  | ~/builds/bk-agent-prod-gcp-1725434213542305391/elastic/elastic-agent ~/builds/bk-agent-prod-gcp-1725434213542305391/elastic/elastic-agent
  | go version go1.23.0 linux/amd64
  | ~/builds/bk-agent-prod-gcp-1725434213542305391/elastic/elastic-agent
  | ~/builds/bk-agent-prod-gcp-1725434213542305391/elastic/elastic-agent ~/builds/bk-agent-prod-gcp-1725434213542305391/elastic/elastic-agent
  | go version go1.23.0 linux/amd64

@v1v
Copy link
Member

v1v commented Sep 4, 2024

AFAIU, the packaging stage does not run for forked PRs even when using the /packaging command, so it is worth contacting the team so they can tell you how to test the packing on a PR before merging it.

@kruskall kruskall mentioned this pull request Sep 4, 2024
7 tasks
@kruskall kruskall changed the title feat: bump go to 1.23.0 feat: bump go to 1.23.1 Sep 7, 2024
@kruskall kruskall changed the title feat: bump go to 1.23.1 feat: bump go to 1.23.0 Sep 7, 2024
Copy link
Contributor

mergify bot commented Sep 10, 2024

backport-v8.x has been added to help with the transition to the new branch 8.x.

Copy link
Contributor

mergify bot commented Sep 11, 2024

backport-v8.x has been added to help with the transition to the new branch 8.x.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Sep 11, 2024
@cmacknz cmacknz added backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch labels Feb 14, 2025
Copy link

@@ -196,7 +196,7 @@ steps:
artifact_paths:
- "build/TEST-go-unit.cov"
agents:
image: "golang:1.22.6"
image: "golang:1.23.6"
Copy link
Member

Choose a reason for hiding this comment

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

I've just created #6893

@kruskall
Copy link
Member Author

@elastic/ingest-eng-prod friendly ping for review 🙂

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM

@blakerouse blakerouse merged commit 30ba24b into elastic:main Feb 19, 2025
16 checks passed
mergify bot pushed a commit that referenced this pull request Feb 19, 2025
* feat: bump to go 1.23.2

(cherry picked from commit 30ba24b)
mergify bot pushed a commit that referenced this pull request Feb 19, 2025
* feat: bump to go 1.23.2

(cherry picked from commit 30ba24b)
mergify bot pushed a commit that referenced this pull request Feb 19, 2025
* feat: bump to go 1.23.2

(cherry picked from commit 30ba24b)
@kruskall kruskall deleted the bump/go1.23 branch February 19, 2025 19:31
cmacknz pushed a commit that referenced this pull request Feb 19, 2025
* feat: bump to go 1.23.2

(cherry picked from commit 30ba24b)

Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com>
cmacknz pushed a commit that referenced this pull request Feb 19, 2025
* feat: bump to go 1.23.2

(cherry picked from commit 30ba24b)

Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com>
cmacknz pushed a commit that referenced this pull request Feb 19, 2025
* feat: bump to go 1.23.2

(cherry picked from commit 30ba24b)

Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com>
dliappis added a commit to dliappis/elastic-agent that referenced this pull request Feb 20, 2025
pazone added a commit that referenced this pull request Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.