`ReviewQueued` status breaks `revisions` output

Bug #1936247 reported by Michał Sawicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Undecided
Unassigned

Bug Description

 snapcraft revisions multipass
Sorry, an error occurred in Snapcraft:
'ReviewQueued' is not one of ['Published', 'Unpublished', 'ManualReviewPending', 'NeedsInformation', 'AutomaticallyRejected', 'Rejected', 'ReviewInProgress']

Failed validating 'enum' in schema['properties']['revisions']['items']['properties']['status']:
    {'enum': ['Published',
              'Unpublished',
              'ManualReviewPending',
              'NeedsInformation',
              'AutomaticallyRejected',
              'Rejected',
              'ReviewInProgress'],
     'introduced_at': 1,
     'type': 'string'}

On instance['revisions'][0]['status']:
    'ReviewQueued'
Traceback (most recent call last):
  File "/opt/homebrew/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/snapcraft/cli/store.py", line 572, in list_revisions
    releases = StoreClientCLI().get_snap_releases(snap_name=snap_name)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/snapcraft/_store.py", line 260, in login_decorator
    return method(self, *args, **kwargs)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/snapcraft/_store.py", line 326, in get_snap_releases
    return super().get_snap_releases(snap_name=snap_name)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/snapcraft/storeapi/_store_client.py", line 193, in get_snap_releases
    return self.dashboard.get_snap_releases(snap_name=snap_name)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/snapcraft/storeapi/_dashboard_api.py", line 358, in get_snap_releases
    return releases.Releases.unmarshal(response.json())
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/snapcraft/storeapi/v2/releases.py", line 167, in unmarshal
    jsonschema.validate(payload, RELEASES_JSONSCHEMA)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/jsonschema/validators.py", line 478, in validate
    cls(schema, *args, **kwargs).validate(instance)
  File "/opt/homebrew/Cellar/snapcraft/4.8.3/libexec/lib/python3.9/site-packages/jsonschema/validators.py", line 123, in validate
    raise error
jsonschema.exceptions.ValidationError: 'ReviewQueued' is not one of ['Published', 'Unpublished', 'ManualReviewPending', 'NeedsInformation', 'AutomaticallyRejected', 'Rejected', 'ReviewInProgress']

Failed validating 'enum' in schema['properties']['revisions']['items']['properties']['status']:
    {'enum': ['Published',
              'Unpublished',
              'ManualReviewPending',
              'NeedsInformation',
              'AutomaticallyRejected',
              'Rejected',
              'ReviewInProgress'],
     'introduced_at': 1,
     'type': 'string'}

On instance['revisions'][0]['status']:
    'ReviewQueued'
We would appreciate it if you created a bug report at
https://launchpad.net/snapcraft/+filebug with the above text included.
You can find the traceback in file '/var/folders/0t/qk5ggp0d3ggf2qmmzbcf79n80000gn/T/tmpjk4qxp4k/trace.txt'.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Fixed in Snapcraft 5.0

Changed in snapcraft:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.