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

Update to go v1.24.0 #4543

Merged
merged 11 commits into from
Mar 6, 2025
Merged

Update to go v1.24.0 #4543

merged 11 commits into from
Mar 6, 2025

Conversation

michel-laterman
Copy link
Contributor

@michel-laterman michel-laterman commented Mar 4, 2025

What is the problem this PR solves?

Update to go v1.24.0, change golang.org/x/crypto/pbkdf2 to crypto/pbkdf2

Design Checklist

  • I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.
  • I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.
  • I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.

Checklist

  • 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

@michel-laterman michel-laterman added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team 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 labels Mar 4, 2025
@michel-laterman michel-laterman requested a review from a team as a code owner March 4, 2025 17:28
@michel-laterman michel-laterman requested review from dliappis and v1v March 4, 2025 18:16
@v1v
Copy link
Member

v1v commented Mar 4, 2025

We just merged a fix for the 1.23.6 using the native support for aarch64 when running the golang-crossbuild. I wonder whether we can keep this open for a bit, and get some validations so artifacts are in a good shape with the change.

@simitt
Copy link
Contributor

simitt commented Mar 5, 2025

We just merged a fix for the 1.23.6 using the native support for aarch64 when running the golang-crossbuild. I wonder whether we can keep this open for a bit, and get some validations so artifacts are in a good shape with the change.

@v1v how long would you suggest to wait and observe? This is currently blocking FIPS related work and we should aim for not loosing too much time.

@v1v
Copy link
Member

v1v commented Mar 5, 2025

how long would you suggest to wait and observe?

I don't know; I'd expect if people didn't see any misbehaviour in the DRA artifacts , we are safe to merge, however I'm not familiar with the testing strategy in this project for the generated DRA artifacts.

As far as I see DRA artefacts for fleet-server@main have not been generated for already 3 weeks:

image

Why? I don't know, this is new to me

@dliappis helped me to understand that DRA artefacts are not generated because the main build is broken!

This build was the latest successful build.

However, c83472b is when things stopped working:

image

@v1v
Copy link
Member

v1v commented Mar 5, 2025

Update here!
I've just found that I wrongly assumed fleet-server uses the golang-crossbuild for the packaging, but it's not. It uses the native go build commands:

  • fleet-server/Makefile

    Lines 260 to 267 in 2c04d3d

    .PHONY: $(PLATFORM_TARGETS)
    $(PLATFORM_TARGETS): release-%:
    $(eval $@_OS := $(firstword $(subst /, ,$(lastword $(subst release-, ,$@)))))
    $(eval $@_GO_ARCH := $(lastword $(subst /, ,$(lastword $(subst release-, ,$@)))))
    $(eval $@_ARCH := $(TARGET_ARCH_$($@_GO_ARCH)))
    $(eval $@_BUILDMODE:= $(BUILDMODE_$($@_OS)_$($@_GO_ARCH)))
    GOOS=$($@_OS) GOARCH=$($@_GO_ARCH) ${GOFIPSEXPERIMENT} go build -tags=${GOBUILDTAGS} -gcflags="${GCFLAGS}" -ldflags="${LDFLAGS}" $($@_BUILDMODE) -o build/binaries/fleet-server-$(VERSION)-$($@_OS)-$($@_ARCH)$(FIPSSUFFIX)/fleet-server .
    @$(MAKE) OS=$($@_OS) ARCH=$($@_ARCH) package-target

There are some references for the golang-crossbuild in the dockerimage:

Therefore, this is unblocked from my side and sorry for being to cautious here!

@jlind23
Copy link
Contributor

jlind23 commented Mar 5, 2025

This PR is failing with

gvm: error: unknown version 1.24
--
  | .buildkite/scripts/common.sh: line 48: go: command not found

But according to the latest from andrewkroh/gvm@cb99f14 1.24.0 should be available 🤔

@jlind23
Copy link
Contributor

jlind23 commented Mar 5, 2025

buildkite test it

jlind23
jlind23 previously approved these changes Mar 5, 2025
@jlind23
Copy link
Contributor

jlind23 commented Mar 5, 2025

@michel-laterman shouldn't we go straight to 1.24.1 then?

@jlind23 jlind23 self-requested a review March 5, 2025 15:56
@jlind23
Copy link
Contributor

jlind23 commented Mar 5, 2025

Removing my approval as CI is legitimately broken.

@jlind23 jlind23 dismissed their stale review March 5, 2025 15:56

Dismiss as CI is failing

@michel-laterman michel-laterman changed the title Update to go v1.24.0 Update to go v1.24.1 Mar 5, 2025
@michel-laterman michel-laterman changed the title Update to go v1.24.1 Update to go v1.24.0 Mar 5, 2025
jlind23
jlind23 previously approved these changes Mar 5, 2025
kaanyalti
kaanyalti previously approved these changes Mar 5, 2025
@michel-laterman michel-laterman dismissed stale reviews from kaanyalti and jlind23 via 52dad0d March 5, 2025 17:29
Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
@michel-laterman michel-laterman merged commit c2b8d66 into elastic:main Mar 6, 2025
9 checks passed
mergify bot pushed a commit that referenced this pull request Mar 6, 2025
Update to go v1.24.0, change golang.org/x/crypto/pbkdf2 to crypto/pbkdf2

(cherry picked from commit c2b8d66)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	testing/go.mod
mergify bot pushed a commit that referenced this pull request Mar 6, 2025
Update to go v1.24.0, change golang.org/x/crypto/pbkdf2 to crypto/pbkdf2

(cherry picked from commit c2b8d66)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	internal/pkg/api/handleEnroll.go
#	testing/go.mod
mergify bot pushed a commit that referenced this pull request Mar 6, 2025
Update to go v1.24.0, change golang.org/x/crypto/pbkdf2 to crypto/pbkdf2

(cherry picked from commit c2b8d66)
@michel-laterman michel-laterman deleted the go-1.24 branch March 6, 2025 00:14
michel-laterman added a commit that referenced this pull request Mar 6, 2025
* Update to go v1.24.0 (#4543)

Update to go v1.24.0, change golang.org/x/crypto/pbkdf2 to crypto/pbkdf2

(cherry picked from commit c2b8d66)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	testing/go.mod

* Fix go.mod

---------

Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
Co-authored-by: michel-laterman <michel.laterman@elastic.co>
michel-laterman added a commit that referenced this pull request Mar 6, 2025
* Update to go v1.24.0 (#4543)

Update to go v1.24.0, change golang.org/x/crypto/pbkdf2 to crypto/pbkdf2

(cherry picked from commit c2b8d66)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	internal/pkg/api/handleEnroll.go
#	testing/go.mod

* Fix conflicts

* remove enroll with ID refs

---------

Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
Co-authored-by: michel-laterman <michel.laterman@elastic.co>
michel-laterman added a commit that referenced this pull request Mar 10, 2025
Update to go v1.24.0, change golang.org/x/crypto/pbkdf2 to crypto/pbkdf2

(cherry picked from commit c2b8d66)

Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
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.

5 participants