Skip to content

Commit 8c33f33

Browse files
steelingnshankar13
authored andcommitted
[backport] cherry-pick 15e46da to release-v1.2
Fix ingress backend broken SAN (openservicemesh#4914) Fix ingress backend SAN's, which were getting the trust domain appended to the provided SAN. This adds an e2e test to catch that going forward. This also switches the internal builders to use the principal (trust domain appended) vs the identity (no trust domain) Signed-off-by: nshankar13 <[email protected]> [backport] cherry-pick 961c865 to release-v1.2 fix golints G114 and package-comments (openservicemesh#5037) golints addressed: 1. G114: Use of net/http serve function that has no support for setting timeouts 2. package-comments 3. removes pkg mesh and moves isValidUUID() to pkg/cli/proxy_get.go Signed-off-by: Shalier Xia <[email protected]> [backport] cherry-pick df502a7 to release-v1.2 bump version of go to 1.19 (openservicemesh#4972) Signed-off-by: Sean Teeling <[email protected]>
1 parent 893ff87 commit 8c33f33

File tree

48 files changed

+363
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+363
-615
lines changed

.golangci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
run:
22
tests: true
3-
timeout: 10m
3+
timeout: 20m
44
skip-dirs:
55
- pkg/gen
66
skip-files:
@@ -35,6 +35,10 @@ issues:
3535
- revive
3636
source: ". \"github.com/openservicemesh/osm/tests/framework\""
3737
text: "dot imports"
38+
# Ignore error for package comments
39+
- linters:
40+
- revive
41+
text: "package-comments: should have a package comment"
3842
# Exclude staticcheck messages for deprecated function, variable or constant
3943
# This causes issues with package github.com/golang/protobuf/proto
4044
- linters:

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`

demo/cmd/bookbuyer/bookbuyer.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package main implements the bookbuyer application
12
package main
23

34
import (
@@ -77,6 +78,7 @@ func debugServer() {
7778
}
7879
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {})
7980
log.Info().Msgf("Web server running on port %d", *port)
81+
//#nosec G114: Use of net/http serve function that has no support for setting timeouts
8082
err = http.ListenAndServe(fmt.Sprintf(":%d", *port), router)
8183
log.Fatal().Err(err).Msgf("Failed to start HTTP server on port %d", *port)
8284
}

demo/cmd/bookstore/bookstore.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package main implements the bookstore application
12
package main
23

34
import (
@@ -164,8 +165,8 @@ func main() {
164165
router.HandleFunc(h.path, h.fn).Methods(h.method)
165166
}
166167
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {})
167-
168168
log.Info().Msgf("Bookstore running on port %d", *port)
169+
//#nosec G114: Use of net/http serve function that has no support for setting timeouts
169170
err = http.ListenAndServe(fmt.Sprintf(":%d", *port), router)
170171
log.Fatal().Err(err).Msgf("Failed to start HTTP server on port %d", *port)
171172
}

demo/cmd/bookthief/bookthief.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package main implements the bookthief application
12
package main
23

34
import (
@@ -86,6 +87,7 @@ func debugServer() {
8687
}
8788
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {})
8889
log.Info().Msgf("Bookthief running on port %d", *port)
90+
//#nosec G114: Use of net/http serve function that has no support for setting timeouts
8991
err = http.ListenAndServe(fmt.Sprintf(":%d", *port), router)
9092
log.Fatal().Err(err).Msgf("Failed to start HTTP server on port %d", *port)
9193
}

demo/cmd/bookwarehouse/bookwarehouse.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Package main implements the bookwarehouse application
2+
// This create a service which has both inbound as well as outbound service policies
3+
// i.e. bookbuyer makes a GET call to bookstore, bookstore makes a POST call to bookwarehouse
14
package main
25

36
import (
@@ -129,6 +132,7 @@ func main() {
129132
router.HandleFunc("/", restockBooks).Methods("POST")
130133
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {})
131134
log.Info().Msgf("Starting BookWarehouse HTTP server on port %d", *port)
135+
//#nosec G114: Use of net/http serve function that has no support for setting timeouts
132136
err := http.ListenAndServe(fmt.Sprintf(":%d", *port), router)
133137
log.Fatal().Err(err).Msgf("Failed to start BookWarehouse HTTP server on port %d", *port)
134138
}

demo/cmd/bookwatcher/bookwatcher.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package main implements the bookwatcher for terminal and JSON output from demo applications
12
package main
23

34
import (

demo/cmd/common/books.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package common implements shared functions and structs between various book* applications
12
package common
23

34
import (

demo/cmd/database/mysql.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Package database allows the bookwarehouse service to store
2+
// total books data into MySQL persistent storage
13
package database
24

35
import (

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

0 commit comments

Comments
 (0)