canonical / snapcraft

Package, distribute, and update any app for Linux and IoT.
https://snapcraft.io
GNU General Public License v3.0
1.18k stars 440 forks source link

Fix revision type in `edit-validation-sets` #4909

Closed mr-cal closed 3 weeks ago

mr-cal commented 1 month ago

What needs to get done

  1. Work with the store team to create or get access to a brand store
    • If possible, this should be documented
  2. Test editing validation sets with snap revisions
  3. Update unit tests to include snap revisions
  4. Fix the problem by using the correct types (strings or ints) for each API call

Why it needs to get done

Validation sets with snap revisions fail when building the assertion with the error:

Issues encountered with validation set: '123' is not of type 'integer' at /snaps/0/revision

This may occur because when editing a validation set, Snapcraft makes the API calls:

  1. GET /api/v2/validation-sets where snaps.revision is a string in the response
  2. POST /api/v2/validation-sets/build-assertion where snaps.revision is an integer in the request but a string in the response
  3. POST /api/v2/validation-sets where snaps.revision is a string in the request

Looks like it's failing on step #2 where it sends a string instead of an int

source: https://dashboard.snapcraft.io/docs/reference/v2/en/validation-sets.html

syncronize-issues-to-jira[bot] commented 1 month ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3103.

This message was autogenerated

mr-cal commented 2 weeks ago

This is fixed in snapcraft 8.3.2 and is available in latest/stable and 8.x/stable