Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 BUG]: Error 'empty ID is not allowed' for 'forceRelease' method. #2050

Closed
1 task done
fugikzl opened this issue Nov 15, 2024 · 5 comments
Closed
1 task done
Assignees
Labels
B-bug Bug: bug, exception
Milestone

Comments

@fugikzl
Copy link

fugikzl commented Nov 15, 2024

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

RoadRunner\Lock\Lock::forceRelease(string $resource): bool - method throws RPC exception with message "Error 'empty ID is not allowed'". It may be caused by check in https://github.com/roadrunner-server/lock/blob/05729ecc410d2c61a7124da03c6d7d235063c284/rpc.go#L105

Version (rr --version)

2024.2.1

How to reproduce the issue?

Set up RPC server in .rr.yaml. Create lock for resource and try forceRelease() method.

Relevant log output

Spiral\\Goridge\\RPC\\Exception\\ServiceException: Error 'empty ID is not allowed' on tcp://0.0.0.0:6001
@rustatian
Copy link
Member

Hey @fugikzl 👋
Yeah, agree, you're right. ForceRelease method does not require ID.

@rustatian
Copy link
Member

@fugikzl Fixed, will be released in the v2024.3.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Jira 😄 Nov 15, 2024
@rustatian
Copy link
Member

@fugikzl Currently, you may pass any dummy non-empty ID with the payload to bypass this limitation until v2024.3 release. This would also work with the updated version, but ID would be simply skipped. So, pre-2024.3 and post-2024.3 won't introduce any breaking changes.

@fugikzl
Copy link
Author

fugikzl commented Nov 15, 2024

@rustatian got it, thanks!

@fugikzl
Copy link
Author

fugikzl commented Nov 15, 2024

If anyone has met with same problem before the release, here is the example of temporary solution:

            \Spiral\Goridge\RPC\RPC::create($connection)->call('lock.ForceRelease', [
                'resource' => $resource,
                'id' => 'any-string'
            ]);

Explanation: roadrunner-php/lock library calls lock.ForceRelease without passing any ID that causes error, so passing dummy id in the direct rpc call may be considered as a temporary solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants