Skip to content

Commit

Permalink
MAINT - Upgrade packages (#366)
Browse files Browse the repository at this point in the history
* MAINT - Upgrade packages

**What**

- Upgrades the following to resolve CVEs
  - Go version
  - Ubuntu base image version
  - Go package versions
  • Loading branch information
jcox250 committed Sep 17, 2024
1 parent afb8767 commit 66f80db
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 84 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
############################
# STEP 1 build executable binary
############################
FROM golang:1.20 as builder
FROM golang:1.22 as builder

WORKDIR /app

Expand All @@ -21,7 +21,7 @@ RUN make build
# TODO - this will rarely change - publish as an image we can consume
############################
# Pull the base image
FROM ubuntu:22.04 as pushpin
FROM ubuntu:24.04 as pushpin

# Add private APT repository
RUN \
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,29 +82,29 @@ generate-e2e-env-files: ## Generates the .env files needed to run the e2e tests
go run tests/e2e/testhelpers/setup/main.go

e2e-offline-redis: ## brings up offline proxy in redis mode and runs e2e sdk tests against it
OFFLINE=true AUTH_SECRET=my_secret REDIS_ADDRESS=redis:6379 CONFIG_VOLUME=./tests/e2e/testdata/config:/config docker-compose -f ./docker-compose.yml up -d --remove-orphans proxy redis
OFFLINE=true AUTH_SECRET=my_secret REDIS_ADDRESS=redis:6379 CONFIG_VOLUME=./tests/e2e/testdata/config:/config docker compose -f ./docker-compose.yml up -d --remove-orphans proxy redis
sleep 5
go test -p 1 -v ./tests/... -env=".env.offline" | tee /dev/stderr | go-junit-report -set-exit-code > report.xml

e2e-offline-in-mem: ## brings up offline proxy in in-memory mode and runs e2e sdk tests against it
OFFLINE=true AUTH_SECRET=my_secret CONFIG_VOLUME=./tests/e2e/testdata/config:/config docker-compose -f ./docker-compose.yml up -d --remove-orphans proxy
OFFLINE=true AUTH_SECRET=my_secret CONFIG_VOLUME=./tests/e2e/testdata/config:/config docker compose -f ./docker-compose.yml up -d --remove-orphans proxy
sleep 5
go test -p 1 -v ./tests/... -env=".env.offline" | tee /dev/stderr | go-junit-report -set-exit-code > report.xml

e2e-online-in-mem: ## brings up proxy in online in memory mode and runs e2e sdk tests against it
docker-compose --env-file .env.online_in_mem -f ./docker-compose.yml up -d --remove-orphans proxy
docker compose --env-file .env.online_in_mem -f ./docker-compose.yml up -d --remove-orphans proxy
sleep 5 ## TODO replace with a check for the proxy and all envs being healthy
RUN_METRICS_TESTS=true STREAM_URL=https://localhost:7000 go test -p 1 -v ./tests/... -env=".env.online" | tee /dev/stderr | go-junit-report -set-exit-code > online-in-memory.xml

e2e-online-redis: ## brings up proxy in online in redis mode and runs e2e sdk tests against it
docker-compose --env-file .env.online_redis -f ./docker-compose.yml up -d --remove-orphans proxy redis
docker compose --env-file .env.online_redis -f ./docker-compose.yml up -d --remove-orphans proxy redis
sleep 5 ## TODO replace with a check for the proxy and all envs being healthy
go test -p 1 -v ./tests/... -env=".env.online" | tee /dev/stderr | go-junit-report -set-exit-code > online-redis.xml

e2e-generate-offline-config: ## brings up proxy to generate offline config then runs in offline mode
CONFIG_VOLUME=./testconfig:/config docker-compose --env-file .env.generate_offline -f ./docker-compose.yml up -d --remove-orphans proxy
CONFIG_VOLUME=./testconfig:/config docker compose --env-file .env.generate_offline -f ./docker-compose.yml up -d --remove-orphans proxy
sleep 5 ## TODO replace with a check that ./testconfig has been populated with data
CONFIG_VOLUME=./testconfig:/config docker-compose --env-file .env.offline -f ./docker-compose.yml up -d --remove-orphans proxy
CONFIG_VOLUME=./testconfig:/config docker compose --env-file .env.offline -f ./docker-compose.yml up -d --remove-orphans proxy
ONLINE=false go test -p 1 -v ./tests/... -env=".env.online" | tee /dev/stderr | go-junit-report -set-exit-code > generate-offline-redis.xml

PHONY+= run
Expand Down
63 changes: 34 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/harness/ff-proxy

go 1.20
go 1.22

require (
cloud.google.com/go/profiler v0.3.1
Expand All @@ -14,19 +14,21 @@ require (
github.com/go-redis/redis/v8 v8.11.4
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang-jwt/jwt/v4 v4.4.3
github.com/google/uuid v1.4.0
github.com/google/uuid v1.5.0
github.com/harness-community/sse/v3 v3.1.0
github.com/harness/ff-golang-server-sdk v0.1.17
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-retryablehttp v0.7.4
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/joho/godotenv v1.4.0
github.com/json-iterator/go v1.1.12
github.com/labstack/echo/v4 v4.9.0
github.com/labstack/echo/v4 v4.11.4
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/prometheus/client_golang v1.11.1
github.com/redis/go-redis/v9 v9.6.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.4
go.uber.org/zap v1.19.1
gopkg.in/cenkalti/backoff.v1 v1.1.0
gopkg.in/yaml.v2 v2.4.0
)

Expand All @@ -35,15 +37,16 @@ require (
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deepmap/oapi-codegen/v2 v2.1.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/getkin/kin-openapi v0.98.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/getkin/kin-openapi v0.124.0 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/swag v0.22.8 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/pprof v0.0.0-20221103000818-d260c55eee4c // indirect
Expand All @@ -53,47 +56,49 @@ require (
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/invopop/yaml v0.1.0 // indirect
github.com/invopop/yaml v0.2.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/labstack/gommon v0.3.1 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/oapi-codegen/runtime v1.1.1 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.30.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/vmihailenco/go-tinylfu v0.2.2 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.4 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/gopher-lua v1.1.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.149.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 66f80db

Please sign in to comment.