-
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
Clean Datastore Tables Job #67
Clean Datastore Tables Job #67
Conversation
- Added config option `clean_datastore_tables`. - Added job to delete datastore tables from unsupported formats.
…ported-datastore-tables # Conflicts: # requirements.txt ### RESOLVED.
- Used `get_action` from toolkit instead of ckanapi dependency. - Reworked some coe to make it more gooder. - Removed `url_changed` check.
- Removed `ckanapi` import.
- Better logging. - Added `asbool` for `datastore_active` checks.
- Added falsy check for `url_type`.
- Removed `lower` call in logging. - Fixed falsy check on `url_type`.
@ThrawnCA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem like this should be working code, but we all would be more confident if some tests were added.
Reviewing what you are wanting. I was thought experimenting if this logic could live inside the 'ckanext-datastore' since its about 'cleanup' of said data stores. Sadly a quick look through said codebase, it does not cover the hooks required for this nor has the ability to know what formats we allow to ingest in a common bases between datapusher/xloader.
This might help in getting your discrete tests on this function without needing to also test the xloader 'is file supported' function.
|
Develop to master - add button to delete datastore table
Develop to master - restrict lock timeout to prevent deadlocks
Develop to master - handle lock conflicts more robustly
- Syntax fixes from flake8.
…ported-datastore-tables # Conflicts: # ckanext/xloader/plugin.py ### RESOLVED.
- Added new test for should remove unsupported resources from datastore.
@duttonw @ThrawnCA okay got those automated tests in now. Thanks so much for giving me the code! My python knowledge would have never gotten there hahaha. I did add in the As for the greedy-ness of this functionality, I think it is kind of greedy in general to trash datastore tables if the Resource Format changes. But users can always just re-upload to the datastore if they need to |
- Finalized fixtures and params for new test method.
- Also move the test case documentation alongside the test data so cases can be added or removed in just one place
…ported-datastore-tables replace complex indirect fixtures with simple 'with' blocks
feat(jobs): added job to delete datastore tables;
clean_datastore_tables
.This adds the possible feature (controlled by config option) to delete datastore tables for unsupported formats. This is useful in the case that a user updates a Resource to no longer be a datastore resource, but the tables remain. So this helps keep the size of the datastore database down a bit
See: ckan#196