Releases: gatewayd-io/gatewayd-plugin-cache
Releases · gatewayd-io/gatewayd-plugin-cache
Release list
v0.5.1
Bug Fixes
- Fix data race in OnTrafficFromServer — The same
v1.Structpointer was sent toUpdateCacheChanneland returned to GatewayD via gRPC. TheUpdateCachegoroutine mutatedFieldswhile gRPC serialized them concurrently, corrupting responses under load. Fixed by cloning the struct withproto.Clonebefore sending to the channel. - Fix lint issues — Added checked type assertion for
proto.Cloneresult and wideneddepguardallow list to permitgoogle.golang.org/protobuf.
Full Changelog: v0.5.0...v0.5.1
v0.5.0
What's Changed
Bug Fixes
- Fix goroutine death in UpdateCache —
returnstatements on error paths permanently killed the cache update goroutine after a single transient error (e.g. empty database name). Changed tocontinueso caching survives errors. Resolves #64. - Fix IsCacheNeeded checking cache key instead of query — Date/time function detection was applied to the raw cache key (binary bytes) instead of the parsed SQL query string, making it unreliable.
- Fix ExitOnStartupError read before set — The flag was checked before its value was loaded from config, so the first startup error check always evaluated to
false. - Fix close(nil) channel panic — Closing the
UpdateCacheChannelwhen config was nil caused a runtime panic. - Fix double-counting cache misses —
CacheMissesCounterwas incremented twice on a single cache miss inOnTrafficFromClient.
Improvements
- New
CacheErrorsCountermetric — Separates Redis operation errors from genuine cache misses. Previously both were conflated underCacheMissesCounter. - Config validation with defaults —
redisURL,expiry, andscanCountare now validated with warnings and sensible defaults instead of silently accepting zero-values. - Graceful goroutine shutdown — Added
WaitGroupto ensure theUpdateCachegoroutine drains pending updates before process exit. - Deduplicated startup error handling — Extracted repeated
ExitOnStartupError+ close + exit pattern into ahandleStartupErrorhelper. - Reduced nestif complexity — Inverted caching precondition in
UpdateCacheto use earlycontinue. - Fixed typos —
cachedRespnseKey→cachedResponseKey,DateFucntion→DateFunction.
Dependencies
gatewayd-plugin-sdkv0.4.3 → v0.4.4gatewaydv0.10.2 → v0.11.0- Migrated from deprecated
go-redis/redis/v8toredis/go-redis/v9 - Updated all direct dependencies (
sentryv0.42.0,castv1.10.0,testifyv1.11.1,miniredisv2.36.1,prometheusv1.23.2,grpcv1.79.1,protobufv1.36.11)
CI
- Bumped
actions/checkoutto v4,actions/setup-goto v5,softprops/action-gh-releaseto v2 - Added
govulnchecksecurity scanning step
Tests
- Added
TestIsCacheNeeded(table-driven, all PostgreSQL date/time functions) - Added
TestOnClosedandTestOnClosedNilClient - Added
TestInvalidateDMLandTestInvalidateDMLSelectIgnored - Added
TestUpdateCacheContinuesOnError(validates goroutine resilience) - Coverage: ~50% → 64%
Full Changelog: v0.4.4...v0.5.0
v0.4.4
v0.4.3
v0.4.2
v0.4.1
This release contains three improvements:
- Fix bug in handling UTF-8 in protobuf when logging the
cacheKey. - Update golangci-lint-action to the latest version (v6).
- Update env-vars in the
gatewayd_plugin.yamlfile.
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Important
This release is only compatible with GatewayD v0.9.7+ and backward-incompatible with previous versions of GatewayD.
What's Changed
Full Changelog: v0.3.7...v0.4.0
v0.3.7
What's Changed
- Skip caching datetime functions by @sinadarbouy in #82
- Update deps by @mostafa in #83
New Contributors
- @sinadarbouy made their first contribution in #82
Full Changelog: v0.3.6...v0.3.7
v0.3.6
v0.3.5
What's Changed
- Improve Makefile by combining all build targets for different platforms into a single target by @mostafa in #80
Full Changelog: v0.3.4...v0.3.5