chore(deps): allow utopia-php/lock 0.3 - #86
Closed
abnegate wants to merge 1 commit into
Closed
Conversation
Consumers that need DistributedLock::adopt() cannot reach lock 0.3.0 while this package pins ^0.2, because composer resolves the intersection of every constraint in the tree. adopt() is what lets a lock refresher run on its own Redis connection instead of sharing the action's, which is a live process-killing Swoole double-bind in appwrite/cloud. lock 0.3.0 is purely additive over 0.2.4: one new method, no signature or behaviour change, and this package only uses Lock and Mutex. The committed lock could not resolve before this: root required validators ^0.4 while servers was pinned at 0.4.6, which requires validators 0.3.*. servers 0.4.7 requires ^0.4, and ^0.4 was already allowed here, so the lock only ever needed refreshing.
|
Thanks for contributing! This repository is a read-only mirror; development for this library happens in |
Greptile SummaryUpdates the Composer constraint and lock file to permit
Confidence Score: 5/5The dependency refresh appears safe to merge, with no concrete compatibility, security, or runtime failures identified. The queue uses only the unchanged lock interface and mutex surface, the upgraded packages satisfy the repository's PHP requirement, and no reachable incompatible behavior was established for the transitive updates. Important Files Changed
Reviews (1): Last reviewed commit: "chore(deps): allow utopia-php/lock 0.3" | Re-trigger Greptile |
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.
Why
utopia-php/lock0.3.0 addsDistributedLock::adopt(), which lets a holder delegate token-guarded commands such asrefresh()to an instance backed by a different Redis connection.appwrite/cloud needs it to close a live production defect: its lock refresher coroutine currently shares the action's borrowed Redis connection with the action itself, so two coroutines command one socket. The result is a Swoole fatal that takes the worker process down with every in-flight message already popped, which has meant acknowledged deletes that tore nothing down and left compute running and billing.
Composer resolves the intersection of every constraint on a package, so cloud cannot reach 0.3.0 while anything in its tree pins
^0.2. Three do: cloud's root,appwrite/server-ce, and this package. This is the first of the three.Why it is safe
lock 0.3.0 is purely additive over 0.2.4:
git diff 0.2.4 0.3.0is 123 insertions and 0 deletions acrossREADME.md,src/Distributed.phpandtests/DistributedTest.php. The only functional change is the newadopt()method. No signature or behaviour change to anything that existed.This package uses only
Utopia\Lock\LockandUtopia\Lock\Mutex(src/Queue/Connection/Locking.php:5-6). It does not touchDistributedat all, so the added method is invisible here.The lock file refresh
composer.lockonmaincould not resolve as committed, independently of this change:serverswas pinned at 0.4.6 in the lock while the root already allowed^0.4, andservers0.4.7 requiresvalidators ^0.4. So the lock only needed refreshing to become resolvable. Exactly three packages move:utopia-php/lockutopia-php/serversutopia-php/validatorsvalidators0.3 to 0.4 is additive for this package's purposes: 0.4.0 adds a phone validator, 0.4.1 is a no-op re-release, 0.4.2 makesIdentifierreject a trailing newline. This package's only use is aninstanceof Validatorcheck atsrc/Queue/Server.php:460.Verification
vendor/bin/pintis not installed in this package, so linting is whatever CI provides. I did not run the Tests job locally: it needs the Redis and Swoole services from CI, and the standing rule here is to report what was observed rather than imply a pass. CI is the gate.