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

Gradle build-tools integration tests are slow and fail often #42453

Closed
mark-vieira opened this issue May 23, 2019 · 12 comments
Closed

Gradle build-tools integration tests are slow and fail often #42453

mark-vieira opened this issue May 23, 2019 · 12 comments
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team

Comments

@mark-vieira
Copy link
Contributor

We've had a high number of CI failures related to build-tools integration tests lately. Many of these tend to do with timeouts... of course.

The other issue here is that these tests are just horribly slow. They actually account for the bulk of one of our pull request checks.

image

This simply should not be the case as most PRs never change this stuff and most developers could care less about the result of these tests. We need to reevaluate what these tests are doing to see a) what is making them so damn slow and b) are they even providing any reasonable benefit. One thing we might consider is ripping testing of this project completely out of the general developer workflow and creating a parallel Jenkins build specifically for this stuff that triggers only on VCS changes to buildSrc/.

@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label May 23, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst
Copy link
Member

rjernst commented May 23, 2019

I think the buildexample plugins IT needs to be removed. It should be a separate type of test, done within each plugin example. and it shouldn't run tests, it should only run compilation because it's all about whether the project will build once it is extracted into its own project. Right now we are running all the example plugin tests (including integ test clusters) twice, but due to dependency ordering, the first time is within this monster "example plugins IT" and it has zero visibility into what actually goes wrong.

@rjernst
Copy link
Member

rjernst commented May 23, 2019

Additionally, I think there should not be any dependency within build-tools on a built version of ES. All the integ tests need to use dummy/mock distributions/tools and such to test eg whether testclusters works. These need to be lightweight tests that get us 95% of the way to have confidence the build infrastructure will work. If we have gaps, they will be covered by the actual build running.

@mark-vieira
Copy link
Contributor Author

These need to be lightweight tests that get us 95% of the way to have confidence the build infrastructure will work.

Absolutely. We need to mock out as much of this stuff as possible for these tests. Right now they are way too heavy. We are essentially running a ton of mini ES builds as part of this test suite.

@alpar-t
Copy link
Contributor

alpar-t commented May 27, 2019

Build example plugins also tests that build-tools works when applied to an external project.
This is also something we will have to cover when we remove it.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 12, 2019

After giving it more taught, i think we do need to run tests for example plugins, or at least for one of them, we don't have a way to test that the infrastructure to do so ( cluster formation, testclsuters, etc ) works when used in an external project.

@mark-vieira
Copy link
Contributor Author

I'm fine with keeping the coverage in some form. But it should be outside of normal of the normal CI intake pipeline so we aren't paying that cost for the majority of work that doesn't affect build-tools.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 13, 2019

I'm not entirely convinced. One could make a point for a number of other features or plugins resulting in each plugin having it's own CI setup.

@rjernst
Copy link
Member

rjernst commented Jun 13, 2019

I agree with @mark-vieira this should be a separate CI job. This is not something likely to break very often. We can have simple integ tests that check the build tools work as expected which are run always, that use fake projects in testkit, mimicking external behavior, and have a separate test task for running the example plugins builds in this way. This is similar to how we have packagingTest that is not run for most builds. The new test task can also be triggered on PRs by using the :Core/Infra/Build label, like how we trigger full packaging tests for :Core/Infra/Packaging PRs.

@mark-vieira
Copy link
Contributor Author

One could make a point for a number of other features or plugins resulting in each plugin having it's own CI setup.

You say this in jest, but honestly I would be in favor of moving this direction and away from such a monolithic CI setup as we have now 😉

@mark-vieira
Copy link
Contributor Author

The new test task can also be triggered on PRs by using the :Core/Infra/Build label, like how we trigger full packaging tests for :Core/Infra/Packaging PRs.

👍

@alpar-t
Copy link
Contributor

alpar-t commented Oct 10, 2019

Closing this as we switched to unit tests

@alpar-t alpar-t closed this as completed Oct 10, 2019
@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
Projects
None yet
Development

No branches or pull requests

4 participants