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

[DAR-4305][External] Cancel push operations if there are no valid files to upload, and correctly remove invalid files #944

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

JBWilkie
Copy link
Collaborator

@JBWilkie JBWilkie commented Oct 11, 2024

Problem

There are 2 minor issues that were released with multi-file push in 1.0.10:

  • When pruning files to upload based on the full filepaths currently in the dataset - If we remove any multi-file items, we don't correctly remove the corresponding LocalFile objects. This leads to duplicate warnings
  • If after pruning files to upload, there are no files left - The importer should stop and display this to the user. Currently it continues then displays:
All 0 files have been successfully uploaded.

Solution

  • Only display a warning for each LocalFile to be removed if it hasn't already been added to the list of local files to be removed as a result of being tied to a MultiFileItem
  • Raise a ValueError if there are no MultiFileItem or LocalFile objects left to upload after pruning

Changelog

Improved error messaging when attempting to upload duplicate files

@JBWilkie JBWilkie merged commit 27c2fde into master Oct 23, 2024
24 checks passed
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.

3 participants