Skip to content

Commit

Permalink
Fix getProxies to reflect changes in GatewayD v0.9.7+ (#84)
Browse files Browse the repository at this point in the history
* Update deps
* Refactor getProxies to use gRPC for communication with GatewayD
* Include config blocks as another nested key when unmarshaling list of proxies
* Allow api/v1 package
* Refactor and update tests to reflect changes
* Upgrade Go to v1.23
* Enable coverage reporting to coveralls
* Remove deprecated linters
* Fix defer before exit
  • Loading branch information
mostafa authored Sep 14, 2024
1 parent 05cc7e7 commit 7e0542e
Show file tree
Hide file tree
Showing 12 changed files with 170 additions and 225 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.22
- name: Set up Go 1.23
uses: actions/setup-go@v3
with:
go-version: "1.22"
go-version: "1.23"
cache: true
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ jobs:
- name: Install Go 🧑‍💻
uses: actions/setup-go@v3
with:
go-version: '1.22'
go-version: "1.23"

- name: Lint code issues 🚨
uses: golangci/golangci-lint-action@v3

- name: Run Go tests 🔬
run: go test -cover -covermode atomic -coverprofile=profile.cov -v ./...

# Enable coverage reporting
# - name: Report coverage to coveralls 📈
# uses: shogo82148/actions-goveralls@v1
# with:
# path-to-profile: profile.cov
- name: Report coverage to coveralls 📈
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
11 changes: 1 addition & 10 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@ linters:
- nlreturn
- testpackage
- paralleltest
- exhaustivestruct
- exhaustruct
- gocognit
- gochecknoinits
- gocyclo
- maligned
- funlen
- maintidx
- musttag
- nosnakecase
- wrapcheck
- golint
- scopelint
- interfacer
- varcheck
- deadcode
- ifshort
- structcheck
linters-settings:
depguard:
rules:
Expand All @@ -39,6 +29,7 @@ linters-settings:
- "!$test"
allow:
- $gostd
- "github.com/gatewayd-io/gatewayd/api/v1"
- "github.com/gatewayd-io/gatewayd-plugin-sdk"
- "github.com/gatewayd-io/gatewayd-plugin-cache"
- "github.com/prometheus/client_golang"
Expand Down
39 changes: 22 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
module github.com/gatewayd-io/gatewayd-plugin-cache

go 1.22
go 1.23.1

require (
github.com/alicebob/miniredis/v2 v2.30.5
github.com/gatewayd-io/gatewayd-plugin-sdk v0.2.16
github.com/getsentry/sentry-go v0.27.0
github.com/gatewayd-io/gatewayd v0.9.7
github.com/gatewayd-io/gatewayd-plugin-sdk v0.3.1
github.com/getsentry/sentry-go v0.28.1
github.com/go-co-op/gocron v1.37.0
github.com/go-redis/redis/v8 v8.11.5
github.com/hashicorp/go-hclog v1.6.3
github.com/hashicorp/go-plugin v1.6.1
github.com/jackc/pgx/v5 v5.6.0
github.com/prometheus/client_golang v1.19.1
github.com/spf13/cast v1.6.0
github.com/jackc/pgx/v5 v5.7.0
github.com/prometheus/client_golang v1.20.3
github.com/spf13/cast v1.7.0
github.com/stretchr/testify v1.9.0
github.com/zenizh/go-capturer v0.0.0-20211219060012-52ea6c8fed04
google.golang.org/grpc v1.64.0
google.golang.org/grpc v1.66.0
google.golang.org/protobuf v1.34.2
)

require (
Expand All @@ -28,28 +30,31 @@ require (
github.com/fatih/color v1.17.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/pganalyze/pg_query_go/v5 v5.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.54.0 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/redis/go-redis/v9 v9.5.2 // indirect
github.com/redis/go-redis/v9 v9.6.1 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rs/zerolog v1.33.0 // indirect
github.com/tetratelabs/wazero v1.7.2 // indirect
github.com/wasilibs/go-pgquery v0.0.0-20240606042535-c0843d6592cc // indirect
github.com/wasilibs/wazero-helpers v0.0.0-20240604052452-61d7981e9a38 // indirect
github.com/tetratelabs/wazero v1.8.0 // indirect
github.com/wasilibs/go-pgquery v0.0.0-20240826014338-9ea9e19d01fd // indirect
github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 // indirect
github.com/yuin/gopher-lua v1.1.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/protobuf v1.34.1 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 7e0542e

Please sign in to comment.