Skip to content

Faster dataset metadata updates with package_update #8407

@wardi

Description

@wardi

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions