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

Add jenkins:report task for test failures #22682

Merged
merged 4 commits into from
Sep 21, 2018

Conversation

joshdover
Copy link
Contributor

Fixes #21965

Adds a new jenkins:report grunt task that will pick up any test failures found in JUnit XML files and creates / updates issues in Github with the flaky-failing-test label. This will only be ran on tracked branches, I have an upcoming infra change for adding this to the jenkins jobs for those branches.

Here's an example of what an automated issue will look like: joshdover#23

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

owner: GITHUB_OWNER,
repo: GITHUB_REPO,
number: existingIssue.number,
state: 'open', // Reopen issue if it was closed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am leaning towards creating a new issue here. The reason for the failure could be different than previous failures. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be, but I think it's also more likely that we think we fixed a test and closed the issue just for it to fail a few days later (maybe it only fails 1% of the time). In that case, it seems useful to know that it failed recently and to be able to quickly see what we tried to fix it.

I can't think of a great reason that the historical context for a given test failure would be bad to surface up.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok - we can stick with this and always change later. It's possible we could also create an arbitrary timeout. So after an issue was closed for X amount of time a new issue is created.

Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple small comments - but overall looks good!

@elasticmachine
Copy link
Contributor

💔 Build Failed

@joshdover
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@joshdover
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tylersmalley
Copy link
Contributor

screenshot 2018-09-20 18 33 35

@joshdover joshdover merged commit eb1cfaf into elastic:master Sep 21, 2018
@joshdover joshdover deleted the flaky-reporting branch September 21, 2018 14:31
@joshdover
Copy link
Contributor Author

@tylersmalley Should I backport this to 6.x and 5.x?

joshdover added a commit to joshdover/kibana that referenced this pull request Oct 1, 2018
* Add jenkins:report task

* PR comments
joshdover added a commit that referenced this pull request Oct 1, 2018
* Add jenkins:report task for test failures (#22682)

* Add jenkins:report task

* PR comments

* Handle different junit XML formats (#23617)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants