← Back to issue list

remote build: do not ignore 'Cancel build? negative response

View original Github issue

Metadata

Project
snapcraft
Number
#4929
Type
issue
State
closed
Author
popey
Labels
—
Created
Updated
Closed

Current evaluation

remote-build ignored the 'Cancel builds? [Y/n]' answer, always cleaning up (killing Launchpad builds) and raising HTTPError on 'y'. Fixed by merged PR #5081 (commit caa0757c2) in snapcraft/commands/remote.py.

Resolution: closed resolved

Reason: Maintainer mr-cal confirmed the bug in snapcraft/commands/remote.py and closed the issue after PR #5081 ('fix(remotebuild): do not auto clean interrupted builds') was merged as commit caa0757c2, which now respects the user's negative answer. The related HTTPError on 'y' was reported as part of the same fix.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description snapcraft remote-build supports starting a remote-build from a client, killing snapcraft, then recovering/continuing the build from a different place. In the past pressing ctrl-c on a remote build would just drop to the prompt. Now, you get asked to 'cleanup' with y/n options. Choose 'no' and it does the cleanup anyway, and terminates the remote build. This seems counterintuitive. ### To Reproduce 1. Create a snap/snapcraft.yaml 2. Run ` snapcraft remote-build --launchpad-accept-public-upload` 3. Wait for the process starts building in launchpad (once it says "Stopped: amd64 | (12.2s)" or similar) 4. Press `CTRL+C' 5. At the `Cancel builds? [Y/n]:` prompt, say 'n' Snapcraft will say 'Cleaning up' and while doing so, the build will be killed in launchpad. ### Environment ```text  $ snapcraft --version snapcraft 8.3.1  $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04 LTS Release: 24.04 Codename: noble ``` ### snapcraft.yaml ```shell name: emoj summary: emoj version: latest description: | Find relevant emoji from text on the command-line. base: core24 grade: stable confinement: strict apps: emoj: command: bin/npm run emoj plugs: [network, x11] parts: emoj: plugin: npm source: https://github.com/sindresorhus/emoj.git source-type: git npm-include-node: true npm-node-version: "22.5.1" stage-packages: - xsel ``` ``` ### Relevant log output ```shell Cancel builds? [Y/n] n Cleaning up ``` ### Additional context We discussed this on 2024-07-19 at the snapcraft clinic.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved remote-build ignored the 'Cancel builds? [Y/n]' answer, always cleaning up (killing Launchpad builds) and raising HTTPError on 'y'. Fixed by merged PR #5081 (commit caa0757c2) in snapcraft/commands/remote.py.
stealth/space-bunny-alpha — closed resolved remote-build ignored the "Cancel builds? [Y/n]" answer and always cleaned up (killing Launchpad builds), and raised HTTPError on 'y'. Fixed by merged PR #5081 (commit caa0757c2) in snapcraft/commands/remote.py.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #5081 (commit caa0757c2): remote-build now respects a negative cancellation response and no longer automatically cleans up interrupted Launchpad builds.
stealth/space-bunny-alpha — closed resolved Fixed in canonical/snapcraft#5081 (commit caa0757c2): interrupted remote builds no longer auto-clean the Launchpad project and respect the user's cancellation choice.
qwen/qwen3.6-35b-a3b — — Resolved a bug where snapcraft remote-build ignored negative responses to the cancel prompt, still terminating builds, and triggered an HTTPError on positive responses. Fixed via PR #5081.
qwen/qwen3.6-35b-a3b — — Fixed snapcraft remote-build ignoring negative responses to the cancel prompt, which incorrectly terminated builds. Also resolved an HTTPError on positive responses. Closed via PR #5081.
qwen/qwen3.6-35b-a3b — — Fixed snapcraft remote-build ignoring negative responses to the cancel prompt, which incorrectly terminated builds. Also resolved an HTTPError when confirming cancellation. Merged in pull request #5081.
qwen3.6-35b-a3b-mtp-q6 — — Fixed a bug where snapcraft remote-build ignored negative responses to the cancel prompt, incorrectly terminating builds. Positive responses also triggered an HTTPError. Resolved via merge of pull request #5081.

Update history

No update history recorded yet.

Related work

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

    Merged PR titled 'fix(remotebuild): do not auto clean interrupted builds', commit caa0757c2, touching snapcraft/commands/remote.py.

  • Related To: canonical/craft-application#249 (confidence 42%)

    Related open enhancement for cleaning up leftover Launchpad remote builds after crashes, the exact case this fix protects.

Related issues

No related issues found above the similarity threshold.