Skip to content

Commit 6f0cc74

Browse files
authored
Upgrade v1.16.x to Go 1.23 (#10645)
1 parent 77f16ce commit 6f0cc74

File tree

7 files changed

+324
-230
lines changed

7 files changed

+324
-230
lines changed

changelog/v1.16.24/go-123.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
changelog:
2+
- type: DEPENDENCY_BUMP
3+
description: Bumped the go version to 1.23.3
4+
dependencyOwner: golang
5+
dependencyRepo: go
6+
dependencyTag: v1.23.3
7+
issueLink: https://github.com/solo-io/solo-projects/issues/7609
8+
resolvesIssue: false

ci/cloudbuild/publish-artifacts.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
steps:
22

3-
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.8.8'
3+
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.10.2'
44
id: 'prepare-workspace'
55
args:
66
- '--repo-name'
@@ -44,7 +44,7 @@ steps:
4444
- 'us-central1-a'
4545

4646
# Run make targets to push docker images to quay.io
47-
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
47+
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
4848
id: 'publish-docker'
4949
args:
5050
- 'publish-docker'
@@ -65,7 +65,7 @@ steps:
6565
waitFor:
6666
- 'publish-docker'
6767

68-
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
68+
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
6969
id: 'release-chart'
7070
dir: *dir
7171
args:
@@ -80,7 +80,7 @@ steps:
8080
- 'gcr-auth'
8181

8282
# Run make targets to retag and push docker images to GCR
83-
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
83+
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
8484
id: 'docker-push-extended-gcr'
8585
dir: *dir
8686
args:

ci/cloudbuild/run-tests.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
steps:
22

3-
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.8.8'
3+
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.10.2'
44
id: 'prepare-workspace'
55
args:
66
- '--repo-name'
@@ -23,7 +23,7 @@ steps:
2323
cd /go/pkg
2424
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"
2525
26-
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
26+
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
2727
id: 'prepare-envoy'
2828
dir: *dir
2929
entrypoint: 'bash'
@@ -74,7 +74,7 @@ steps:
7474
waitFor:
7575
- 'prepare-gcr-zone'
7676

77-
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8'
77+
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2'
7878
id: 'prepare-test-tools'
7979
dir: *dir
8080
args:
@@ -85,7 +85,7 @@ steps:
8585
- 'prepare-gcr-zone'
8686
- 'prepare-test-credentials'
8787

88-
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8'
88+
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2'
8989
id: 'run-tests'
9090
dir: *dir
9191
entrypoint: 'make'
@@ -96,7 +96,7 @@ steps:
9696
secretEnv:
9797
- 'JWT_PRIVATE_KEY'
9898

99-
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8'
99+
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2'
100100
id: 'run-e2e-tests'
101101
dir: *dir
102102
entrypoint: 'make'
@@ -107,7 +107,7 @@ steps:
107107
secretEnv:
108108
- 'JWT_PRIVATE_KEY'
109109

110-
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8'
110+
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2'
111111
id: 'run-hashicorp-e2e-tests'
112112
dir: *dir
113113
entrypoint: 'make'

cloudbuild-cache.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
options:
22
env:
3-
- "_GO_VERSION=1.21.5"
3+
- "_GO_VERSION=1.23.3"
44

55
steps:
66
- name: gcr.io/cloud-builders/gsutil

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/solo-io/gloo
22

3-
go 1.21.11
3+
go 1.23.3
44

55
// Note for developers: upgrading go will also require upgrading go in the following files:
66
// ./cloudbuild-cache.yaml,

test/kube2e/gloo/eds_test.go

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
package gloo_test
2+
3+
import (
4+
"os/exec"
5+
6+
"github.com/google/uuid"
7+
. "github.com/onsi/ginkgo/v2"
8+
. "github.com/onsi/gomega"
9+
gatewayv1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1"
10+
gloov1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1"
11+
"github.com/solo-io/gloo/projects/gloo/pkg/api/v1/gloosnapshot"
12+
"github.com/solo-io/gloo/test/helpers"
13+
"github.com/solo-io/gloo/test/kube2e"
14+
"github.com/solo-io/solo-kit/pkg/api/v1/resources/core"
15+
16+
"github.com/solo-io/solo-kit/pkg/api/v1/clients"
17+
)
18+
19+
const (
20+
testServerName = "testserver"
21+
testServerPort = 1234
22+
)
23+
24+
var _ = Describe("EDS", func() {
25+
var (
26+
testServerDestination *gloov1.Destination
27+
testServerVs *gatewayv1.VirtualService
28+
29+
glooResources *gloosnapshot.ApiSnapshot
30+
)
31+
32+
BeforeEach(func() {
33+
// Create a VirtualService routing directly to the testServer kubernetes service
34+
testServerDestination = &gloov1.Destination{
35+
DestinationType: &gloov1.Destination_Kube{
36+
Kube: &gloov1.KubernetesServiceDestination{
37+
Ref: &core.ResourceRef{
38+
Namespace: testHelper.InstallNamespace,
39+
Name: testServerName,
40+
},
41+
Port: uint32(testServerPort),
42+
},
43+
},
44+
}
45+
testServerVs = helpers.NewVirtualServiceBuilder().
46+
WithName(testServerName).
47+
WithNamespace(testHelper.InstallNamespace).
48+
WithLabel(kube2e.UniqueTestResourceLabel, uuid.New().String()).
49+
WithDomain(testServerName).
50+
WithRoutePrefixMatcher(testServerName, "/").
51+
WithRouteActionToSingleDestination(testServerName, testServerDestination).
52+
Build()
53+
54+
// The set of resources that these tests will generate
55+
glooResources = &gloosnapshot.ApiSnapshot{
56+
VirtualServices: gatewayv1.VirtualServiceList{
57+
// many tests route to the TestServer Service so it makes sense to just
58+
// always create it
59+
// the other benefit is this ensures that all tests start with a valid Proxy CR
60+
testServerVs,
61+
},
62+
}
63+
})
64+
65+
JustBeforeEach(func() {
66+
err := snapshotWriter.WriteSnapshot(glooResources, clients.WriteOpts{
67+
Ctx: ctx,
68+
OverwriteExisting: false,
69+
})
70+
Expect(err).NotTo(HaveOccurred())
71+
})
72+
73+
JustAfterEach(func() {
74+
err := snapshotWriter.DeleteSnapshot(glooResources, clients.DeleteOpts{
75+
Ctx: ctx,
76+
IgnoreNotExist: true,
77+
})
78+
Expect(err).NotTo(HaveOccurred())
79+
})
80+
81+
Context("Rest EDS", Ordered, func() {
82+
BeforeAll(func() {
83+
// enable REST EDS
84+
kube2e.UpdateRestEdsSetting(ctx, true, testHelper.InstallNamespace)
85+
})
86+
87+
AfterAll(func() {
88+
// reset REST EDS to default
89+
kube2e.UpdateRestEdsSetting(ctx, false, testHelper.InstallNamespace)
90+
})
91+
92+
// This test is inspired by the issue here: https://github.com/solo-io/gloo/issues/8968
93+
// There were some versions of Gloo Edge 1.15.x which depended on versions of envoy-gloo
94+
// which did not have REST config subscription enabled, and so gateway-proxy logs would
95+
// contain warnings about not finding a registered config subscription factory implementation
96+
// for REST EDS. This test validates that we have not regressed to that state.
97+
It("should not warn when REST EDS is configured", func() {
98+
Consistently(func(g Gomega) {
99+
// Get envoy logs from gateway-proxy deployment
100+
logsCmd := exec.Command("kubectl", "logs", "-n", testHelper.InstallNamespace,
101+
"deployment/gateway-proxy")
102+
logsOut, err := logsCmd.Output()
103+
g.Expect(err).NotTo(HaveOccurred())
104+
105+
// ensure that the logs do not contain any presence of the text:
106+
// Didn't find a registered config subscription factory implementation for name: 'envoy.config_subscription.rest'
107+
g.Expect(string(logsOut)).NotTo(ContainSubstring("Didn't find a registered config subscription factory implementation for name: 'envoy.config_subscription.rest'"))
108+
}, "10s", "1s").Should(Succeed())
109+
})
110+
})
111+
})

0 commit comments

Comments
 (0)