thunderstore-io / Thunderstore

Thunderstore is a mod database and API for downloading mods. Thunderstore Discord: https://discord.thunderstore.io/
https://thunderstore.io/
GNU Affero General Public License v3.0
127 stars 28 forks source link

Import package installers from ecosystem schema #1014

Closed MythicManiac closed 6 months ago

MythicManiac commented 6 months ago

Add support for importing package installer definitions from the ecosystem schema.

Additionally, add some metadata fields to the PackageInstaller model which will be available in the ecosystem schema.

codecov[bot] commented 6 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (b25120b) 92.91% compared to head (7a20c67) 92.93%.

Files Patch % Lines
django/thunderstore/schema_import/sync.py 95.45% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## installers-field #1014 +/- ## ==================================================== + Coverage 92.91% 92.93% +0.01% ==================================================== Files 314 314 Lines 9009 9044 +35 Branches 799 804 +5 ==================================================== + Hits 8371 8405 +34 Misses 530 530 - Partials 108 109 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MythicManiac commented 6 months ago

Why do we want to continue on exceptions, though?

Because the imported data is not relational to everything else in the file, meaning that if importing object A fails, importing object B can still be attempted. otherwise any error anywhere in the schema would block the entire process until someone fixes it. The entities in the schema could very well be their own documents each & can be processed as such, they're just in a single blob for convenience.