← 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
open
Author
bugraaydogar
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Validation set editing blocks same-sequence revisions; maintainer confirmed bug and identified regression from PR #6050. Triaged, open.

Suggested action: keep open

Reason: Maintainer @mr-cal confirmed this is a bug and identified the regression source (PR #6050), with a prior fix in PR #5545. The issue is triaged with clear reproduction steps and a known fix path (making the sequence warning non-blocking).

Impact: 60 Quick Win: 42.0 Staleness: 10 Complexity: 30 Confidence: 85 Support Request: 0

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
qwen/qwen3.6-35b-a3b
Impact: 60
Quick Win: 42.0
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.5
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.0
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
updated
updated
updated
updated
created

Related work

  • Related To: snapcraft#6412 (confidence 80%)

    Same root cause (sequence-increment validation too strict) but different scenario: creating new validation sets at sequence 1 vs. editing existing ones.

Related issues

No related issues found above the similarity threshold.