Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v1.16.x #1376 +/- ##
==========================================
Coverage ? 68.28%
==========================================
Files ? 215
Lines ? 11619
Branches ? 0
==========================================
Hits ? 7934
Misses ? 3305
Partials ? 380 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Greptile Overview
Greptile Summary
This PR upgrades the framework to v1.16.8 and includes two main functional changes:
Error handling:
errors.errorStringis now immutable (bothArgs()andSetModule()return a new instance) and implementsIs()soerrors.Is()can match errors by their template text. New tests cover immutability, concurrency safety, andIs()behavior.Queue database driver: Queue components (
Application,DriverCreator,PendingJob,Worker) now accept an injectedcache.Cache. The database queue driver wrapsPop()with a cache-backed lock (Cache.Lock(...).Block(...)) to prevent concurrent pops for the same queue, and returns a newQueuePopIsLockederror when the lock can’t be acquired.Most other changes are regenerated mocks/import reordering and test updates to match the new constructor signatures and error-argument semantics.
Confidence Score: 5/5
Important Files Changed
Sequence Diagram
sequenceDiagram participant SP as queue.ServiceProvider participant App as foundation.Application participant QA as queue.Application participant DC as queue.DriverCreator participant DB as queue.DatabaseDriver participant Cache as cache.Cache participant Lock as cache.Lock participant SQL as db.DB SP->>App: MakeCache() SP->>App: MakeDB() SP->>App: GetJson() SP->>QA: NewApplication(config, cache, db, jobStorer, json, log) QA->>DC: NewDriverCreator(config, cache, db, jobStorer, json, log) QA->>DC: Create("default") DC->>DB: NewDatabase(config, cache, db, jobStorer, json, "default") QA->>QA: Worker(connection, queue) QA->>DC: NewDriverCreator(...) DC->>DB: (returns Driver) QA->>DB: Pop(queue) DB->>Cache: Lock("goravel:queue-database-<queue>:lock", 1m) Cache-->>Lock: lock DB->>Lock: Block(1m) alt lock acquired DB->>SQL: Transaction(fn) SQL-->>DB: reserved job DB->>Lock: Release() DB-->>QA: ReservedJob else lock not acquired DB-->>QA: QueuePopIsLocked error end