Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 5 additions & 7 deletions .github/workflows/turing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ on:

env:
ARTIFACT_RETENTION_DAYS: 7
GO_VERSION: "1.22"
GO_LINT_VERSION: v1.56.2
GO_VERSION: "1.25"
GO_LINT_VERSION: v2.12.2
CLUSTER_NAME: turing-e2e
ISTIO_VERSION: 1.9.9
KNATIVE_VERSION: 1.7.4
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
run: make test

- name: Lint code
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v7
with:
version: ${{ env.GO_LINT_VERSION }}
working-directory: api
Expand Down Expand Up @@ -292,11 +292,10 @@ jobs:
run: make benchmark

- name: Lint code
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v7
with:
version: ${{ env.GO_LINT_VERSION }}
working-directory: engines/router
skip-go-installation: true
args: --verbose

test-engines-experiment:
Expand All @@ -318,11 +317,10 @@ jobs:
run: make test

- name: Lint code
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v7
with:
version: ${{ env.GO_LINT_VERSION }}
working-directory: engines/experiment
skip-go-installation: true
args: --verbose

test-e2e:
Expand Down
57 changes: 39 additions & 18 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,49 @@
version: "2"
run:
build-tags:
- e2e
skip-dirs:
- turing/generated

linters:
enable:
- bodyclose
- errcheck
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- revive
- staticcheck
- unused

linters-settings:
gocyclo:
# Min code complexity to report, 30 by default (recommended 10-20)
min-complexity: 25
lll:
line-length: 120
settings:
gocyclo:
min-complexity: 25
lll:
line-length: 120
staticcheck:
# v1 only ever enabled the `staticcheck` (SA*) and `gosimple` (S1*) linters, never
# `stylecheck` (ST*) or the quickfix suggestions (QF*). v2 merges gosimple into this
# single staticcheck linter, so exclude ST*/QF* here to keep the same check scope
# as before, instead of newly linting the whole codebase against rules it was never
# checked against.
checks:
- all
- -ST*
- -QF*
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- turing/generated
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- turing/generated
- third_party$
- builtin$
- examples$
4 changes: 4 additions & 0 deletions api/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ TURING_DATABASE_USER=turing
TURING_DATABASE_PASSWORD=turing
TURING_DATABASE_NAME=turing
TURING_ROUTER_IMAGE=asia.gcr.io/gcp-project-id/turing-router:latest
# Deprecated: classic Jaeger/Thrift backend. Use TURING_ROUTER_OTEL_* instead unless a
# specific downstream backend still requires Thrift ingestion.
TURING_ROUTER_JAEGER_ENABLED=false
TURING_ROUTER_JAEGER_COLLECTOR_ENDPOINT=
TURING_ROUTER_OTEL_ENABLED=false
TURING_ROUTER_OTEL_COLLECTOR_ENDPOINT=
TURING_ROUTER_FLUENTD_IMAGE=asia.gcr.io/gcp-project-id/fluentd-bigquery:0.0.1
TURING_ROUTER_FLUENTD_FLUSH_INTERVAL_SECONDS=10
TURING_ROUTER_LOG_LEVEL=DEBUG
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.22-alpine as api-builder
FROM golang:1.25-alpine as api-builder
ARG API_BIN_NAME=turing-api

ENV GO111MODULE=on \
Expand Down
2 changes: 1 addition & 1 deletion api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ clean:
.PHONY: setup
setup:
@echo "Setting up tools..."
@test -x ${GOPATH}/bin/golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
@test -x ${GOPATH}/bin/golangci-lint || go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2
@test -x ${GOPATH}/bin/gotest || go install github.com/rakyll/gotest@latest

.PHONY: fmt
Expand Down
10 changes: 10 additions & 0 deletions api/api/openapi.bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2112,11 +2112,13 @@ components:
error: error
version: 5
log_config:
otel_enabled: true
custom_metrics_enabled: true
bigquery_config:
batch_load: true
table: table
service_account_secret: service_account_secret
pyroscope_enabled: true
kafka_config:
brokers: brokers
topic: topic
Expand Down Expand Up @@ -3704,11 +3706,13 @@ components:
type: object
RouterVersion_log_config:
example:
otel_enabled: true
custom_metrics_enabled: true
bigquery_config:
batch_load: true
table: table
service_account_secret: service_account_secret
pyroscope_enabled: true
kafka_config:
brokers: brokers
topic: topic
Expand All @@ -3723,6 +3727,12 @@ components:
fiber_debug_log_enabled:
type: boolean
jaeger_enabled:
description: 'Deprecated: use otel_enabled instead. Will be removed in a
future release.'
type: boolean
otel_enabled:
type: boolean
pyroscope_enabled:
type: boolean
result_logger_type:
$ref: '#/components/schemas/ResultLoggerType'
Expand Down
7 changes: 7 additions & 0 deletions api/api/specs/routers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,13 @@ components:
type: "boolean"
jaeger_enabled:
type: "boolean"
description: >-
Deprecated: use otel_enabled instead. Will be removed in a
future release.
otel_enabled:
type: "boolean"
pyroscope_enabled:
type: "boolean"
result_logger_type:
$ref: "#/components/schemas/ResultLoggerType"
bigquery_config:
Expand Down
23 changes: 15 additions & 8 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/caraml-dev/turing/api

go 1.22
go 1.25

require (
bou.ke/monkey v1.0.2
Expand All @@ -23,6 +23,7 @@ require (
github.com/google/go-containerregistry v0.19.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/schema v1.1.0
github.com/grafana/pyroscope-go v1.2.0
github.com/heptiolabs/healthcheck v0.0.0-20180807145615-6ff867650f40
github.com/mitchellh/copystructure v1.2.0
github.com/mitchellh/mapstructure v1.5.0
Expand All @@ -35,6 +36,10 @@ require (
github.com/spf13/viper v1.13.0
github.com/stretchr/testify v1.9.0
github.com/xanzy/go-gitlab v0.32.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0
go.opentelemetry.io/otel/sdk v1.24.0
go.uber.org/zap v1.26.0
golang.org/x/oauth2 v0.18.0
google.golang.org/grpc v1.62.0
Expand All @@ -61,7 +66,6 @@ require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/storage v1.39.0 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/ajg/form v1.5.1 // indirect
Expand All @@ -88,6 +92,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand Down Expand Up @@ -135,7 +140,8 @@ require (
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.2 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
Expand Down Expand Up @@ -164,7 +170,7 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/kevinburke/ssh_config v1.1.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/lib/pq v1.10.3 // indirect
github.com/magiconair/properties v1.8.6 // indirect
Expand Down Expand Up @@ -207,8 +213,8 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/uber/jaeger-client-go v2.25.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.0+incompatible // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.34.0 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
Expand All @@ -223,10 +229,11 @@ require (
github.com/zaffka/zap-to-hclog v0.10.6 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
Expand Down
Loading
Loading