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

Fix JsonPath error on dkan:datastore:drop-all #4098

Merged
merged 2 commits into from Jan 22, 2024
Merged

Conversation

paul-m
Copy link
Contributor

@paul-m paul-m commented Jan 18, 2024

The RootedJsonData query was somehow wrong in this instance. Fixing that is not so hard.

Using the sample content, we also encounter the "Market Value Analysis - Urban Redevelopment Authority" dataset, which does not have distributions that can be imported into the database... Since drop-all now works, it tries to drop non-existent datastores, which halts all progress.

So now dkan:datastore:drop (not drop-all) will catch these exceptions and report them as warnings.

Here's your set of QA commands:

ddev dkan-site-install
ddev drush pm-enable sample_content
ddev drush dkan:sample-content:create
ddev drush cron
ddev drush cron
ddev drush dkan:datastore:drop-all

This should all happen without error, but with warnings for three of the datasets:

 [notice] Successfully dropped the datastore for resource 3a187a87dc6cd47c48b6b4c4785224b7
 [notice] Successfully removed the post import job status for resource 3a187a87dc6cd47c48b6b4c4785224b7
 [warning] Unable to drop datastore for ad62ad1179fa1b0e44c8b9226c2266a8
 [notice] Successfully removed the post import job status for resource ad62ad1179fa1b0e44c8b9226c2266a8
 [warning] Unable to drop datastore for 9f076e2af8927b72db5cf0e05e8cd5f2
 [notice] Successfully removed the post import job status for resource 9f076e2af8927b72db5cf0e05e8cd5f2
 [warning] Unable to drop datastore for 60d78924087b2516acf1e57ff1fc8b83
....etc

@paul-m paul-m marked this pull request as ready for review January 19, 2024 19:14
@janette janette merged commit 4f0b993 into 2.x Jan 22, 2024
12 checks passed
@janette janette deleted the 18563-dropall-jsonpath branch January 22, 2024 18:06
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.

None yet

2 participants