Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a heroku_build fails, query & output the build error #338

Merged
merged 6 commits into from
Jun 22, 2022

Conversation

mars
Copy link
Member

@mars mars commented Jun 16, 2022

When a heroku_build fails, the existing error message contains a short-lived URL to download the build log. This is a frustrating experience, to have to go fetch the build log separately each time.

The changeset automatically fetches the URL and sets the complete build log into the error message, so that it appears inline with all other Terraform output.

Example new heroku_build error output, from the the acceptance test case:

        Error: Build failed (app: 58203794-bbca-499d-af42-a6c1870d1909), complete build log follows:
        
        -----> Building on the Heroku-20 stack
        -----> Determining which buildpack to use for this app
        -----> Ruby app detected
        -----> Installing bundler 1.17.3
        -----> Removing BUNDLED WITH version in the Gemfile.lock
        -----> Compiling Ruby
        
         !
         !     There was an error parsing your Gemfile, we cannot continue
         !     
         !     #  from /tmp/build_25aef0c6/Gemfile:3
         !     #  -------------------------------------------
         !     #
         !     >  <<<<<<< Intentional syntax error to break the build
         !     #
         !     #  -------------------------------------------
         !
         !     Push rejected, failed to compile Ruby app.
        
         !     Push failed
        
        (End of build log)

Also includes a Terraform plugin SDK upgrade, because it was throwing error: unsupported state format version: expected ["0.1" "0.2"], got "1.0".

@mars mars requested a review from davidji99 June 17, 2022 01:26
@mars
Copy link
Member Author

mars commented Jun 20, 2022

I'll be replacing the Heroku service account & team GitHub Action secrets this week, so that CI can run successfully again.

@mars mars force-pushed the display-build-error-inline branch from f915dd0 to 488a368 Compare June 20, 2022 19:35
@mars mars marked this pull request as ready for review June 20, 2022 23:02
@mars mars merged commit 9689bea into master Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants