← Back to issue list

remote-build always recovers, even when --recover is not specified

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1913599
Type
issue
State
open
Author
~nymea
Labels
—
Created
Updated
Closed
—

Current evaluation

remote-build recovery is now opt-in: interrupted builds are resumed only with --recover, addressing the reported automation and artifact-provenance risk.

Suggested action: close resolved

Reason: Commit caa0757c2 (#5081) targeted automatic handling of interrupted builds, while commit f31d99498 (#5239) moved remote-build to Craft Application, whose current code gates recovery with parsed_args.recover. Snapcraft now documents --recover as the explicit way to resume interrupted builds, satisfying the maintainer-requested opt-in behavior.

Evaluated by: mr-cal-bot

Impact: 58 Quick Win: 37 Complexity: 30 Confidence: 90 Actionability: 92

Issue body

To reproduce, start a remote-build, and make the client fail somehow. Wait for the remote build to finish or fail (doesn't matter). Then start another remote-build with a different revision of the source code *without* specifying --recover. => snapcraft will recover the previous build and report the status instead of actually building the new source. Given that snapcraft clean doesn't seem to clean remote builds, this makes it close to impossible to use snapcraft remote-build in some sort of automated build environment as one never knows what the build artifact is actually based on.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 58
Quick Win: 37
Complexity: 30
Confidence: 90
Actionability: 92
close resolved remote-build recovery is now opt-in: interrupted builds are resumed only with --recover, addressing the reported automation and artifact-provenance risk.
stealth/space-bunny-alpha
Impact: 65
Quick Win: 50
Complexity: 15
Confidence: 94
Actionability: 90
close resolved Remote-build previously recovered stale builds unless --recover was set; current Snapcraft makes recovery explicitly opt-in, resolving the implicit-recovery behavior and making --no-recover redundant.
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 29
Complexity: 40
Confidence: 60
Actionability: 70
keep open remote-build auto-recovers previous builds even without --recover flag, preventing new builds from starting fresh. Valid bug with clear reproduction steps, no maintainer response yet.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 20
Staleness: 92
Complexity: 35
Confidence: 55
Support Request: 10
close stale Snapcraft remote-build recovers a previous build even without --recover, breaking automated builds. Open ~5.5 years with zero comments, no labels, and no maintainer engagement; the remote-build command has since been removed from snapcraft.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 35
Confidence: 85
Support Request: 5
close stale Remote-build recovers previous builds without --recover flag, breaking automated workflows. Issue is 5+ years old, has no comments or labels, and shows no maintainer engagement.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 75
Support Request: 5
needs triage snapcraft remote-build recovers previous state without --recover flag, causing automated builds to use stale source. Unlabelled, zero comments, no maintainer interaction in over 5 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale snapcraft remote-build automatically recovers previous build state without --recover, breaking automated builds. Unlabelled, zero comments, inactive for over 5 years.

Update history

Date Change
created

Related work

  • Related To: canonical/snapcraft#5239 (confidence 91%)

    Commit f31d99498 moved remote-build to Craft Application, where recovery is controlled by the --recover argument.

  • Likely Fixed By: canonical/snapcraft#5081 (confidence 84%)

    Commit caa0757c2 is titled fix(remotebuild): do not auto clean interrupted builds.

Related issues

Issue Project State Summary Similarity
#3553 cli: make remote-build more user-friendly snapcraft merged Merged in #3553 via 8649cedd6: --recover now reports when no build exists, the public-data prompt only appears for new builds, and tests cover the behavior.
72%
#2768 remote-build: autorecovery snapcraft merged PR #2768 by cjp256 added autorecovery for `snapcraft remote-build` (retry/poll recovery of failed Launchpad builds), approved and merged as commit 0077d8265.
72%