Extra validation of the uploaded ZIP #73

Merged
Anna Sirota merged 13 commits from validation-single-theme-xml into main 2024-04-11 12:32:50 +02:00
Owner

Part of #70 and should cover the following list:

  • Surface the errors from the .zip extraction code (read_manifest_from_zip)
  • Check for __init__.py when the .zip contains a folder.
  • Allow only a single theme (.xml) per .zip

What changed

The following is now reported as validation errors on extension archive upload:

  • missing manifest file
  • manifest file nested deeper than one level inside the archive
  • invalid TOML inside the manifest file
  • extension-type specific:
    • add-on missing a __init__.py file
    • theme having multiple XML files instead only one

one

two

Part of https://projects.blender.org/infrastructure/extensions-website/issues/70 and should cover the following list: - [x] Surface the errors from the .zip extraction code (read_manifest_from_zip) - [x] Check for `__init__.py` when the .zip contains a folder. - [x] Allow only a single theme (.xml) per .zip ### What changed The following is now reported as validation errors on extension archive upload: * missing manifest file * manifest file nested deeper than one level inside the archive * invalid TOML inside the manifest file * extension-type specific: * add-on missing a `__init__.py` file * theme having multiple XML files instead only one ![one](https://projects.blender.org/attachments/c501095e-f8d2-4425-8d92-a8c74afe5f96) ![two](https://projects.blender.org/attachments/f73fe47b-f390-416e-bbf3-ae9686e5cfc0)
Anna Sirota added the
Type
Enhancement
label 2024-04-08 19:27:14 +02:00
Anna Sirota added 2 commits 2024-04-08 19:27:16 +02:00
Anna Sirota added 1 commit 2024-04-09 10:25:13 +02:00
Anna Sirota added 1 commit 2024-04-09 18:55:40 +02:00
Anna Sirota added 1 commit 2024-04-09 18:55:56 +02:00
Anna Sirota added 1 commit 2024-04-09 19:06:57 +02:00
Anna Sirota added 1 commit 2024-04-09 19:23:18 +02:00
Anna Sirota added 2 commits 2024-04-11 11:26:03 +02:00
Anna Sirota added 1 commit 2024-04-11 11:52:11 +02:00
Anna Sirota added 1 commit 2024-04-11 12:07:37 +02:00
Anna Sirota added 1 commit 2024-04-11 12:26:12 +02:00
Anna Sirota added 1 commit 2024-04-11 12:27:55 +02:00
Anna Sirota changed title from WIP: Extra validation of the uploaded ZIP to Extra validation of the uploaded ZIP 2024-04-11 12:28:37 +02:00
Oleg-Komarov approved these changes 2024-04-11 12:31:27 +02:00
Anna Sirota merged commit 80e72abae4 into main 2024-04-11 12:32:50 +02:00
Anna Sirota deleted branch validation-single-theme-xml 2024-04-11 12:32:50 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/extensions-website#73
No description provided.