Skip to content

Commit

Permalink
Upgrade v1.16.x to Go 1.23 (#10645)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrolds authored Mar 4, 2025
1 parent 77f16ce commit 6f0cc74
Show file tree
Hide file tree
Showing 7 changed files with 324 additions and 230 deletions.
8 changes: 8 additions & 0 deletions changelog/v1.16.24/go-123.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
changelog:
- type: DEPENDENCY_BUMP
description: Bumped the go version to 1.23.3
dependencyOwner: golang
dependencyRepo: go
dependencyTag: v1.23.3
issueLink: https://github.com/solo-io/solo-projects/issues/7609
resolvesIssue: false
8 changes: 4 additions & 4 deletions ci/cloudbuild/publish-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:

- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.8.8'
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.10.2'
id: 'prepare-workspace'
args:
- '--repo-name'
Expand Down Expand Up @@ -44,7 +44,7 @@ steps:
- 'us-central1-a'

# Run make targets to push docker images to quay.io
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
id: 'publish-docker'
args:
- 'publish-docker'
Expand All @@ -65,7 +65,7 @@ steps:
waitFor:
- 'publish-docker'

- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
id: 'release-chart'
dir: *dir
args:
Expand All @@ -80,7 +80,7 @@ steps:
- 'gcr-auth'

# Run make targets to retag and push docker images to GCR
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
id: 'docker-push-extended-gcr'
dir: *dir
args:
Expand Down
12 changes: 6 additions & 6 deletions ci/cloudbuild/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:

- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.8.8'
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.10.2'
id: 'prepare-workspace'
args:
- '--repo-name'
Expand All @@ -23,7 +23,7 @@ steps:
cd /go/pkg
gsutil cat gs://$PROJECT_ID-cache/gloo/gloo-mod.tar.gz | tar -xzf - || echo "untar mod cache failed; continuing because we can download deps as we need them"
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
id: 'prepare-envoy'
dir: *dir
entrypoint: 'bash'
Expand Down Expand Up @@ -74,7 +74,7 @@ steps:
waitFor:
- 'prepare-gcr-zone'

- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
id: 'prepare-test-tools'
dir: *dir
args:
Expand All @@ -85,7 +85,7 @@ steps:
- 'prepare-gcr-zone'
- 'prepare-test-credentials'

- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2'
id: 'run-tests'
dir: *dir
entrypoint: 'make'
Expand All @@ -96,7 +96,7 @@ steps:
secretEnv:
- 'JWT_PRIVATE_KEY'

- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2'
id: 'run-e2e-tests'
dir: *dir
entrypoint: 'make'
Expand All @@ -107,7 +107,7 @@ steps:
secretEnv:
- 'JWT_PRIVATE_KEY'

- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2'
id: 'run-hashicorp-e2e-tests'
dir: *dir
entrypoint: 'make'
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild-cache.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
options:
env:
- "_GO_VERSION=1.21.5"
- "_GO_VERSION=1.23.3"

steps:
- name: gcr.io/cloud-builders/gsutil
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/solo-io/gloo

go 1.21.11
go 1.23.3

// Note for developers: upgrading go will also require upgrading go in the following files:
// ./cloudbuild-cache.yaml,
Expand Down
111 changes: 111 additions & 0 deletions test/kube2e/gloo/eds_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
package gloo_test

import (
"os/exec"

"github.com/google/uuid"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
gatewayv1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1"
gloov1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1"
"github.com/solo-io/gloo/projects/gloo/pkg/api/v1/gloosnapshot"
"github.com/solo-io/gloo/test/helpers"
"github.com/solo-io/gloo/test/kube2e"
"github.com/solo-io/solo-kit/pkg/api/v1/resources/core"

"github.com/solo-io/solo-kit/pkg/api/v1/clients"
)

const (
testServerName = "testserver"
testServerPort = 1234
)

var _ = Describe("EDS", func() {
var (
testServerDestination *gloov1.Destination
testServerVs *gatewayv1.VirtualService

glooResources *gloosnapshot.ApiSnapshot
)

BeforeEach(func() {
// Create a VirtualService routing directly to the testServer kubernetes service
testServerDestination = &gloov1.Destination{
DestinationType: &gloov1.Destination_Kube{
Kube: &gloov1.KubernetesServiceDestination{
Ref: &core.ResourceRef{
Namespace: testHelper.InstallNamespace,
Name: testServerName,
},
Port: uint32(testServerPort),
},
},
}
testServerVs = helpers.NewVirtualServiceBuilder().
WithName(testServerName).
WithNamespace(testHelper.InstallNamespace).
WithLabel(kube2e.UniqueTestResourceLabel, uuid.New().String()).
WithDomain(testServerName).
WithRoutePrefixMatcher(testServerName, "/").
WithRouteActionToSingleDestination(testServerName, testServerDestination).
Build()

// The set of resources that these tests will generate
glooResources = &gloosnapshot.ApiSnapshot{
VirtualServices: gatewayv1.VirtualServiceList{
// many tests route to the TestServer Service so it makes sense to just
// always create it
// the other benefit is this ensures that all tests start with a valid Proxy CR
testServerVs,
},
}
})

JustBeforeEach(func() {
err := snapshotWriter.WriteSnapshot(glooResources, clients.WriteOpts{
Ctx: ctx,
OverwriteExisting: false,
})
Expect(err).NotTo(HaveOccurred())
})

JustAfterEach(func() {
err := snapshotWriter.DeleteSnapshot(glooResources, clients.DeleteOpts{
Ctx: ctx,
IgnoreNotExist: true,
})
Expect(err).NotTo(HaveOccurred())
})

Context("Rest EDS", Ordered, func() {
BeforeAll(func() {
// enable REST EDS
kube2e.UpdateRestEdsSetting(ctx, true, testHelper.InstallNamespace)
})

AfterAll(func() {
// reset REST EDS to default
kube2e.UpdateRestEdsSetting(ctx, false, testHelper.InstallNamespace)
})

// This test is inspired by the issue here: https://github.com/solo-io/gloo/issues/8968
// There were some versions of Gloo Edge 1.15.x which depended on versions of envoy-gloo
// which did not have REST config subscription enabled, and so gateway-proxy logs would
// contain warnings about not finding a registered config subscription factory implementation
// for REST EDS. This test validates that we have not regressed to that state.
It("should not warn when REST EDS is configured", func() {
Consistently(func(g Gomega) {
// Get envoy logs from gateway-proxy deployment
logsCmd := exec.Command("kubectl", "logs", "-n", testHelper.InstallNamespace,
"deployment/gateway-proxy")
logsOut, err := logsCmd.Output()
g.Expect(err).NotTo(HaveOccurred())

// ensure that the logs do not contain any presence of the text:
// Didn't find a registered config subscription factory implementation for name: 'envoy.config_subscription.rest'
g.Expect(string(logsOut)).NotTo(ContainSubstring("Didn't find a registered config subscription factory implementation for name: 'envoy.config_subscription.rest'"))
}, "10s", "1s").Should(Succeed())
})
})
})
Loading

0 comments on commit 6f0cc74

Please sign in to comment.