Skip to content

Conversation

@mark-vieira
Copy link
Contributor

We want to try and cut down the pull request feedback times even more. Right now the long pole is our packaging tests, which take nearly an hour, vs most other checks which are 30 minutes or less. Right now our packaging test builds are structured in a monolithic way, in which we serially test each distribution type for a given target operating system. We could significantly reduce feedback times by splitting these jobs up, and running a job per distribution type.

This PR modifies our distribution testing plugin to add per-type lifecycle tasks which will allow us to structure our CI jobs in the same way. We now create a docker, archives and packages lifecycle task such that we can run all tests for a give distribution type with a single task, or run the whole enchilada with distructiveDistroTest as we have always done.

@mark-vieira mark-vieira requested a review from rjernst March 24, 2020 22:05
@mark-vieira mark-vieira added :Delivery/Build Build or test infrastructure >non-issue labels Mar 24, 2020
@elasticmachine
Copy link
Collaborator

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

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.

Glad to see this will be an easy improvement. I have just a couple comments.

for (ElasticsearchDistribution distribution : distributions) {
TaskProvider<?> destructiveTask = configureDistroTest(project, distribution, dockerSupport);
destructiveDistroTest.configure(t -> t.dependsOn(destructiveTask));
Optional.ofNullable(lifecyleTasks.get(distribution.getType())).ifPresent(p -> p.configure(t -> t.dependsOn(destructiveTask)));
Copy link
Member

Choose a reason for hiding this comment

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

When would this not be present? Shouldn't that be an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you're right. I had initially anticipated something like the integ test zip type, but we aren't testing that here. And if we do add a type we would probably want this to explode rather than silently ignore. I've removed the optional wrapper here.


// Create lifecycle tasks so we can run all tests of a given type
Map<ElasticsearchDistribution.Type, TaskProvider<?>> lifecyleTasks = new HashMap<>();
lifecyleTasks.put(Type.DOCKER, project.getTasks().register("destructiveDistroTest#docker"));
Copy link
Member

Choose a reason for hiding this comment

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

We've used . as the separator in the rest of the tasks in this plugin. Can we reuse that here? It is easier when typing out the task name to not need to add quotes as # requires.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced # with ..

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

@rjernst
Copy link
Member

rjernst commented Mar 24, 2020

I just realized this only adds destructive tasks for use by CI. Can you also add local versions which trigger the appropriate VM tasks?

@mark-vieira
Copy link
Contributor Author

I just realized this only adds destructive tasks for use by CI. Can you also add local versions which trigger the appropriate VM tasks?

Done.

@mark-vieira
Copy link
Contributor Author

@elasticmachine update branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants