Exit code on container:release still 0 if release fails
- Dominant language
- TypeScript
- Stars
- 889
- Forks
- 236
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 33
Description
### Current Behavior
Running the `heroku container:release web release --app XXXX` returns an exit code "0", even with #1233 (See #1232)
### Expected Behavior
Running the `heroku container:release web release --app XXXX` must return an exit code "1" when the release fails.
### Notes:
- When I remove `curl` from the deployed image, `heroku container:release` *DOES* return an exit code "1" when failing.
- With `curl` back in the deployed image, when I inspect the command output with `DEBUG=*`, I can see that when the [release data is fetched from the API](https://github.com/heroku/cli/blob/v7.26.2/packages/container-registry-v5/commands/release.js#L102-L108), the release is still in "pending" state:
```
rails aborted!
NameError: uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
http --> GET /apps/xxx-xxx-xxx/releases/xxx-xxx-xxx +19s
--> GET /apps/xxx-xxx-xxx/releases/xxx-xxx-xxx
http
http accept=application/vnd.heroku+json; version=3
http content-type=application/json
http user-agent=heroku/7.26.2 linux-x64 node-v11.14.0
http range=id ..; max=1000
http host=api.heroku.com
http authorization=REDACTED +19s
<-- 200 OK
http <-- undefined /apps/xxx-xxx-xxx/releases/xxx-xxx-xxx
http {"addon_plan_names":["scout:skiloveland-db","sendgrid:starter","deployhooks:http","papertrail:choklad","cloudamqp:lemur"],"app":{"id":"1f0c038f-af43-4e2f-8680-ff7f5b6ad2a7","name":"xxx-xxx-xxx"},"created_at":"2019-07-24T04:22:29Z","description":"Deployed release (0752f548228e)","status":"pending","id":"cbe1039b-b8e3-41e7-a32b-feb771ad0fac","slug":null,"updated_at":"2019-07-24T04:22:29Z","user":{"email":"xxx-xxx-xxx","id":"49d0fae9-f9f5-4b30-b447-ddff253189af"},"version":162,"current":false,"output_stream_url":"https://release-output.heroku.com/streams/1f/1f0c038f-af43-4e2f-8680-ff7f5b6ad2a7/logs/cb/cbe1039b-b8e3-41e7-a32b-feb771ad0fac.log?AWSAccessKeyId=AKIAIO4SD3DCRO7W6IJQ&Signature=gq39r6%2B%2BQ05SnezNJVtBPS9X9Cc%3D&Expires=1564028569"} +466ms
http
http cache-control=private, no-cache
http content-length=765
http content-type=application/json
http date=Wed, 24 Jul 2019 04:22:49 GMT
http etag="5b8771e1f51a44a56bce8093dcdfad35"
http last-modified=Wed, 24 Jul 2019 04:22:29 GMT
http oauth-scope=global
http oauth-scope-accepted=global read-protected write-protected
http ratelimit-multiplier=1
http ratelimit-remaining=4499
http request-id=686d5303-67bb-403d-8e47-95bfdbdf8554,8e5e76d8-8538-06dc-214b-1167956853ee,4eb13a62-d048-3702-95f1-253f642b9195
http vary=Accept-Encoding
http via=1.1 spaces-router (c7665a42a791), 1.1 spaces-router (c7665a42a791)
http x-content-type-options=nosniff
http x-runtime=0.053183288 +466ms
<-- {"addon_plan_names":["scout:skiloveland-db","sendgrid:starter","deployhooks:http","papertrail:choklad","cloudamqp:lemur"],"app":{"id":"1f0c038f-af43-4e2f-8680-ff7f5b6ad2a7","name":"xxx-xxx-xxx"},"created_at":"2019-07-24T04:22:29Z","description":"Deployed release (0752f548228e)","status":"pending","id":"cbe1039b-b8e3-41e7-a32b-feb771ad0fac","slug":null,"updated_at":"2019-07-24T04:22:29Z","user":{"email":"xxx-xxx-xxx","id":"49d0fae9-f9f5-4b30-b447-ddff253189af"},"version":162,"current":false,"output_stream_url":"https://release-output.heroku.com/streams/1f/1f0c038f-af43-4e2f-8680-ff7f5b6ad2a7/logs/cb/cbe1039b-b8e3-41e7-a32b-feb771ad0fac.log?AWSAccessKeyId=AKIAIO4SD3DCRO7W6IJQ&Signature=gq39r6%2B%2BQ05SnezNJVtBPS9X9Cc%3D&Expires=1564028569"}
```
Contributor guide
Assessment
This issue has not been assessed yet.