mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-12 02:15:01 +00:00
* chore: Bump Go to 1.25.1 Update all Go modules to use Go 1.25.1. * Use stable synctest API introduced in Go 1.25 All existing tests that used synctest have had their build constraints removed and have been updated to use synctest.Test instead of synctest.Run. There are still tests in teleport.e that needs to be updated before we can remove GOEXPERIMENT=synctest and retire the synctest build tag. * Remove coverage from go test invocations This is a temporary workaround to https://github.com/golang/go/issues/75031. When the buildboxes have Go 1.25 installed globally this should no longer be an issue and coverage can be restored. * Lazily unmount cgroups Adds the MNT_DETACH flag to the cgroups unmount call to workaround issues stemming from a behavior chagne in Go 1.25 to support automatically setting GOMAXPROCS. In doing so the Go runtime interacts with cgroups to determine what limits should be applied which interferes with our ability to clean up. Fixes https://github.com/gravitational/teleport/issues/58879. * Fix syntest bug with waitgroups ``` === Failed === FAIL: lib/srv/discovery TestDiscoveryServerEKS (unknown) fatal error: sync: WaitGroup.Add called from multiple synctest bubbles ``` The failure stems from a bug in Go 1.25 and is a result of loading aws configs which internally use a sync.WaitGroup. This can be worked around in the short term by mocking out the aws.Config since the test is configured to use a mock eks client anyway. Other tests may still run into this issue until Go 1.25.2 - though our relatively small number of synctest usage at this point may limit our exposure to said bug.
Dockerized Teleport Build
This directory is used to produce a containerized production Teleport build. No need to have Golang. Only Docker is required.
It is a part of Gravitational CI/CD pipeline. To build Teleport type:
make
Safely updating build box Dockerfiles
The build box images are used in GitHub Actions. The resulting image is pushed to ghcr.io. This means that to safely introduce changes to Dockerfiles, those changes should be split into two stages:
- First you open a PR which updates a Dockerfile and get the PR merged.
- Once it's merged, GitHub Actions is going to pick it up, build a new build box image and push it to ghcr.io
- Then you can open another PR which starts using the new build box image.
DynamoDB static binary docker build
The static binary will be built along with all nodejs assets inside the container. From the root directory of the source checkout run:
docker build -f build.assets/Dockerfile.dynamodb -t teleportbuilder .
Then you can upload the result to an S3 bucket for release.
docker run -it -e AWS_ACL=public-read -e S3_BUCKET=my-teleport-releases -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY teleportbuilder
Or simply copy the binary out of the image using a volume (it will be copied to current directory/build/teleport).
docker run -v $(pwd)/build:/builds -it teleportbuilder cp /gopath/src/github.com/gravitational/teleport/teleport.tgz /builds