runner-images
runner-images copied to clipboard
Heroku container deployments fail with ubuntu-22.04 version 20241211.1.0 and heroku cli version 10.0.0
Description
Starting this morning, our CI/CD pipelines started to fail heroku containers deployment.
Update: the issue was attributed to heroku CLI v10.0.0 https://github.com/heroku/cli/issues/3142 See https://github.com/heroku/cli/issues/3142#issuecomment-2539905218 for workaround
We run heroku containers:release
command as a part of our Github workflow, and recently it started to fail, last lines of log being:
Run heroku container:release --verbose web release worker --app=rm-aus-staging
heroku container:release --verbose web release worker --app=rm-aus-staging
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
HEROKU_API_KEY: ***
Releasing images web,release,worker to rm-aus-staging... done
Running release command...
TypeError: Cannot read properties of undefined (reading 'statusCode')
Error: Process completed with exit code 1.
We run ubuntu-latest
which is seemingly ubuntu-22.04
Last successful run was with image: ubuntu-22.04
, Version: 20241201.1.0
This run had upgrade notice in its output:
› Warning: heroku update available from 9.5.0 to 10.0.0.
Failing runs do not have this line (seemingly they are running heroku cli 10.0.0 and this upgrade is what causes failures)
Platforms affected
- [ ] Azure DevOps
- [X] GitHub Actions - Standard Runners
- [ ] GitHub Actions - Larger Runners
Runner images affected
- [ ] Ubuntu 20.04
- [X] Ubuntu 22.04
- [ ] Ubuntu 24.04
- [ ] macOS 12
- [ ] macOS 13
- [ ] macOS 13 Arm64
- [ ] macOS 14
- [ ] macOS 14 Arm64
- [ ] macOS 15
- [ ] macOS 15 Arm64
- [ ] Windows Server 2019
- [ ] Windows Server 2022
Image version and build link
Current runner version: '2.321.0' Operating System Ubuntu 22.04.5 LTS Runner Image Image: ubuntu-22.04 Version: 20241211.1.0 Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20241211.1/images/ubuntu/Ubuntu2204-Readme.md Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20241211.1 Runner Image Provisioner 2.0.385.1
Is it regression?
Image: ubuntu-22.04 Version: 20241201.1.0
Expected behavior
Upon a successful release, heroku containers:release
command shows the line
Running release command...
, release phase output and exits with error code 0
Actual behavior
heroku containers:release
command fails with the following output:
Running release command... TypeError: Cannot read properties of undefined (reading 'statusCode') Error: Process completed with exit code 1.
Worth noting that version 20241201.1.0
seemingly has heroku-cli version 9.5.0, as indicated by the following output
Repro steps
- Prepare a repo with minimalistic docker-based web application, having
Procfile
definingweb
andrelease
commands - Create heroku application with
container
stack for that app - Run the following pipeline:
name: Deploy on: workflow_dispatch: {} jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Login to Heroku registry uses: docker/login-action@v3 with: registry: registry.heroku.com username: _ password: ${{ secrets.HEROKU_API_KEY }} - uses: docker/build-push-action@v5 with: file: Dockerfile labels: com.heroku.process-types=web,release provenance: false - run: | for dyno_type in web release do echo $dyno_type heroku_image_tag="registry.heroku.com/HEROKU-APP-NAME/${dyno_type}" docker tag ${{ inputs.oci_image }} $heroku_image_tag docker push $heroku_image_tag done - name: Release new image on Heroku run: | heroku container:release --verbose web,release --app=HEROKU-APP-NAME env: HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}) shell: bash
- Trigger the build