Closed pkalita-lbl closed 8 months ago
@ssarrafan can we talk about this at infrastructure sync
I'm going to take a look at this now. It looks like creating a new submission has similar issues. I did not see this locally during development.
First I'm going to take a dump of dev postgres (I think we keep backups of dev) and restore locally, and see if I can spot the issue.
First I'm going to take a dump of dev postgres (I think we keep backups of dev) and restore locally, and see if I can spot the issue.
I don't see any backups for dev, so I grabbed the prod backup from this morning (2024-02-22). I was able to restore it with ~75 submissions and migrate it so that its on the same version as dev.
I'm able to recreate the issue locally. So far I've restored the backup, as previously mentioned, and set my current user as an "admin."
It looks like using **submission.__dict__
is unreliable, so my proposed solution will be to pass explicit parameters to the constructor.
Currently in dev there is a backend error when trying to open any submission. The proximate cause is failing request to the
GET /api/metadata_submission/{id}
endpoint. For example: https://data-dev.microbiomedata.org/api/metadata_submission/b59b627c-1fb6-47d8-8e12-34f53f2647d1.The error reported on the backend looks like this:
I believe the root of the issue is that this attempt to convert a
SubmissionMetadata
object to a dict returns an empty dict (except for some SQLAlchemy metadata): https://github.com/microbiomedata/nmdc-server/blob/806c82479eb384cf0972b538e2b02fabc2a61518/nmdc_server/api.py#L637Introduced in https://github.com/microbiomedata/nmdc-server/pull/1132