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

Github build succeeds when heroku release tasks fail #10

Open
christopherpickering opened this issue May 27, 2021 · 4 comments
Open

Github build succeeds when heroku release tasks fail #10

christopherpickering opened this issue May 27, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@christopherpickering
Copy link
Contributor

Hi,

Thanks for the tool! I found that if the build fails in heroku you cause the GitHub action to fail as well, which is great. However, if the release tasks fail in heroku the GitHub action does not fail, as I would have expected.

Is it possible to cause the github action to fail if a release task fails?

For example, see this build: https://github.com/Riverside-Healthcare/extract_management/runs/2679015731?check_suite_focus=true

You can see there was an error in my release task:
image

And if you check the heroku log you can see the deploy failed because the release failed:
image

image

I'd expect that if a release fails, the GitHub action would fail.

Thanks for checking this out!

@gonuit gonuit added the bug Something isn't working label May 31, 2021
@gonuit gonuit self-assigned this Jun 9, 2021
@danthedaniel
Copy link

Confirmed this is still an issue

@gonuit
Copy link
Owner

gonuit commented Sep 8, 2021

Hi, @christopherpickering and @danthedaniel - First of all, I want to apologize for the late reply.

I have tested the following case with many different approaches and was not able to reproduce it. In my case, an error during the release phase always raised an exception.
Screen Shot 2021-09-08 at 23 09 04

Could you provide me with some steps to reproduce? This would help me a lot.


This action relies on status codes returned from the CLI - so as long as Heroku CLI returns, a non-error status code exception will not be raised.

@christopherpickering
Copy link
Contributor Author

Thanks! I ended up changing my workflow since then and don't have a running example anymore. Maybe @danthedaniel does.

But basically, If you have a "release_tasks.sh" file that is runnable (chmod -x? or something) with gibberish in it, and release: ./release-tasks.sh in your heroku.yml, the build should fail right?

It must be a valid file, runable, and findable by the release step, but with an incorrect command.

@christopherpickering
Copy link
Contributor Author

I still get this one, by having a command inside my ./release-tasks.sh fail. In heroku it is marked as a fail, so I guess heroku isn't giving you feedback that it failed? What do you think about prepping for ERROR on line starts in the heroku output?

image

Actually, I don't think heroku marked it as an error...
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants