Skip to content

Commit

Permalink
release(v1.6.39): bump plugin deps (#356)
Browse files Browse the repository at this point in the history
* release(v1.6.39): bump plugin deps

* feat(plugins): bump deps to v1.6.39

* feat(storages): add info and error messages on etag matching
  • Loading branch information
darkweak committed Jul 18, 2023
1 parent 6b17da1 commit 7481c88
Show file tree
Hide file tree
Showing 62 changed files with 2,075 additions and 1,580 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Expand Up @@ -64,11 +64,13 @@ jobs:
-
name: Build & push Docker image containing only binary
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
file: ./Dockerfile-prod
platforms: linux/arm64,linux/amd64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
build-args: |
"GO_VERSION=${{ env.GO_VERSION }}"
tags: |
darkweak/souin:latest
darkweak/souin:${{ env.RELEASE_VERSION }}
Expand All @@ -91,10 +93,11 @@ jobs:
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
args: release --clean
workdir: ./plugins/souin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO_VERSION: ${{ secrets.GITHUB_TOKEN }}
generate-tyk-versions:
name: Generate Tyk plugin binaries
runs-on: ubuntu-latest
Expand Down
12 changes: 6 additions & 6 deletions .goreleaser.yml
Expand Up @@ -21,12 +21,12 @@ builds:
goarch: arm64
archives:
-
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
-
goos: windows
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -969,7 +969,7 @@ experimental:
plugins:
souin:
moduleName: github.com/darkweak/souin
version: v1.6.38
version: v1.6.39
```
After that you can declare either the whole configuration at once in the middleware block or by service. See the examples below.
```yaml
Expand Down
5 changes: 5 additions & 0 deletions pkg/storage/badgerProvider.go
Expand Up @@ -145,8 +145,13 @@ func (provider *Badger) Prefix(key string, req *http.Request, validator *rfc.Rev
if res, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(val)), req); err == nil {
rfc.ValidateETag(res, validator)
if validator.Matched {
provider.logger.Sugar().Infof("The key %s matched the current iteration key ETag %s", key, it.Item().Key())
result = res
} else {
provider.logger.Sugar().Infof("The key %s didn't match the current iteration key ETag %s", key, it.Item().Key())
}
} else {
provider.logger.Sugar().Errorf("An error occured while reading response for the key %s: %v", it.Item().Key(), err)
}

