← Back to issue list

fix(commands/promote): exit non-zero when promotion is cancelled

View original Github issue

Metadata

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

Current evaluation

PR #6304 (squash-merged as commit 68c28110f) makes `snapcraft promote` return exit code 1 when a promotion prompt is declined and warns that SNAPCRAFT_HAS_TTY is obsolete. Fixes #6294, shipped in Snapcraft 9.0.1.

Resolution: closed resolved

Reason: PR #6304 was approved by 3 reviewers and squash-merged to main as commit 68c28110f ('fix(commands/promote): exit non-zero when promotion is cancelled'), closing issue #6294. snapcraft/commands/manage.py now returns 1 with 'Channel promotion cancelled' and warns when SNAPCRAFT_HAS_TTY is set.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- Exit non-zero when promotion is cancelled by the user. - Provide guidance for fixing CI workflows that relied on `SNAPCRAFT_HAS_TTY` to workaround #5958. Fixes #6294 (SNAPCRAFT-1359) --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [x] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [x] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #6304 (squash-merged as commit 68c28110f) makes `snapcraft promote` return exit code 1 when a promotion prompt is declined and warns that SNAPCRAFT_HAS_TTY is obsolete. Fixes #6294, shipped in Snapcraft 9.0.1.
stealth/space-bunny-alpha — closed resolved Merged PR #6304 (commit 68c28110f) fixed #6294: cancelled promotions now exit non-zero, with CI guidance to use --yes instead of SNAPCRAFT_HAS_TTY.
qwen/qwen3.6-35b-a3b — — Merged squash commit resolving #6294. The promote command now exits non-zero when cancelled, ensuring CI workflows correctly detect declined prompts. Includes documentation updates for affected workflows.
qwen/qwen3.6-35b-a3b — — Merged as a squash commit. Fixes #6294 by ensuring the promote command exits non-zero when cancelled. Updates documentation to guide CI workflows previously relying on the SNAPCRAFT_HAS_TTY workaround for #5958. Approved by three reviewers.

Update history

Date Change
updated

Related work

  • Related To: canonical/snapcraft#6294 (confidence 100%)

    Issue 'Snapcraft 9 fails silently with pre-9 CI promotion syntax' was closed by this PR; fix documented under SNAPCRAFT-1359.

  • Related To: canonical/snapcraft#5958 (confidence 85%)

    Original issue where SNAPCRAFT_HAS_TTY workaround was removed in Snapcraft 9; this PR adds CI guidance for that workaround.

Related issues

Issue Project State Summary Similarity
#6294 Snapcraft 9 fails silently with pre-9 CI promotion syntax snapcraft closed Cancelled `snapcraft promote` prompts now exit non-zero and warn when SNAPCRAFT_HAS_TTY is set without --yes, via PR #6304 (68c28110f), released in Snapcraft 9.0.1.
82%