github gofr-dev/gofr v1.56.5

6 hours ago

Release v1.56.5

๐Ÿ›  Fixes

  • gRPC Shutdown Nil Panic โ€” The force-close fallback in grpcServer.Shutdown (invoked when the graceful context times out) didn't nil-check g.server. Apps that never called RegisterService panicked on SIGTERM during the grace period. Added the missing nil-check and a regression test. (#3368)

  • MongoDB / ArangoDB Operation Metrics โ€” defer sendOperationStats(time.Now(), โ€ฆ) evaluated time.Now() at defer registration and then called time.Since(time.Now())
    internally, so every op reported ~0 ยตs duration. A few sites also placed the defer after an early-return, dropping metrics on failing ops. Replaced with an instrumentOp helper that captures start time synchronously and always fires its cleanup, so durations are accurate and error paths still record histograms. ArangoDB DropCollection /
    TruncateCollection now also time the actual op rather than just the getCollection() lookup. (#3102)

  • DBResolver Tracing โ€” AddDBResolver previously dropped tracing silently because no matcher arm existed for it. Tracing is now wired, and a warning is emitted when a datasource implements UseTracer without a matcher entry. (#3102)

  • Duck-typed datasource wiring โ€” AddMongo, AddArangoDB, AddClickhouse, AddCassandra, AddPubSub, and the rest of the AddXxx family now accept the underlying behavior interface directly. The *Provider shims in pkg/gofr/container/datasources.go are marked Deprecated and retained for backwards compatibility โ€” existing code continues to compile. (#3102)

Don't miss a new gofr release

NewReleases is sending notifications on new releases.