-
Notifications
You must be signed in to change notification settings - Fork 171
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
Handle missing harvest source without mass un-publishing all content from the source. #2829
Conversation
This PR will prevent all orphaning from happening, so isn't quite there yet. What we need to do is have the orphan function skip only if the source is missing. This means: Ideally, if caching fails, the cache for this source should some how be flagged to be in a failed state, which would cause HarvestMigrate::processImport() to return FALSE, and therefore skip all postMigrate functionality. Another option would be to simply have processImport() return FALSE whenever the cache is empty, which would include instances where a filter had removed all datasets. This would be less than ideal because presumably if a filter were to filter out all datasets from a source, orphaning everything would be the desired behavior. |
f51bedd
to
dc8b4c0
Compare
@dafeder Fixed! this version will now allow normal orphaning when needed. |
…from the source. (#2829) * Avoid postImport steps if the harvest source uri is unavailable * Adjust warning message * Replace file_get_contents with cURL in dkan_harvest_datajson_cache * clean up * Fixed failing phpunit tests. * Fixed test harvest sources to use http. * Fixed coding standards.
…from the source. (#2829) * Avoid postImport steps if the harvest source uri is unavailable * Adjust warning message * Replace file_get_contents with cURL in dkan_harvest_datajson_cache * clean up * Fixed failing phpunit tests. * Fixed test harvest sources to use http. * Fixed coding standards.
connects #2824
When a harvest source is temporarily unavailable, all content from that harvest is unpublished and marked as 'orphaned'. On large harvests this can mean huge amounts of unnecessary processing that fails to finish before the next harvest and the source is available again.
Let's instead just leave the content as-is. If the source is truly gone, the catalog maintainer can delete the content via the Harvest UI.
QA Steps
missing source
Actual change in the source
Reminders