Skip to content

Fix input snapshotting for test tasks #55981

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

Merged
merged 2 commits into from
Apr 29, 2020

Conversation

mark-vieira
Copy link
Contributor

When converting some of our build logic from Groovy to Java in #55834, we inadvertently broke incremental build and cacheability because Gradle cannot reliably snapshot lambda task inputs. This PR replaces those lambdas with either a normal class or anonymous inner class implementation.

@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label Apr 29, 2020
@mark-vieira mark-vieira requested a review from rjernst April 29, 2020 21:21
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Apr 29, 2020
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -269,7 +276,7 @@ public static void configureTestTasks(Project project) {
"-XX:+HeapDumpOnOutOfMemoryError"
);

test.getJvmArgumentProviders().add(() -> List.of("-XX:HeapDumpPath=$heapdumpDir"));
test.getJvmArgumentProviders().add(new SimpleCommandLineArgumentProvider("-XX:HeapDumpPath=$heapdumpDir"));
Copy link
Member

Choose a reason for hiding this comment

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

Oh, there is a bug here due to my previous PR, can you fix? heapdumpDir is a variable here that needs to be resolved, not a literal in the setting value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Fixed.

@mark-vieira mark-vieira merged commit 3b7ae2d into master Apr 29, 2020
@mark-vieira mark-vieira deleted the unit-test-input-snapshotting-fix branch April 29, 2020 22:24
mark-vieira added a commit that referenced this pull request Apr 29, 2020
mark-vieira added a commit that referenced this pull request Apr 29, 2020
@mark-vieira mark-vieira added Team:Delivery Meta label for Delivery team and removed Team:Core/Infra Meta label for core/infra team labels 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 v7.7.1 v7.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants