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

feat: operation level locking for CLI commands #19162

Merged
merged 1 commit into from Dec 8, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented Dec 6, 2022

This prevents mistakenly issuing same commands twice which can be dangerous.

added global lock(s):

  • bench build

added site level lock(s):

  • new-site
  • migrate
  • install-app
  • restore
  • uninstall-app

closes #13215
extends #19133

no-docs

@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Dec 6, 2022
@ankush ankush removed the add-test-cases Add test case to validate fix or enhancement label Dec 6, 2022
This prevents mistakenly issuing same commands twice which can be
dangerous.

added global lock(s):
- [x] bench build

added site level lock(s):
- [x] bench new-site sitename
- [x] bench --site sitename migrate
- [x] bench install-app appname
- [x] bench build
- [x] bench restore (the code is just meh, needs some cleanup)

closes frappe#13215
@ankush ankush marked this pull request as ready for review December 7, 2022 10:31
@ankush ankush requested a review from a team as a code owner December 7, 2022 10:31
@ankush ankush requested review from shariquerik and removed request for a team December 7, 2022 10:31
@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Merging #19162 (710d603) into develop (d389fff) will decrease coverage by 0.02%.
The diff coverage is 80.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #19162      +/-   ##
===========================================
- Coverage    63.72%   63.69%   -0.03%     
===========================================
  Files          751      751              
  Lines        67745    67883     +138     
  Branches      6042     6042              
===========================================
+ Hits         43168    43236      +68     
- Misses       21147    21217      +70     
  Partials      3430     3430              
Flag Coverage Δ
server-mariadb 67.67% <85.71%> (+0.06%) ⬆️
server-postgres 67.69% <85.71%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ankush ankush merged commit 49437f5 into frappe:develop Dec 8, 2022
@ankush ankush deleted the lock_site_specific_actions branch December 8, 2022 07:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: Site level Operation locking
1 participant