mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
127 stars 41 forks source link

Submission failure for invalid object value in manifest #1876

Open wagnerand opened 2 years ago

wagnerand commented 2 years ago
Unhandled error during validation: ValidationError(['Could not parse the manifest file.'])

AttributeError
'list' object has no attribute 'get'

(https://sentry.prod.mozaws.net/operations/olympia-prod/issues/19461815/?environment=production, olympia/files/utils.py in gecko at line 235: return parent_block.get('gecko', {}))

Relevant manifest part:

    "applications": [
        {
            "gecko": {
                "id": "3474703a-f185-44ef-91ce-06cdcad72311"
            }
        }
    ]

(object holding the gecko key is wrapped in an array)

┆Issue is synchronized with this Jira Task

diox commented 2 years ago

On Matrix:

it is interesting that we are parsing the manifest before the validation tasks

these days we don't have to, we could probably refactor that away historically we needed it to see what kind of validation to run (when we supported XUL themes, search engines, things that didn't use the linter...) also, we could catch exceptions like these and raise InvalidManifest - that would skip that step and we'd see the linter error - just gotta be careful and ensure that it only happens for things the linter would reject

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-92