← Back to issue list

feat(validation-sets): warn when the sequence isn't incremented

View original Github issue

Metadata

Project
snapcraft
Number
#5535
Type
pull request
State
merged
Author
mr-cal
Labels
PR: Rebase
Created
Updated
Closed

Current evaluation

PR #5535 by mr-cal merged (commit f012b667e): adds a SnapcraftAssertionWarning when a validation set's sequence isn't incremented, plus shared _validate_assertion infrastructure. Fixes #5367.

Resolution: closed resolved

Reason: The PR was approved by 2 reviewers and merged into main as commit f012b667e ('feat(validation-sets): warn when the sequence isn't incremented (#5535)'). ValidationSetsService._validate_assertion now raises SnapcraftAssertionWarning when new_sequence <= old_sequence, and the tracking issue #5367 was closed by this merge.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint`? - [x] Have you successfully run `make test`? --- This PR adds a warning when a user doesn't increment the sequence in a validation set. I recommend reviewing per-commit. The first commit does this with a new function `_validate_assertion()` and passing kwargs to the new function. The second commit adds the same infrastructure to the abstract `AssertionService`, which currently isn't used for validation sets. There are no user-facing changes here, but I'm doing this now while it's fresh in my mind. This will make creating a `ValidationSetsService` easier when we complete https://github.com/canonical/snapcraft/issues/5337. Fixes #5367 (SNAPCRAFT-811)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #5535 by mr-cal merged (commit f012b667e): adds a SnapcraftAssertionWarning when a validation set's sequence isn't incremented, plus shared _validate_assertion infrastructure. Fixes #5367.
stealth/space-bunny-alpha — closed resolved Merged as Snapcraft PR #5535 (commit f012b667e), adding a warning for non-incremented validation-set sequences and fixing #5367.
stealth/space-bunny-alpha — closed resolved Merged #5535, adding a warning when validation set sequences are not incremented and fixing #5367. The fix is available in the latest/edge channel.
qwen/qwen3.6-35b-a3b — — Merged. Adds a warning when validation set sequences are not incremented, resolving #5367. Introduces _validate_assertion and extends AssertionService infrastructure. Approved by two reviewers and merged despite some failing CI checks.
qwen3.6-35b-a3b-mtp-q6 — — Merged a feature adding a warning when validation set sequences are not incremented. The change introduces a _validate_assertion() function and updates the AssertionService infrastructure, resolving issue #5367.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#5367 (confidence 98%)

    Issue 'Warn on validation set update without incrementing sequence number' is listed as fixed by this PR and is now closed.

  • Related To: canonical/snapcraft#5337 (confidence 70%)

    PR body notes the abstract AssertionService groundwork will make creating a ValidationSetsService easier when #5337 is completed.

Related issues

Issue Project State Summary Similarity
#5545 fix(validation-sets): allow users to ignore sequence increment warning snapcraft merged Merged PR #5545 (cb96b3533), allowing users to ignore validation-set sequence-increment warnings and still submit assertions, fixing the overlooked scenario in #5535.
78%
#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.
76%
#5367 Warn on validation set update without incrementing sequence number snapcraft closed Added the validation-set sequence warning in merged PR #5535 (commit f012b667e).
73%