-
Notifications
You must be signed in to change notification settings - Fork 60
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
ci: fix go workflow succeeding even if a step fails #5
Conversation
The continue-on-error flag appears to be buggy and not well documented, however it was causing the workflow to be marked as succeded even if a step failed.
hey @joshuasing I am a little confused here; I think I understand the issue we're trying to solve, however why not just leave it with the default? why do we need this |
@ClaytonNorthey92 I had added 'continue-on-error' so that we can collect error logs from each step instead of it exiting immediately when one step failed, aiming to allow us to collect extra information that could be useful for debugging. I was unsure of whether continue-on-error would cause this bug at the time, as different parts of GitHub's documentation said completely different things. |
@joshuasing OK that makes sense. Can we test this before merging? Perhaps push up a broken commit and make sure the pipeline fails correctly with this change? If so, then I approve ✅️ |
Hey @joshuasing I saw the breaking test 👍 let's drop that commit and merge |
1c621a7
to
37a3bd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's drop the force-break test and merge!
The continue-on-error flag appears to be buggy and not well documented, however it was causing the workflow to be marked as succeded even if a step failed.
Summary
Remove use of
continue-on-error
flag in Go workflow due to it causing the workflow to suceed even if a step failed.Changes
continue-on-error
withif: (success() || failure()) && steps.deps.outcome == 'success'
to mimic behaviour without causing the job to succeed with steps failing.