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

Ensure running precommit task compiles all project source sets #69728

Merged

Conversation

mark-vieira
Copy link
Contributor

When configuring the precommit task we attach any source set compile tasks as dependencies so that running precommit verifies that all code in the repository can at least correctly compile. This was done via simply iterating over the SourceSetContainer as a simple collection, which is susceptible to configuration ordering issues if a subsequently applied plugin registers a new source set, which is often the case for our REST testing plugins. This pull request refactors this logic to use the lazy all() callback approach so that we ensure any source sets added later will also be properly wired up to the precommit task.

Closes #69715

@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label Mar 1, 2021
@mark-vieira mark-vieira requested a review from rjernst March 1, 2021 17:12
@elasticmachine elasticmachine added the Team:Delivery Meta label for Delivery team label Mar 1, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

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

@mark-vieira
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@breskeby breskeby self-requested a review March 2, 2021 17:26
Copy link
Contributor

@breskeby breskeby left a comment

Choose a reason for hiding this comment

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

👍

@mark-vieira mark-vieira merged commit 7fea2ee into elastic:master Mar 2, 2021
@mark-vieira mark-vieira deleted the fix-precommit-compile-dependencies branch March 2, 2021 17:36
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.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Precommit does not compile all the things
5 participants