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

Dump exceptions from build tools integ tests #45811

Closed
wants to merge 1 commit into from

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Aug 21, 2019

The build-tools integ tests (ie testKit) are special and do not have the
normal test setup that the rest of the projects get. This commit adds
full exception dumping when build tools integ tests fail.

The build-tools integ tests (ie testKit) are special and do not have the
normal test setup that the rest of the projects get. This commit adds
full exception dumping when build tools integ tests fail.
@rjernst rjernst added >test Issues or PRs that are addressing/adding tests :Delivery/Build Build or test infrastructure v8.0.0 v7.4.0 v7.3.1 v6.8.3 labels Aug 21, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@alpar-t
Copy link
Contributor

alpar-t commented Aug 22, 2019

I'm not entirely sure if the additional info will be relevant.
Most testkit based tests don't do much more than call gradlew in some way on a sample project, so the exception will just point to where Gradle is invoked. This is similar to how passing -s to ./gradlew on a test failure isn't all that useful.
The details of the failure are available in the test's output e.x. https://gradle-enterprise.elastic.co/s/ipm7fzwgvimrq/tests/orjfcz7hu5lqq-fzbt5s3nffypy

@jakelandis jakelandis added v7.3.2 and removed v7.3.1 labels Aug 22, 2019
@rjernst
Copy link
Member Author

rjernst commented Aug 23, 2019

The details we need are not available right now. For example, this failure: https://gradle-enterprise.elastic.co/s/ipm7fzwgvimrq/console-log?task=:build-tools:integTest

The build-tools IT tests are not configured the same as the rest of our tests, specifically around exceptions, which is why we see a truncated stack in that scan.

@rjernst rjernst requested a review from mark-vieira August 26, 2019 22:38
@mark-vieira
Copy link
Contributor

The build-tools IT tests are not configured the same as the rest of our tests, specifically around exceptions, which is why we see a truncated stack in that scan.

I think Alpar is right here. Usually that stacktrace is going to be something like an UnexpectedBuildFailureException or similar which isn't going to be very relevant to the actual failure of the testkit build. You'd have to pass -S to the GradleRunner argument to ensure we get full stacktraces.

@mark-vieira
Copy link
Contributor

mark-vieira commented Aug 26, 2019

To clarify, I'm not against adding this change to build-tools I'm just not confident it will give us the level of error output we are necessarily looking for in all cases.

@rjernst
Copy link
Member Author

rjernst commented Aug 27, 2019

You'd have to pass -S to the GradleRunner argument to ensure we get full stacktraces.

We already pass -s in the particular example test that failed, but only the first exception, not all the causes or stack frames were shown. WIthout this change, we can't get any information from GradleRunner. With it, we can at least get failure information passed through if the inner build uses -s (or -S).

@rjernst
Copy link
Member Author

rjernst commented Aug 27, 2019

I did some more investigation, and discussions with Mark, and see now that this is unfortunately a limitation of GradleRunner. The underlying problem in the earlier linked build was a failure talking to jcenter, but it only shows up in the junit output, not the console. The proposed change here won't fix that, so I'm closing this.

@rjernst rjernst closed this Aug 27, 2019
@rjernst rjernst deleted the build-tools_test_logging branch August 27, 2019 01:05
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test Issues or PRs that are addressing/adding tests v6.8.3 v7.3.2 v7.4.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants