← Back to issue list

edit-validation-sets makes it impossible to publish a new revision of an existing sequence (no override)

View original Github issue

Metadata

Project
snapcraft
Number
#6413
Type
issue
State
closed
Author
bugraaydogar
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Regression where edit-validation-sets hard-blocked same-sequence revisions was fixed by merged PR #6420 (commit 2989b5f8b), restoring the non-blocking sequence warning from PR #5545 lost in the #6050 refactor.

Resolution: closed resolved

Reason: Maintainer mr-cal confirmed the non-blocking-warning behaviour had regressed when PR #6050 migrated validation sets to a service. PR #6420 ('fix: allow same-sequence validation set revisions', merged as commit 2989b5f8b) restored the PR #5545 behaviour and closed the issue; tracked internally as SNAPCRAFT-1378.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description When editing an existing validation set, snapcraft hard-requires new_sequence > old_sequence logic. There is no flag or confirmation path to proceed with the same sequence. This blocks a legitimate, store-supported operation: publishing a new revision of an existing sequence ### Steps to reproduce 1. Have a validation set at sequence 1 (e.g. snapd revision 27710). 2. snapcraft edit-validation-sets <account-id> <name> 1 --key-name <key> 3. Change only the snap revision (27738), keep sequence: 1, save. 4. Result: ``` bugra.aydogar@canonical.com@lenovo:~/work/$ snapcraft edit-validation-sets id name 1 --key-name key Warning: The sequence number was not incremented. This prevents automatic reversions to a valid state in the case of invalid changes or snap refresh failures. Do you wish to amend the validation-set? [y/N]: N operation aborted Full execution log: '/home/bugra.aydogar@canonical.com/.local/state/snapcraft/log/snapcraft-20260903-182929.997437.log' bugra.aydogar@canonical.com@lenovo:~/work/$ ``` ### Environment We need to understand the context in which Snapcraft failed. Please let us know if you are running Snapcraft in destructive mode, whether you are using LXD or Multipass, and which operating system you are running Snapcraft on. ### snapcraft.yaml ```yaml ``` ### Log output ```shell 2026-09-03 18:29:29.998 Starting snapcraft, version 9.1.0.post7 2026-09-03 18:29:29.999 Log verbosity level set to BRIEF 2026-09-03 18:29:29.999 Setting up Project 2026-09-03 18:29:29.999 Project file found at '/home/bugra.aydogar@canonical.com/work/small-test-snaps/xdp-tools-snap/snap/snapcraft.yaml' 2026-09-03 18:29:29.999 Loading project file 'snap/snapcraft.yaml 2026-09-03 18:29:30.004 Setting up BuildPlan 2026-09-03 18:29:30.005 Build plan contains 2 build(s). 2026-09-03 18:29:30.014 Preparing application... 2026-09-03 18:29:30.014 Setting up ConfigService 2026-09-03 18:29:30.029 Merging commands for group 'Lifecycle': 2026-09-03 18:29:30.029 - using application command for 'clean'. 2026-09-03 18:29:30.029 - using application command for 'pull'. 2026-09-03 18:29:30.029 - using application command for 'build'. 2026-09-03 18:29:30.029 - using application command for 'stage'. 2026-09-03 18:29:30.029 - using application command for 'prime'. 2026-09-03 18:29:30.029 - using application command for 'pack'. 2026-09-03 18:29:30.029 Merging commands for group 'Other': 2026-09-03 18:29:30.029 Configuring application... 2026-09-03 18:29:30.062 Build plan: platform=None, build_for=None 2026-09-03 18:29:30.063 Running 'snapcraft edit-validation-sets'. 2026-09-03 18:29:30.231 Setting up ValidationSets 2026-09-03 18:29:30.231 Requesting validation-set 'renesas-rz2th-key-vs' from the store. 2026-09-03 18:29:30.232 Retrieving credentials for 'snapcraft' on 'dashboard.snapcraft.io' from keyring 'SecretService Keyring'. 2026-09-03 18:29:30.278 HTTP 'GET' for 'https://dashboard.snapcraft.io/api/v2/validation-sets/renesas-rz2th-key-vs' with params {'sequence': 1} and headers {'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': '<macaroon>', 'User-Agent': 'snapcraft/9.1.0.post7 ubuntu/24.04 (x86_64)'} 2026-09-03 18:29:30.696 Parsed validation sets: {"account_id":"2slG1X4aOvtiLTWKfiv1orE02U6VhMtT","name":"renesas-rz2th-key-vs","revision":null,"sequence":1,"snaps":[{"name":"snapd","id":"PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4","presence":"required","revision":27710,"components":null}],"authority_id":"2slG1X4aOvtiLTWKfiv1orE02U6VhMtT","series":"16","sign_key_sha3_384":null,"timestamp":"2026-09-03T15:18:54Z","type":"validation-set"} 2026-09-03 18:29:30.698 Retrieved validation-set 'renesas-rz2th-key-vs' from the store. 2026-09-03 18:29:30.701 Editing validation-set. 2026-09-03 18:29:30.701 Using vi to edit file. 2026-09-03 18:29:30.701 Emitter: Pausing control of the terminal 2026-09-03 18:35:40.609 Emitter: Resuming control of the terminal 2026-09-03 18:35:40.612 Edited validation-set. 2026-09-03 18:35:40.612 Building validation-set. 2026-09-03 18:35:40.613 Retrieving credentials for 'snapcraft' on 'dashboard.snapcraft.io' from keyring 'SecretService Keyring'. 2026-09-03 18:35:40.664 HTTP 'POST' for 'https://dashboard.snapcraft.io/api/v2/validation-sets/build-assertion' with params None and headers {'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': '<macaroon>', 'User-Agent': 'snapcraft/9.1.0.post7 ubuntu/24.04 (x86_64)'} 2026-09-03 18:35:41.091 Built validation set: {"account_id":"2slG1X4aOvtiLTWKfiv1orE02U6VhMtT","name":"renesas-rz2th-key-vs","revision":"1","sequence":1,"snaps":[{"name":"snapd","id":"PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4","presence":"required","revision":27738,"components":null}],"authority_id":"2slG1X4aOvtiLTWKfiv1orE02U6VhMtT","series":"16","sign_key_sha3_384":null,"timestamp":"2026-09-03T15:35:41Z","type":"validation-set"} 2026-09-03 18:35:41.092 Built validation-set. 2026-09-03 18:35:41.092 Sequence updated from 1 to 1 2026-09-03 18:35:41.092 Warning: The sequence number was not incremented. This prevents automatic reversions to a valid state in the case of invalid changes or snap refresh failures. 2026-09-03 18:35:41.093 Emitter: Pausing control of the terminal 2026-09-03 18:35:43.931 Emitter: Resuming control of the terminal 2026-09-03 18:35:43.932 operation aborted 2026-09-03 18:35:43.933 Traceback (most recent call last): 2026-09-03 18:35:43.933 File "/snap/snapcraft/19056/lib/python3.12/site-packages/snapcraft/services/assertions.py", line 313, in edit_assertion 2026-09-03 18:35:43.933 self._validate_assertion(built_assertion, **kwargs) 2026-09-03 18:35:43.933 File "/snap/snapcraft/19056/lib/python3.12/site-packages/snapcraft/services/validationsets.py", line 171, in _validate_assertion 2026-09-03 18:35:43.933 raise errors.SnapcraftAssertionWarning( 2026-09-03 18:35:43.933 snapcraft.errors.SnapcraftAssertionWarning: Warning: The sequence number was not incremented. This prevents automatic reversions to a valid state in the case of invalid changes or snap refresh failures. 2026-09-03 18:35:43.933 Full execution log: '/home/bugra.aydogar@canonical.com/.local/state/snapcraft/log/snapcraft-20260903-182929.997437.log' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Regression where edit-validation-sets hard-blocked same-sequence revisions was fixed by merged PR #6420 (commit 2989b5f8b), restoring the non-blocking sequence warning from PR #5545 lost in the #6050 refactor.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #6420, restoring non-blocking sequence warnings so existing validation sets can be revised without incrementing their sequence.
qwen/qwen3.6-35b-a3b — — Fixed a regression where edit-validation-sets blocked publishing revisions without incrementing the sequence. The fix restores the non-blocking warning behavior from PR #5545, reversing a refactor in PR #6050.
qwen/qwen3.6-35b-a3b
Impact: 50
Quick Win: 40
Staleness: 10
Complexity: 20
Confidence: 85
Support Request: 0
keep open Regression in edit-validation-sets blocking same-sequence updates; triaged, confirmed by maintainer, fix in progress.
qwen/qwen3.6-35b-a3b
Impact: 60
Quick Win: 42
Staleness: 10
Complexity: 30
Confidence: 85
Support Request: 0
keep open Validation set editing blocks same-sequence revisions; maintainer confirmed bug and identified regression from PR #6050. Triaged, open.
qwen3.6-35b-a3b-mtp-q6
Impact: 75
Quick Win: 52
Staleness: 5
Complexity: 30
Confidence: 90
Support Request: 0
keep open Triaged bug where edit-validation-sets blocks updating a validation set revision without incrementing the sequence number. Maintainer confirmed regression from PR #6050.
qwen3.6-35b-a3b-mtp-q6
Impact: 60
Quick Win: 36
Staleness: 0
Complexity: 40
Confidence: 70
Support Request: 30
needs triage User reports snapcraft edit-validation-sets blocks publishing a new revision with the same sequence number; a confirmation prompt exists but defaults to N, and no --force flag is available.

Update history

Date Change
closed
updated
updated
updated
updated
updated
updated
created

Related work

  • Likely Fixed By: canonical/snapcraft#6420 (confidence 97%)

    Merged PR restoring non-blocking sequence warnings, closing #6413

  • Caused By: canonical/snapcraft#6050 (confidence 90%)

    Service migration refactor that reintroduced the hard-failing sequence check

  • Superseded By: canonical/snapcraft#5545 (confidence 85%)

    Original PR #5545 (cb96b3533) implemented the ignore-warning behaviour that #6420 restored

Related issues

Issue Project State Summary Similarity
#6420 fix: allow same-sequence validation set revisions snapcraft closed Merged as commit 2989b5f8b via PR #6420 (into hotfix/9.1), restoring the non-blocking sequence warning so edit-validation-sets can publish same-sequence revisions. Fixes #6413.
83%
#6412 edit-validation-sets refuses to create a new validation set at sequence 1 ("sequence number was not incremented") snapcraft open edit-validation-sets rejects creating a brand-new validation set at sequence 1 because the sequence-increment check runs even when no existing set exists; confirmed by maintainer, tracked as SNAPCRAFT-1379.
72%
#6423 fix(validation-sets): don't validate new sets snapcraft closed PR #6423 (SNAPCRAFT-1379) fixed edit-validation-sets rejecting brand-new validation sets at sequence 1; approved with no unresolved comments and landed as commit e7b47adb7, stacking on merged PR #6420.
71%