-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Prevent junit tranformation command from breaking a build step #165824
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
@elastic/kibana-operations Can we merge this PR? |
@maximpn The osquery and defend workflows tests have been adjusted. We shouldn't be blocking you any more 👍 |
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.
I believe these can still cause failures:
The post-command hook is also expecting junit reports to exist. It looks like these can be fixed by setting export DISABLE_MISSING_TEST_REPORT_ERRORS=true
7708e65
to
a58ba36
Compare
@jbudz I rebased the PR. @PhilippeOberti should take care of Threat Intelligence Cypress tests during this week. |
💔 Build FailedFailed CI Steps
Test Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @maximpn |
…te (#165929) ## Summary Fixes failed build steps when there are no tests to execute and hence no reports. ## Details Despite this [PR](#165824) fixes tests failure when there are no reports but `yarn junit:merge` tries to convert them to junit format the problem is partially stays as `Failed Test Reporter` runs for every build step meaning also for successful build steps. We don't need to handle failed test reports for successful build steps. There are cases when there are no tests to run so Cypress doesn't produce reports and nothing is converted to junit format so `Failed Test Reporter` fails and causes a build step to fails. It could be solved by defining an environment variable `DISABLE_MISSING_TEST_REPORT_ERRORS=true` but we need to make sure reports exist for failed tests. Taking this into account we can rely on `BUILDKITE_COMMAND_EXIT_STATUS` to avoid running `Failed Test Reporter` if the build step successed. One may ask why don't skip `Upload Artifacts` too. We may need some build artifacts for successful build steps. --------- Co-authored-by: Tiago Costa <[email protected]>
…te (elastic#165929) ## Summary Fixes failed build steps when there are no tests to execute and hence no reports. ## Details Despite this [PR](elastic#165824) fixes tests failure when there are no reports but `yarn junit:merge` tries to convert them to junit format the problem is partially stays as `Failed Test Reporter` runs for every build step meaning also for successful build steps. We don't need to handle failed test reports for successful build steps. There are cases when there are no tests to run so Cypress doesn't produce reports and nothing is converted to junit format so `Failed Test Reporter` fails and causes a build step to fails. It could be solved by defining an environment variable `DISABLE_MISSING_TEST_REPORT_ERRORS=true` but we need to make sure reports exist for failed tests. Taking this into account we can rely on `BUILDKITE_COMMAND_EXIT_STATUS` to avoid running `Failed Test Reporter` if the build step successed. One may ask why don't skip `Upload Artifacts` too. We may need some build artifacts for successful build steps. --------- Co-authored-by: Tiago Costa <[email protected]> (cherry picked from commit 369d2fe)
Summary
This PR implements a temporary fix to prevent
yarn junit:merge
command from breaking a build step by returning non zero code.yarn junit:merge
fails in case if it can't find reports or folders it operates on weren't created beforehand.