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

Resolve all asset types being evaluated during upload validation #1818

Closed
wants to merge 11 commits into from

Conversation

aaronkanzer
Copy link
Member

@aaronkanzer aaronkanzer commented Jan 22, 2024

Relates to /linc-archive/pull/34 and #1814

During validation of zarr based datasets, a validation check occurs on the assetSummary field in the dandiset.yaml

Prior to this PR, the only "assets" evaluated were "blob". In the query that is updated in this PR, the checks for size are expanded to not just blob but other "asset" types within the Asset model -- see link below:

blob = models.ForeignKey(
AssetBlob, related_name='assets', on_delete=models.CASCADE, null=True, blank=True
)
embargoed_blob = models.ForeignKey(
EmbargoedAssetBlob, related_name='assets', on_delete=models.CASCADE, null=True, blank=True
)
zarr = models.ForeignKey(
'zarr.ZarrArchive', related_name='assets', on_delete=models.CASCADE, null=True, blank=True
)

Prior to the fix in this PR, the following validation would fail on assets in dandischema such as zarr: https://github.com/dandi/dandi-schema/blob/bdb7dd681435f1092814041eb01eb4fabe87bf57/dandischema/models.py#L1497

@aaronkanzer aaronkanzer changed the title Resolve all asset types being evaluated during upload validation Draft: Resolve all asset types being evaluated during upload validation Jan 22, 2024
@yarikoptic
Copy link
Member

if it is a "Draft:" should it better be a "Draft"?
image

@aaronkanzer aaronkanzer marked this pull request as draft January 25, 2024 14:31
@aaronkanzer
Copy link
Member Author

if it is a "Draft:" should it better be a "Draft"? image

@yarikoptic Moved to draft -- going to blame lack of coffee on my side for not making this initially a draft 😄

@waxlamp waxlamp self-assigned this Sep 10, 2024
@aaronkanzer aaronkanzer marked this pull request as ready for review October 30, 2024 13:13
@aaronkanzer
Copy link
Member Author

aaronkanzer commented Oct 30, 2024

Cc @jwodder @yarikoptic @waxlamp -- since I'm submitting via a fork, I don't think that the GitHub Actions pipeline for cli-integration has access to the env vars needed for proper testing with Docker

@aaronkanzer aaronkanzer changed the title Draft: Resolve all asset types being evaluated during upload validation Resolve all asset types being evaluated during upload validation Oct 30, 2024
@yarikoptic
Copy link
Member

@aaronkanzer I have added you to the @dandi/dandiarchive team, so you should be able to push a branch to this fork for a PR to gain access to all the secrets. Please resubmit this PR

@aaronkanzer
Copy link
Member Author

Closing to move code to: #2062

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