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

feat(directory): publish studies #4511

Merged
merged 7 commits into from
Dec 5, 2024
Merged

Conversation

dtroelofsprins
Copy link
Contributor

What are the main changes you did

  • included the studies table in the publish steps
  • included a .env_example file

How to test

  • Create two schemas, one based on BIOBANK_DIRECTORY template and one on BIOBANK_DIRECTORY_STAGING template and include demo data on a server and test it using dev.py

Copy link
Member

@esthervanenckevort esthervanenckevort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look fine to me, but I'm not able to test it, so should await a review from Hessel before merging.

Copy link
Contributor

@hslh hslh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publishing local nodes fails with the following error:

💾 Saving new and updated data to Directory tables
INFO:Molgenis EMX2 Pyclient:200
INFO:Molgenis EMX2 Pyclient:Import from store for 39ms
INFO:Molgenis EMX2 Pyclient: Imported 7 Persons in 13ms (538 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 3 AlsoKnownIn in 16ms (187 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 3 Networks in 17ms (176 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 2 Biobanks in 12ms (166 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 1 Studies in 8ms (125 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 3 Collections in 33ms (90 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 108 CollectionFacts in 96ms (1125 items/sec)
INFO:Molgenis EMX2 Pyclient:Committing for 8ms
INFO:Molgenis EMX2 Pyclient:Completed task: Import csv file in 230ms
🧼 Cleaning up removed data in Directory tables
Deleting 1 row(s) in Studies
INFO:Molgenis EMX2 Pyclient:Deleted data from test-4511::Studies.
⚠️ ID bbmri-eric:studyID:DE_112233 is deleted
Deleting 1 row(s) in AlsoKnownIn
INFO:Molgenis EMX2 Pyclient:Deleted data from test-4511::AlsoKnownIn.
⚠️ ID bbmri-eric:akiID:DE_00002 is deleted
Deleting 2 row(s) in Persons
ERROR:Molgenis EMX2 Pyclient:Delete into table Persons failed: Transaction failed: update or delete on table "Persons" violates foreign key constraint "Services.contactInformation REFERENCES Persons" on table "Services". Details: Key (id)=(bbmri-eric:contactID:contact_bb1) is still referenced from table "Services".

Staging an external node fails with this error:

🌍 Node NL (Netherlands)
📥 Staging data of node NL
📦 Retrieving node's data from https://bbmri-emx2-test.molgeniscloud.org/
🔥 Clearing staging area of NL
ERROR:Molgenis EMX2 Pyclient:Delete into table Studies failed: Transaction failed: delete on table "Studies" violates foreign key constraint. Details: Key ("id")=(bbmri-eric:studyID:NL_112233) is still referenced from table "Collections", column(s)("studies")

Copy link
Contributor

@hslh hslh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Staging from an external node now works, but this error persists:

🎁 Publishing nodes
💾 Saving new and updated data to Directory tables
INFO:Molgenis EMX2 Pyclient:200
INFO:Molgenis EMX2 Pyclient:Import from store for 11ms
INFO:Molgenis EMX2 Pyclient: Imported 7 Persons in 11ms (636 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 3 AlsoKnownIn in 6ms (500 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 3 Networks in 5ms (600 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 2 Biobanks in 6ms (333 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 1 Studies in 5ms (200 items/sec)
INFO:Molgenis EMX2 Pyclient: Imported 3 Collections in 15ms (200 items/sec)
INFO:Molgenis EMX2 Pyclient:Completed task: Import csv file in 175ms
🧼 Cleaning up removed data in Directory tables
Deleting 3 row(s) in Persons
ERROR:Molgenis EMX2 Pyclient:Delete into table Persons failed: Transaction failed: update or delete on table "Persons" violates foreign key constraint "Services.contactInformation REFERENCES Persons" on table "Services". Details: Key (id)=(bbmri-eric:contactID:contact_bb1) is still referenced from table "Services".

Copy link
Contributor

@hslh hslh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that is only a problem when using it with demo data, I assume?

@dtroelofsprins
Copy link
Contributor Author

But that is only a problem when using it with demo data, I assume?

True

Copy link

sonarqubecloud bot commented Dec 4, 2024

@dtroelofsprins dtroelofsprins merged commit da56d5c into master Dec 5, 2024
7 checks passed
@dtroelofsprins dtroelofsprins deleted the chore/publish-studies branch December 5, 2024 05:42
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.

3 participants