← Back to issue list

Fix revision type in `edit-validation-sets`

View original Github issue

Metadata

Project
snapcraft
Number
#4909
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #4928 (commit feed34eba), correcting validation-set API field types. Released in Snapcraft 8.3.2 to latest/stable and 8.x/stable.

Resolution: closed resolved

Reason: PR #4928 migrated validation-set models to Pydantic and corrected revision types sent to the Store API, explicitly resolving #4909. The maintainer confirmed the fix shipped in Snapcraft 8.3.2.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### 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

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #4928 (commit feed34eba), correcting validation-set API field types. Released in Snapcraft 8.3.2 to latest/stable and 8.x/stable.
stealth/space-bunny-alpha — closed resolved Validation-set snap revision handling was fixed in Snapcraft 8.3.2 and released to latest/stable and 8.x/stable.
stealth/space-bunny-alpha — closed resolved Fixed edit-validation-sets sending snap revisions with the wrong type; shipped in Snapcraft 8.3.2 and released to latest/stable and 8.x/stable.
qwen/qwen3.6-35b-a3b — — Fixed a type mismatch where snap revisions were sent as strings instead of integers, causing validation set assertion build failures. Resolved in snapcraft 8.3.2 and released to latest/stable and 8.x/stable channels.
qwen/qwen3.6-35b-a3b — — Resolved a type mismatch for snap revisions in validation set API calls. Fixed in snapcraft 8.3.2 and released to latest/stable and 8.x/stable channels.
qwen/qwen3.6-35b-a3b — — Fixed a type mismatch where snap revisions were passed as strings instead of integers during validation set API calls, causing assertion build failures. Resolved in snapcraft 8.3.2 and released to latest/stable and 8.x/stable channels.
qwen3.6-35b-a3b-mtp-q6 — — Fixed type mismatch for snap revisions in validation set API calls. Resolved in snapcraft 8.3.2 and released to latest/stable and 8.x/stable channels.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#4928 (confidence 99%)

    Merged PR containing the validation-set model and API type corrections in commit feed34eba.

Related issues

Issue Project State Summary Similarity
#4928 fix: use correct types for validation set models snapcraft merged Merged #4928 switched validation-set models to Pydantic and corrected API types, fixing #4909. The change also made the boilerplate validation set valid and shipped in Snapcraft 8.3.2.
73%