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

Properly handle conflicting asset paths #1368

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

jjnesbitt
Copy link
Member

@jjnesbitt jjnesbitt commented Nov 15, 2022

Closes #1109

@danlamanna
Copy link
Contributor

Adding reference to #1109.

I think this is a problem with the paths of assets, not asset paths, right 😕? I think the validation should occur outside of asset_paths, ideally in add_asset_to_version next to the duplicate asset path check. Otherwise the asset_paths code is responsible for some portions of asset/version validation in addition to creating a performant data structure for asset lookups. I'm not as familiar with this code though so let me know if I got something wrong.

@jjnesbitt
Copy link
Member Author

I think this is a problem with the paths of assets, not asset paths, right confused? I think the validation should occur outside of asset_paths, ideally in add_asset_to_version next to the duplicate asset path check. Otherwise the asset_paths code is responsible for some portions of asset/version validation in addition to creating a performant data structure for asset lookups. I'm not as familiar with this code though so let me know if I got something wrong.

Good point, I think it probably is best if the error is raised in add_asset_to_version, although I think the best way to perform such a check would be to use the asset paths model, via some utility function.

@jjnesbitt jjnesbitt marked this pull request as ready for review November 16, 2022 19:24
@jjnesbitt jjnesbitt merged commit 6f2276d into master Nov 16, 2022
@jjnesbitt jjnesbitt deleted the 1109-conflicting-asset-paths branch November 16, 2022 20:34
@dandibot
Copy link
Member

🚀 PR was released in v0.3.2 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Archive allows the same asset path to be both a directory and a file
3 participants