inaccurate error output in snapcraft release if given invalid revision

Bug #2059787 reported by Caner Derici
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

We noticed in one of our release jobs an error stating "No such command 'release'", while `snapcraft release` was certainly working in the previous tasks within the same job:

```
...
19:13:41 Starting Snapcraft 7.5.5
19:13:41 Logging execution to '/home/jenkins/.local/state/snapcraft/log/snapcraft-20240329-011340.363807.log'
19:13:41 Released 'juju' revision 26908 to channels: '2.9/candidate'
19:13:41 + [[ False == \T\r\u\e ]]
19:13:41 + [[ 2.9 == \2\.\9 ]]
19:13:41 + for arch in $build_arches
19:13:41 ++ snapcraft list-revisions juju
19:13:41 ++ awk '{print $1;exit}'
19:13:41 ++ grep 2.9/candidate/strict-501fcd8
19:13:41 ++ grep ' amd64 '
19:13:46 Starting Snapcraft 7.5.5
19:13:46 Logging execution to '/home/jenkins/.local/state/snapcraft/log/snapcraft-20240329-011343.737494.log'
19:13:46 + store_revision=26909
19:13:46 ++ cat amd64.store_revision
19:13:46 cat: amd64.store_revision: No such file or directory
19:13:46 + snapcraft release juju 2.9/candidate/strict
19:13:49 Starting Snapcraft 7.5.5
19:13:49 Logging execution to '/home/jenkins/.local/state/snapcraft/log/snapcraft-20240329-011349.286474.log'
19:13:49 Usage: snapcraft [OPTIONS] COMMAND [ARGS]...
19:13:49 Try 'snapcraft -h' for help.
19:13:49
19:13:49 Error: No such command 'release'.
```

We noticed that the origin of this issue is that one of our release scripts is passing an invalid store_revision, and we're fixing that, however, along the way we noticed that if `snapcraft release` is ran with an invalid revision, we get the error messsage "No such command `release`", just wanted to raise this.

To recreate, run `snapcraft release juju "" 2.9`

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.