Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api): Remove authz middleware and update Turing API server, router, plugin dependencies #371

Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9527be9
Remove unused authz middleware
deadlycoconuts Mar 12, 2024
64fb3c5
Remove authz related configs
deadlycoconuts Mar 12, 2024
1cc413a
Bump up version dependencies
deadlycoconuts Mar 12, 2024
bbc7979
Update go version in github workflow
deadlycoconuts Mar 12, 2024
f605ce2
Add step to install go 1.22
deadlycoconuts Mar 12, 2024
e68a2d6
Update knative pkg
deadlycoconuts Mar 12, 2024
bab4a81
Update containerregistry package
deadlycoconuts Mar 12, 2024
402ac97
Update go mod file to use branched merlin package version
deadlycoconuts Mar 13, 2024
016c9af
Update turing api dockerfile to use newer version of go
deadlycoconuts Mar 13, 2024
4e4eab3
Update golanci-lint version
deadlycoconuts Mar 13, 2024
ebb6340
Move jsonError helper function from removed authz file to openapi val…
deadlycoconuts Mar 13, 2024
3a2686d
Specify go-hclog version
deadlycoconuts Mar 13, 2024
243d2a3
Rename unused function arguments in experiment engines
deadlycoconuts Mar 13, 2024
79cd55b
Fix lint comments in turing router
deadlycoconuts Mar 13, 2024
474d8f0
Rollback zap version
deadlycoconuts Mar 13, 2024
7a5555b
Update zap-to-hclog in experiment, router, and api
deadlycoconuts Mar 13, 2024
39426b7
Refactor merlin's environments api
deadlycoconuts Mar 13, 2024
85cdeef
Update go version for router and experiment engine
deadlycoconuts Mar 13, 2024
1a8edd3
Add steps to install go 1.22 for experiment engine and router
deadlycoconuts Mar 13, 2024
db258a7
Update zap and mlp in experiment engines and router
deadlycoconuts Mar 13, 2024
1dc0106
Patch new EnvironmentsGet method
deadlycoconuts Mar 14, 2024
19a53e3
Remove steps to verify the same google auth client is created by merl…
deadlycoconuts Mar 14, 2024
a1f07ed
Add custom compare function to allow nested unexported fields
deadlycoconuts Mar 14, 2024
5ba91e7
Refactor e2e tests to make them compatible with previously used libra…
deadlycoconuts Mar 14, 2024
9b41165
Clean up refactoring of mlp service
deadlycoconuts Mar 14, 2024
f5bc53f
Bump up ginkgo versions
deadlycoconuts Mar 14, 2024
0472f7e
Fix e2e test where return value of a function is no longer a slice of…
deadlycoconuts Mar 14, 2024
feab29a
Add gcflags to gotest
deadlycoconuts Mar 14, 2024
76f59df
Fix bug in unit tests where mutex locks were copied
deadlycoconuts Mar 14, 2024
5557a25
Remove dot imports
deadlycoconuts Mar 15, 2024
10e0606
Fix lint comments by renaming unused arguments and nonstandard variab…
deadlycoconuts Mar 15, 2024
ec02fa5
Add indirect function in router cleanup helper function
deadlycoconuts Mar 15, 2024
9823c2d
Parameterise version of Go installed
deadlycoconuts Apr 8, 2024
0423345
Refactor ApplyPodDisruptionBudget signature by removing namespace fro…
deadlycoconuts Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/turing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ on:

env:
ARTIFACT_RETENTION_DAYS: 7
GO_VERSION: "1.20"
GO_LINT_VERSION: v1.51.2
GO_VERSION: "1.22"
GO_LINT_VERSION: v1.56.2
CLUSTER_NAME: turing-e2e
ISTIO_VERSION: 1.9.9
KNATIVE_VERSION: 1.7.4
Expand All @@ -58,6 +58,13 @@ jobs:
with:
fetch-depth: 0

# This is needed due to the issue raised here: https://github.com/golang/go/issues/61455
- name: Install Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false

- name: Build Docker image
id: build-image
working-directory: api
Expand Down Expand Up @@ -89,6 +96,13 @@ jobs:
with:
fetch-depth: 0

# This is needed due to the issue raised here: https://github.com/golang/go/issues/61455
- name: Install Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false

- name: Build Docker image
id: build-image
working-directory: engines/router
Expand Down Expand Up @@ -120,6 +134,13 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

# This is needed due to the issue raised here: https://github.com/golang/go/issues/61455
- name: Install Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false

- name: Build Docker image
working-directory: engines/experiment/examples/plugins/hardcoded
run: |
Expand Down
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:alpine as gke-plugin-builde
RUN gcloud components install gke-gcloud-auth-plugin --quiet

# Build turing-api binary
FROM golang:1.20-alpine as api-builder
FROM golang:1.22-alpine as api-builder
ARG API_BIN_NAME=turing-api

ENV GO111MODULE=on \
Expand Down
10 changes: 5 additions & 5 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ vendor:
.PHONY: test
test: tidy
@echo "Running tests..."
gotest -race -short -cover -coverprofile cover.out ${SRC_ROOT}/... -tags integration
gotest -gcflags=-l -race -short -cover -coverprofile cover.out ${SRC_ROOT}/... -tags integration
go tool cover -func cover.out

.PHONY: build
Expand Down Expand Up @@ -112,10 +112,10 @@ run-local-e2e:

.PHONY: setup-e2e
setup-e2e:
go get github.com/onsi/ginkgo/v2/ginkgo/generators@v2.3.1
go get github.com/onsi/ginkgo/v2/ginkgo/internal@v2.3.1
go get github.com/onsi/gomega@v1.22.1
go install github.com/onsi/ginkgo/v2/ginkgo@v2.3.1
go get github.com/onsi/ginkgo/v2/ginkgo/generators@v2.16.0
go get github.com/onsi/ginkgo/v2/ginkgo/internal@v2.16.0
go get github.com/onsi/gomega@v1.31.1
go install github.com/onsi/ginkgo/v2/ginkgo@v2.16.0

.PHONY: test-e2e
test-e2e:
Expand Down
5 changes: 3 additions & 2 deletions api/e2e/test/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var clients = &struct {
type TuringRouterResources struct {
KnativeServices []knservingv1.Service
K8sServices []coreV1.Service
IstioServices []v1alpha3.VirtualService
IstioServices []*v1alpha3.VirtualService
K8sDeployments []appsV1.Deployment
ConfigMaps []coreV1.ConfigMap
Secrets []coreV1.Secret
Expand Down Expand Up @@ -188,7 +188,8 @@ func CleanupRouterDeployment(
names := make([]string, slice.Len())

for i := 0; i < slice.Len(); i++ {
names[i] = slice.Index(i).FieldByName("ObjectMeta").
// The use of indirect is needed to handle VirtualServices which are returned by Istio as a list of pointers
names[i] = reflect.Indirect(slice.Index(i)).FieldByName("ObjectMeta").
Interface().(metav1.ObjectMeta).Name
}
return names
Expand Down
Loading
Loading