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

[7415]Resource does not refresh the format #7466

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

TomeCirun
Copy link
Contributor

Fixes #7415

Proposed fixes:

more info soon..

Features:

  • includes tests covering changes
  • includes updated documentation
  • includes user-visible changes
  • includes API changes
  • includes bugfix for possible backport

Please [X] all the boxes above that apply

@TomeCirun
Copy link
Contributor Author

Hello @amercader , I've added and tested the same logic as a schema validator, attached to default_update_package_schema, the problem with this approach is, it will also trigger the validator when we create the resource, plus with this approach, if we had let's say 10 resources, it will call the validator precisely 10 times.

That's why I found this solution to be more suitable, as it's going to call only once when we update the resource.

Let me know your opinion on this, I will also add tests and will do the same for the resource name if you agree.

@wardi
Copy link
Contributor

wardi commented Mar 21, 2023

There are multiple ways a resource can be uploaded or a url changed without going through resource_update including:

  • package_update
  • package_patch
  • package_revise

So an approach using a validator as part of the schema makes more sense (sites can also override the logic easily this way)

Regarding update performance, this is a known issue for datasets with many resources. We can fix this by making package_update smarter, this way it will be solved for all resource fields and all API calls not just this one field and endpoint.

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.

Replacing a file in an existing resource does not refresh the format
2 participants