-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Building on performance improvements in #8360:
We can define the dataset fields on which resource validation may depend so we can skip validation and dictization of all resources when only other dataset fields change. This will significantly improve performance of package_update
for datasets with many resources when editing dataset fields.
Let's add a resource_validation_dependencies
method to IDatasetForm that will allow plugins like ckanext-scheming
to return a list of dataset field names that may affect resource validation. The default would be an empty list, but for the upcoming ckan/ckanext-scheming#418 the list would include 'state'
so that dataset state changes can enforce/skip required checks on fields in resources.
Let's also formalize updating dataset metadata without changing resources when a user does not pass a resources
list to package_update
. Currently this is only possible from the UI with a partial_update
context parameter. There's no reason to limit this functionality to internal users.