Skip to content

Commit d14ef62

Browse files
steelingkeithmattix
authored andcommitted
bump version of go to 1.19 (openservicemesh#4972)
bump version of go to 1.19 Signed-off-by: Sean Teeling <[email protected]>
1 parent 56679ed commit d14ef62

File tree

9 files changed

+19
-16
lines changed

9 files changed

+19
-16
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: golangci-lint
5555
uses: golangci/golangci-lint-action@v3
5656
with:
57-
version: v1.47.0
57+
version: v1.48.0
5858
skip-pkg-cache: true
5959

6060
codegen:

Dockerfile

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

22
#build stage
3-
FROM golang:1.17-alpine AS builder
3+
FROM golang:1.19-alpine AS builder
44

55
RUN apk update
66
RUN apk add --no-cache make

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ GIT_SHA=$$(git rev-parse HEAD)
2121
BUILD_DATE_VAR := github.com/openservicemesh/osm/pkg/version.BuildDate
2222
BUILD_VERSION_VAR := github.com/openservicemesh/osm/pkg/version.Version
2323
BUILD_GITCOMMIT_VAR := github.com/openservicemesh/osm/pkg/version.GitCommit
24-
DOCKER_GO_VERSION = 1.17
25-
DOCKER_BUILDX_PLATFORM ?= linux/amd64
24+
DOCKER_GO_VERSION = 1.19
25+
DOCKER_BUILDX_PLATFORM ?= linux/$(shell go env GOARCH)
2626
# Value for the --output flag on docker buildx build.
2727
# https://docs.docker.com/engine/reference/commandline/buildx_build/#output
2828
DOCKER_BUILDX_OUTPUT ?= type=registry

demo/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## System Requirements
44
- MacOS, Linux or WSL2 on Windows
55
- GCC
6-
- Go version [1.17.0 or higher](https://github.com/openservicemesh/osm/issues/2363)
6+
- Go version [1.19.0 or higher](https://github.com/openservicemesh/osm/issues/2363)
77
- Kubectl version 1.15 or higher
88
- Docker CLI
99
- on a Debian based GNU/Linux system: `sudo apt-get install docker`

docs/development_guide/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ OSM leverages [Envoy proxy](https://github.com/envoyproxy/envoy) as a data plane
6363

6464
## Get Go-ing
6565

66-
This Open Service Mesh project uses [Go v1.17.0+](https://golang.org/). If you are not familiar with Go, spend some time with the excellent [Tour of Go](https://tour.golang.org/).
66+
This Open Service Mesh project uses [Go v1.19.0+](https://golang.org/). If you are not familiar with Go, spend some time with the excellent [Tour of Go](https://tour.golang.org/).
6767

6868
## Get the dependencies
6969

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/openservicemesh/osm
22

3-
go 1.17
3+
go 1.19
44

55
require (
66
github.com/AlekSi/gocov-xml v0.0.0-20190121064608-3a14fb1c4737

pkg/ingress/gateway.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ import (
1818
)
1919

2020
// provisionIngressGatewayCert does the following:
21-
// 1. If an ingress gateway certificate spec is specified in the MeshConfig resource, issues a certificate
22-
// for it and stores it in the referenced secret.
23-
// 2. Starts a goroutine to watch for changes to the MeshConfig resource and certificate rotation, and
24-
// updates/removes the certificate and secret as necessary.
21+
// 1. If an ingress gateway certificate spec is specified in the MeshConfig resource, issues a certificate
22+
// for it and stores it in the referenced secret.
23+
// 2. Starts a goroutine to watch for changes to the MeshConfig resource and certificate rotation, and
24+
// updates/removes the certificate and secret as necessary.
2525
func (c *client) provisionIngressGatewayCert(stop <-chan struct{}) error {
2626
defaultCertSpec := c.cfg.GetMeshConfig().Spec.Certificate.IngressGateway
2727
if defaultCertSpec != nil {

pkg/tests/stream.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ func (s *XDSServer) Recv() (*xds_discovery.DiscoveryRequest, error) {
5353
// SetHeader sets the header metadata. It may be called multiple times.
5454
// When call multiple times, all the provided metadata will be merged.
5555
// All the metadata will be sent out when one of the following happens:
56-
// - ServerStream.SendHeader() is called;
57-
// - The first response is sent out;
58-
// - An RPC status is sent out (error or success).
56+
// - ServerStream.SendHeader() is called;
57+
// - The first response is sent out;
58+
// - An RPC status is sent out (error or success).
5959
func (s *XDSServer) SetHeader(metadata.MD) error {
6060
return nil
6161
}

pkg/trafficpolicy/trafficpolicy.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func (rwc *RouteWeightedClusters) TotalClustersWeight() int {
8484
}
8585

8686
// AddRoute adds a route to an OutboundTrafficPolicy given an HTTP route match and weighted cluster. If a Route with the given HTTP route match
87+
//
8788
// already exists, an error will be returned. If a Route with the given HTTP route match does not exist,
8889
// a Route with the given HTTP route match and weighted clusters will be added to the Routes on the OutboundTrafficPolicy
8990
func (out *OutboundTrafficPolicy) AddRoute(httpRouteMatch HTTPRouteMatch, retryPolicy *policyv1alpha1.RetryPolicySpec, weightedClusters ...service.WeightedCluster) error {
@@ -137,6 +138,7 @@ func MergeInboundPolicies(original []*InboundTrafficPolicy, latest ...*InboundTr
137138
}
138139

139140
// MergeRules merges the give slices of rules such that there is one Rule for a Route with all allowed service accounts listed in the
141+
//
140142
// returned slice of rules
141143
func MergeRules(originalRules, latestRules []*Rule) []*Rule {
142144
for _, latest := range latestRules {
@@ -156,8 +158,9 @@ func MergeRules(originalRules, latestRules []*Rule) []*Rule {
156158
}
157159

158160
// mergeRoutesWeightedClusters merges two slices of RouteWeightedClusters and returns a slice where there is one RouteWeightedCluster
159-
// for any HTTPRouteMatch. Where there is an overlap in HTTPRouteMatch between the originalRoutes and latestRoutes, the WeightedClusters
160-
// will be unioned as there can only be one set of WeightedClusters per HTTPRouteMatch.
161+
//
162+
// for any HTTPRouteMatch. Where there is an overlap in HTTPRouteMatch between the originalRoutes and latestRoutes, the WeightedClusters
163+
// will be unioned as there can only be one set of WeightedClusters per HTTPRouteMatch.
161164
func mergeRoutesWeightedClusters(originalRoutes, latestRoutes []*RouteWeightedClusters) []*RouteWeightedClusters {
162165
for _, latest := range latestRoutes {
163166
foundRoute := false

0 commit comments

Comments
 (0)