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

Fix batch deleting multiple files #7357

Merged
merged 2 commits into from
Jul 28, 2022
Merged

Fix batch deleting multiple files #7357

merged 2 commits into from
Jul 28, 2022

Conversation

JammingBen
Copy link
Contributor

Description

We've fixed a bug where deleting many files in a batch action would fail.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@JammingBen JammingBen self-assigned this Jul 27, 2022
@JammingBen
Copy link
Contributor Author

This PR introduces two new methods in the store: REMOVE_FILES and REMOVE_FILES_FROM_SEARCHED. They basically exist twice now: for a single file and for multiple files. Do we keep it that way? Do we remove the usages of REMOVE_FILE and REMOVE_FILE_FROM_SEARCHED to always use the "multi" methods? Or do we wrap the "single" methods to also use the "multi" methods? Any opinions @kulmann ?

@tbsbdr This PR allows deleting 1000 selected files. However, it takes quite some time of course. Maybe a loading spinner somewhere (tm) would be nice in the future?

@kulmann
Copy link
Member

kulmann commented Jul 27, 2022

This PR introduces two new methods in the store: REMOVE_FILES and REMOVE_FILES_FROM_SEARCHED. They basically exist twice now: for a single file and for multiple files. Do we keep it that way? Do we remove the usages of REMOVE_FILE and REMOVE_FILE_FROM_SEARCHED to always use the "multi" methods? Or do we wrap the "single" methods to also use the "multi" methods? Any opinions @kulmann ?

Would prefer to use the multi-mutations for single items as well (just pass the single items in an array then).

@tbsbdr This PR allows deleting 1000 selected files. However, it takes quite some time of course. Maybe a loading spinner somewhere (tm) would be nice in the future?

"The future" should do it entirely in background and with a progress indication like for uploads. E.g. "Deleting 978 files" with an indeterminate progress bar as a start.

@sonarcloud
Copy link

sonarcloud bot commented Jul 28, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

7.7% 7.7% Coverage
38.5% 38.5% Duplication

@JammingBen JammingBen marked this pull request as ready for review July 28, 2022 07:47
Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@kulmann kulmann merged commit fb16e4f into master Jul 28, 2022
@delete-merged-branch delete-merged-branch bot deleted the batch-delete-performance branch July 28, 2022 07:58
@micbar micbar mentioned this pull request Aug 11, 2022
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batch-Delete of > 22 files fails
2 participants