return nil
Expand Down
5 changes: 5 additions & 0 deletions pkg/storage/embeddedOlricProvider.go
Expand Up @@ -140,8 +140,13 @@ func (provider *EmbeddedOlric) Prefix(key string, req *http.Request, validator *
if res, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(val)), req); err == nil {
rfc.ValidateETag(res, validator)
if validator.Matched {
provider.logger.Sugar().Infof("The key %s matched the current iteration key ETag %s", key, records.Key())
return res
}

provider.logger.Sugar().Infof("The key %s didn't match the current iteration key ETag %s", key, records.Key())
} else {
provider.logger.Sugar().Errorf("An error occured while reading response for the key %s: %v", records.Key(), err)
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/storage/etcdProvider.go
Expand Up @@ -123,8 +123,13 @@ func (provider *Etcd) Prefix(key string, req *http.Request, validator *rfc.Reval
if res, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(v.Value)), req); err == nil {
rfc.ValidateETag(res, validator)
if validator.Matched {
provider.logger.Sugar().Infof("The key %s matched the current iteration key ETag %s", key, string(v.Key))
return res
}

provider.logger.Sugar().Infof("The key %s didn't match the current iteration key ETag %s", key, string(v.Key))
} else {
provider.logger.Sugar().Errorf("An error occured while reading response for the key %s: %v", string(v.Key), err)
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/storage/nutsProvider.go
Expand Up @@ -153,9 +153,14 @@ func (provider *Nuts) Prefix(key string, req *http.Request, validator *rfc.Reval
if res, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(entry.Value)), req); err == nil {
rfc.ValidateETag(res, validator)
if validator.Matched {
provider.logger.Sugar().Infof("The key %s matched the current iteration key ETag %s", key, string(entry.Key))
result = res
return nil
}

provider.logger.Sugar().Infof("The key %s didn't match the current iteration key ETag %s", key, string(entry.Key))
} else {
provider.logger.Sugar().Errorf("An error occured while reading response for the key %s: %v", string(entry.Key), err)
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/storage/olricProvider.go
Expand Up @@ -96,8 +96,13 @@ func (provider *Olric) Prefix(key string, req *http.Request, validator *rfc.Reva
if res, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(val)), req); err == nil {
rfc.ValidateETag(res, validator)
if validator.Matched {
provider.logger.Sugar().Infof("The key %s matched the current iteration key ETag %s", key, records.Key())
return res
}

provider.logger.Sugar().Infof("The key %s didn't match the current iteration key ETag %s", key, records.Key())
} else {
provider.logger.Sugar().Errorf("An error occured while reading response for the key %s: %v", records.Key(), err)
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/storage/redisProvider.go
Expand Up @@ -125,9 +125,11 @@ func (provider *Redis) Prefix(key string, req *http.Request, validator *rfc.Reva
if res, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer([]byte(v))), req); err == nil {
rfc.ValidateETag(res, validator)
if validator.Matched {
provider.logger.Sugar().Infof("The key %s matched the current iteration key ETag %s", key, iter.Val())
in <- res
return
}
provider.logger.Sugar().Errorf("The key %s didn't match the current iteration key ETag %s", key, iter.Val())
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions plugins/beego/.goreleaser.yml
Expand Up @@ -21,12 +21,12 @@ builds:
goarch: arm64
archives:
-
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
-
goos: windows
Expand Down
70 changes: 36 additions & 34 deletions plugins/beego/go.mod
Expand Up @@ -3,35 +3,35 @@ module github.com/darkweak/souin/plugins/beego
go 1.20

require (
github.com/beego/beego/v2 v2.0.7
github.com/darkweak/souin v1.6.38
github.com/beego/beego/v2 v2.1.0
github.com/darkweak/souin v1.6.39
)

require (
github.com/RoaringBitmap/roaring v1.2.3 // indirect
github.com/RoaringBitmap/roaring v1.3.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.5.0 // indirect
github.com/bits-and-blooms/bitset v1.8.0 // indirect
github.com/buraksezer/consistent v0.10.0 // indirect
github.com/buraksezer/olric v0.5.4 // indirect
github.com/bwmarrin/snowflake v0.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/darkweak/go-esi v0.0.5 // indirect
github.com/darkweak/go-esi v0.0.6 // indirect
github.com/dgraph-io/badger/v3 v3.2103.5 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/glog v1.1.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/flatbuffers v23.3.3+incompatible // indirect
github.com/google/flatbuffers v23.5.26+incompatible // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
Expand All @@ -41,22 +41,22 @@ require (
github.com/hashicorp/golang-lru v0.5.5-0.20200511160909-eb529947af53 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/memberlist v0.5.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.51 // indirect
github.com/miekg/dns v1.1.55 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/onsi/gomega v1.24.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pquerna/cachecontrol v0.1.1-0.20230415224848-baaf0ee61529 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.41.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/redis/go-redis/v9 v9.0.2 // indirect
github.com/pquerna/cachecontrol v0.2.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.0 // indirect
github.com/redis/go-redis/v9 v9.0.5 // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
github.com/shiena/ansicolor v0.0.0-20230509054315-a9deabde6e02 // indirect
github.com/tidwall/btree v1.6.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/redcon v1.6.2 // indirect
Expand All @@ -65,25 +65,27 @@ require (
github.com/xujiajun/mmap-go v1.0.1 // indirect
github.com/xujiajun/nutsdb v0.11.1 // indirect
github.com/xujiajun/utils v0.0.0-20220904132955-5f7c5b914235 // indirect
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/v3 v3.5.7 // indirect
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
go.etcd.io/etcd/client/v3 v3.5.9 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/tools v0.11.0 // indirect
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.56.2 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/darkweak/souin v1.6.38 => ../..
replace github.com/darkweak/souin v1.6.39 => ../..

0 comments on commit 7481c88

Please sign in to comment.