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 organisation import #8

Open
florianm opened this issue Sep 1, 2022 · 0 comments
Open

Fix organisation import #8

florianm opened this issue Sep 1, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@florianm
Copy link
Contributor

florianm commented Sep 1, 2022

Question re ckanapi and ckanext-hierarchy: I'm trying to migrate organizations with a hierarchy and am getting server errors when migrating.

ckanapi dump organizations --all -O organizations.jsonl.gz -z -p 4 -r OLDSITE
ckanapi load organizations -I organizations.jsonl.gz -z -p 1 -r NEWSITE -a $APIKEY

I've tried with and without compression, single process on restore (to avoid missing parent orgs), disabling the hierarchy plugin. I can create orgs through the GUI just fine.

The server trips at no_loops_in_hierarchy:

'''Checks that the parent groups specified in the data would not cause
a loop in the group hierarchy, and therefore cause the recursion up/down
the hierarchy to get into an infinite loop.
'''

Since the data causing this is production data I'm confused how it would be fine on the old instance, but throw this problem in the new instance.

See also https://datawagovau.readthedocs.io/en/latest/disaster-recovery.html

Possible problem: orgs reference now deleted duplicate user profiles? approach: modify organizations.jsonl to exclude user dict, e.g. using jq.

@florianm florianm added the help wanted Extra attention is needed label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant