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

Do re-validate dandisets upon dandischema upgrade #2024

Open
yarikoptic opened this issue Sep 5, 2024 · 1 comment
Open

Do re-validate dandisets upon dandischema upgrade #2024

yarikoptic opened this issue Sep 5, 2024 · 1 comment
Labels
bug Something isn't working metadata Issues of dandiset/asset metadata handling UX Affects usability of the system

Comments

@yarikoptic
Copy link
Member

yarikoptic commented Sep 5, 2024

Follow up to

I think we should revalidate all draft versions of the dandisets upon dandischema upgrade.

E.g. a use-case. Since PR dandi/dandi-schema#235 released in version 0.10.2 (Wed Jul 10 2024) of dandi-schema we require contactPerson to have an email address, and that was also part of the schema-0.6.8 release. That is the version we currently use for dandi-archive:

❯ curl --silent -X 'GET' 'https://api.dandiarchive.org/api/info/' -H 'accept: application/json' | jq .schema_version
"0.6.8"

But we did not revalidate the dandisets. And now even for Draft version there is no warning that current Draft version is not "valid" even if there is no email for contact person, as it is currently the case in sample https://dandiarchive.org/dandiset/000003/draft :

image

And that page, lacking warnings, suggests that we can publish a new version (with invalid metadata).

If I trigger re-validation through edition of the metadata (did it on staging on some test dandiset we had around), it does then report an error and prevents publishing

image

So, I think it should be a job ran on start of dandi-archive which would somehow assess what version of dandi-schema was used in prior run, and if updated -- trigger revalidation of all draft versions of dandisets.

edit: here you can see the full list of dandisets, what state in DB we have recorded them and either we do or not have pydantic errors for them: https://github.com/dandi/dandisets-linkml-status/blob/main/dandi-reports/summary.md . E.g.
image

@yarikoptic yarikoptic added UX Affects usability of the system DX Affects developer experience metadata Issues of dandiset/asset metadata handling labels Sep 5, 2024
@waxlamp waxlamp added bug Something isn't working and removed DX Affects developer experience labels Sep 20, 2024
@waxlamp
Copy link
Member

waxlamp commented Sep 20, 2024

Definitely a problem. We'll need to update the procedures for when the schema is updated and redeployed (as you suggest).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working metadata Issues of dandiset/asset metadata handling UX Affects usability of the system
Projects
None yet
Development

No branches or pull requests

2 participants