-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
[ISSUE-30478] Release cache dir lock acquired by a command on sigint or sigterm #52194
Conversation
Added `Cache.releaseLockEarly` function call to commands SIGTERM and SIGINT handlers. Added tests to validate that lock is released
'command release lock on kill signal'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
packages/flutter_tools/test/general.shard/runner/flutter_command_test.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/general.shard/runner/flutter_command_test.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/general.shard/runner/flutter_command_test.dart
Outdated
Show resolved
Hide resolved
refactor 'command release lock on kill signal' test
'command relese lock o kikk signal'
'command test release lock on kill signal' to improve readability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Description
The goal of this PR is to fix an existing issue related to the cache dir lock file.
To resolve the issue, a call to
Cache.releaseLockEarly()
was added into commands handlers for SIGTERM and SIGINT.Related Issues
#30478
Tests
I added the following tests:
flutter_tools/test/general.shard/flutter_command_test.dart:
command release lock on kill signal
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.