Skip to content

Releases: gatewayd-io/gatewayd-plugin-cache

v0.5.1

Choose a tag to compare

@mostafa mostafa released this 22 Feb 20:04
35a4b9a

Bug Fixes

  • Fix data race in OnTrafficFromServer — The same v1.Struct pointer was sent to UpdateCacheChannel and returned to GatewayD via gRPC. The UpdateCache goroutine mutated Fields while gRPC serialized them concurrently, corrupting responses under load. Fixed by cloning the struct with proto.Clone before sending to the channel.
  • Fix lint issues — Added checked type assertion for proto.Clone result and widened depguard allow list to permit google.golang.org/protobuf.

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@mostafa mostafa released this 21 Feb 21:27
v0.5.0
0611dcb

What's Changed

Bug Fixes

  • Fix goroutine death in UpdateCachereturn statements on error paths permanently killed the cache update goroutine after a single transient error (e.g. empty database name). Changed to continue so 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 UpdateCacheChannel when config was nil caused a runtime panic.
  • Fix double-counting cache missesCacheMissesCounter was incremented twice on a single cache miss in OnTrafficFromClient.

Improvements

  • New CacheErrorsCounter metric — Separates Redis operation errors from genuine cache misses. Previously both were conflated under CacheMissesCounter.
  • Config validation with defaultsredisURL, expiry, and scanCount are now validated with warnings and sensible defaults instead of silently accepting zero-values.
  • Graceful goroutine shutdown — Added WaitGroup to ensure the UpdateCache goroutine drains pending updates before process exit.
  • Deduplicated startup error handling — Extracted repeated ExitOnStartupError + close + exit pattern into a handleStartupError helper.
  • Reduced nestif complexity — Inverted caching precondition in UpdateCache to use early continue.
  • Fixed typoscachedRespnseKeycachedResponseKey, DateFucntionDateFunction.

Dependencies

  • gatewayd-plugin-sdk v0.4.3 → v0.4.4
  • gatewayd v0.10.2 → v0.11.0
  • Migrated from deprecated go-redis/redis/v8 to redis/go-redis/v9
  • Updated all direct dependencies (sentry v0.42.0, cast v1.10.0, testify v1.11.1, miniredis v2.36.1, prometheus v1.23.2, grpc v1.79.1, protobuf v1.36.11)

CI

  • Bumped actions/checkout to v4, actions/setup-go to v5, softprops/action-gh-release to v2
  • Added govulncheck security scanning step

Tests

  • Added TestIsCacheNeeded (table-driven, all PostgreSQL date/time functions)
  • Added TestOnClosed and TestOnClosedNilClient
  • Added TestInvalidateDML and TestInvalidateDMLSelectIgnored
  • Added TestUpdateCacheContinuesOnError (validates goroutine resilience)
  • Coverage: ~50% → 64%

Full Changelog: v0.4.4...v0.5.0

v0.4.4

Choose a tag to compare

@github-actions github-actions released this 07 Aug 16:06
07373a2

What's Changed

Full Changelog: v0.4.3...v0.4.4

v0.4.3

Choose a tag to compare

@github-actions github-actions released this 18 May 14:46
bd6a1a0

Full Changelog: v0.4.2...v0.4.3

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 09 Nov 12:27
ee18714

What's Changed

Full Changelog: v0.4.1...v0.4.2

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 06 Oct 21:28
4eb2b42

This release contains three improvements:

  1. Fix bug in handling UTF-8 in protobuf when logging the cacheKey.
  2. Update golangci-lint-action to the latest version (v6).
  3. Update env-vars in the gatewayd_plugin.yaml file.

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 13:30
e039b14

Important

This release is only compatible with GatewayD v0.9.7+ and backward-incompatible with previous versions of GatewayD.

What's Changed

  • Fix getProxies to reflect changes in GatewayD v0.9.7+ by @mostafa in #84

Full Changelog: v0.3.7...v0.4.0

v0.3.7

Choose a tag to compare

@github-actions github-actions released this 16 Jun 14:59
05cc7e7

What's Changed

New Contributors

Full Changelog: v0.3.6...v0.3.7

v0.3.6

Choose a tag to compare

@github-actions github-actions released this 17 May 11:33
5497d4c

What's Changed

Full Changelog: v0.3.5...v0.3.6

v0.3.5

Choose a tag to compare

@github-actions github-actions released this 08 Apr 20:32
a282095

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