-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(workflow-hook): log output with or without errors #3422
fix(workflow-hook): log output with or without errors #3422
Conversation
Brilliant! Thank you @X-Guardian for the deep dive and creating a fix. Is there a way we can add a unit test or e2e test or both to ensure this functionality doesn't break in the future? |
Hi @nitrocode, I did look at the current unit tests for the workflow hook runners, but couldn't obviously see how to change them to check for this scenario. From what I could see, they are currently checking the |
Is it not possible to modify or add to them to verify that your changes will also be tested? It must be possible. This feature was working before and a follow up pr broke the feature and now this pr has been created to remediate the issue. Besides a thorough future review, what is preventing someone from creating a new pr and breaking the feature again? Only thing would be unit tests. Please consider adding them or we are doomed to repeat our mistakes. |
I didn't say it wasn't possible. I said that I couldn't see how to change them, as they are testing the output of the function not the internal workings of the function which is where the bug I fixed is. This is my first PR on this repo, but looking at the history of the workflow hook status feature, this was introduced in PR #2441 and has always had this bug as you can see that the |
@nitrocode, this PR is ready for review. |
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.
Thank you! Pinging a few other reviewers too
* fix: Errors in Pre or Post Workflow Hook Scripts do not Produce any Output * Fix post workflow * Update unit tests
* fix: Errors in Pre or Post Workflow Hook Scripts do not Produce any Output * Fix post workflow * Update unit tests
* fix: Errors in Pre or Post Workflow Hook Scripts do not Produce any Output * Fix post workflow * Update unit tests
what
OutputHandler.SendWorkflowHook
calls have been moved to before the command error handling.why
tests
repos.yaml:
Output Screenshots
Pre Workflow Hook
Post Workflow Hook
Logs
Logs
references