Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #957 +/- ##
==========================================
- Coverage 69.15% 69.14% -0.01%
==========================================
Files 157 158 +1
Lines 10526 10602 +76
==========================================
+ Hits 7279 7331 +52
- Misses 2913 2940 +27
+ Partials 334 331 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR merges version v1.15.5 and includes several enhancements and refactorings across the codebase. Key changes include:
- A redesigned rate limiter store in http/limit/store.go that now uses JSON (un)marshalling and external locking.
- An update to container and application Refresh APIs to accept variadic bindings.
- Consistency improvements in mocks, facades, error messages, and updated package imports.
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| contracts/http/store.go | Retains interface definitions with no functional modifications. |
| http/limit/bucket.go | Introduced an internal Bucket type with token handling and lock free design, unchanged functionality. |
| mocks/http/Store.go | Auto-generated mocks updated to match new interfaces. |
| http/limit/bucket_test.go | Added tests verify correct bucket behavior and token refill logic. |
| mocks/cache/Lock.go | Updated Lock mock functions to include BlockWithTicker functionality. |
| foundation/container_test.go | Refresh API tests updated in line with the variadic Refresh changes. |
| http/middleware/throttle.go | Enhanced throttle middleware with error logging and immediate return on rate limiter errors. |
| cache/lock.go | Added BlockWithTicker wrapper in production code with updated ticker parameter. |
| foundation/container.go | Modified Refresh method to accept variadic bindings while preserving config bindings. |
| support/constant.go | Incremented the version string to v1.15.5. |
| mocks/foundation/Application.go | Refresh mock updated to variadic bindings. |
| contracts/foundation/application.go | Documentation updated for the Refresh method to reflect the variadic signature. |
| errors/modules.go | Added ModuleHttp and removed duplicate module entries. |
| contracts/cache/cache.go | Updated Driver interface to incorporate BlockWithTicker in Lock. |
| http/limit/store.go | Major update: Store now uses JSON (un)marshalling to persist Bucket state, external locks, and improved error handling. |
| http/service_provider.go | Updated service provider to retrieve LogFacade, RateLimiterFacade, and JsonFacade with additional nil checks and panic messages. |
| http/limit/limit.go | Updated factory functions and method signatures to rely on the new Store implementation and contracts consistency. |
| database/orm/orm.go | Updated Refresh function signature of Orm to support variadic parameters. |
| errors/list.go | Revised error messages with improved capitalization and added new HTTP error messages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📑 Description