-
Notifications
You must be signed in to change notification settings - Fork 1
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/handle error deleting old resource #138
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bellisk
force-pushed
the
feat/handle-error-deleting-old-resource
branch
from
December 2, 2024 13:59
a1d6baf
to
b0e90ea
Compare
bellisk
force-pushed
the
feat/handle-error-deleting-old-resource
branch
from
December 2, 2024 14:08
b0e90ea
to
e96a8ca
Compare
This is necessary if we are calling this helper while not actually in a request context.
If we get into a state where we have duplicate resources for the same filename (e.g. because we created a new resource for the filename but deleting the old resource failed), we must not delete resources by filename in the finalize step! If we do, we will delete both the new and the old resource for the filename. This method is already a lot simpler than it used to be, since CKAN no longer stores lots of old versions of resources in the database, so it's safe to change it to delete resources by id.
This will also clean up the filestore of old versions of files that are otherwise not cleaned up.
bellisk
commented
Dec 2, 2024
bellisk
commented
Dec 2, 2024
stefina
approved these changes
Dec 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.