Skip to content

Conversation

breskeby
Copy link
Contributor

Ensure projects with only yaml, java or cluster tests also apply precommit checks.
We only apply testingconventions now for projects with existing src test folder
as the TestingConventionsTask is incompatible with projects with no test sourceSet.
This is a prerequisite to port more projects away from using StandaloneRestTestPlugin
and RestTestPlugin in favor of yaml, java or cluster tests with dedicated sourceSets.

Also we fix deprecation warnings for forbiddenPattern and filePermissions tasks about
implicit non declared dependencies on resources tasks

@breskeby breskeby self-assigned this Mar 31, 2022
@breskeby breskeby added :Delivery/Build Build or test infrastructure >enhancement build-benchmark Trigger build benchmark job Team:Delivery Meta label for Delivery team v7.17.3 v8.1.2 v8.2.0 v8.3.0 labels Mar 31, 2022
@breskeby breskeby force-pushed the apply-precommit-checks-for-qa branch 2 times, most recently from e5258b2 to 607c1ce Compare March 31, 2022 13:30
@breskeby breskeby marked this pull request as ready for review April 1, 2022 09:52
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

Ensure projects with only yaml, java or cluster tests also apply precommit checks.

Since we disable testing conventions when a test souceset is missing doesn't this effectively do nothing? For those QA projects that only have rest tests we still won't be running test conventions on them, right?

@breskeby
Copy link
Contributor Author

@elasticsearchmachine update branch

@breskeby
Copy link
Contributor Author

breskeby commented Apr 14, 2022

@mark-vieira yes we would not apply test conventions on them (test conventions is incompatible with non 'test' sourceSet tests, but we would apply any other precommit check (including checkstyle and friends). Once we do not have any test tasks sharing the test sourceSet anymore we can basically remove testingConventions or at least a huge part of it

@breskeby breskeby force-pushed the apply-precommit-checks-for-qa branch from 77bda3d to d1301cd Compare April 14, 2022 06:12
@breskeby breskeby requested a review from mark-vieira April 14, 2022 11:40
Ensure projects with only yaml, java or cluster tests also apply precommit checks.
We only apply testingconventions now for projects with existing src test folder
as the TestingConventionsTask is incompatible with projects with no test sourceSet.
This is a prerequisite to port more projects away from using StandaloneRestTestPlugin
and RestTestPlugin in favor of yaml, java or cluster tests with dedicated sourceSets.

Also we fix deprecation warnings for forbiddenPattern and filePermissions tasks about
implicit non declared dependencies on resources tasks
@breskeby breskeby force-pushed the apply-precommit-checks-for-qa branch from d1301cd to 3eb4b63 Compare April 19, 2022 09:08
@breskeby
Copy link
Contributor Author

@mark-vieira yes we would not apply test conventions on them (test conventions is incompatible with non 'test' sourceSet tests, but we would apply any other precommit check (including checkstyle and friends). Once we do not have any test tasks sharing the test sourceSet anymore we can basically remove testingConventions or at least a huge part of it

@mark-vieira can I have your tick off here or should I understand your 👍 as "approved"? :)

Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

Yep, LGTM.

@breskeby breskeby merged commit 718a241 into elastic:master Apr 20, 2022
@breskeby breskeby deleted the apply-precommit-checks-for-qa branch April 20, 2022 06:55
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Apr 20, 2022
Ensure projects with only yaml, java or cluster tests also apply precommit checks.
We only apply testingconventions now for projects with existing src test folder
as the TestingConventionsTask is incompatible with projects with no test sourceSet.
This is a prerequisite to port more projects away from using StandaloneRestTestPlugin
and RestTestPlugin in favor of yaml, java or cluster tests with dedicated sourceSets.

Also we fix deprecation warnings for forbiddenPattern and filePermissions tasks about
implicit non declared dependencies on resources tasks
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Apr 20, 2022
Ensure projects with only yaml, java or cluster tests also apply precommit checks.
We only apply testingconventions now for projects with existing src test folder
as the TestingConventionsTask is incompatible with projects with no test sourceSet.
This is a prerequisite to port more projects away from using StandaloneRestTestPlugin
and RestTestPlugin in favor of yaml, java or cluster tests with dedicated sourceSets.

Also we fix deprecation warnings for forbiddenPattern and filePermissions tasks about
implicit non declared dependencies on resources tasks
# Conflicts:
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalPluginBuildPlugin.java
#	build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java
#	rest-api-spec/build.gradle
#	test/x-content/build.gradle
#	x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/TrainedModelIT.java
breskeby added a commit that referenced this pull request Apr 20, 2022
Ensure projects with only yaml, java or cluster tests also apply precommit checks.
We only apply testingconventions now for projects with existing src test folder
as the TestingConventionsTask is incompatible with projects with no test sourceSet.
This is a prerequisite to port more projects away from using StandaloneRestTestPlugin
and RestTestPlugin in favor of yaml, java or cluster tests with dedicated sourceSets.

Also we fix deprecation warnings for forbiddenPattern and filePermissions tasks about
implicit non declared dependencies on resources tasks
breskeby added a commit that referenced this pull request Apr 21, 2022
…86029)

Ensure projects with only yaml, java or cluster tests also apply precommit checks.
We only apply testingconventions now for projects with existing src test folder
as the TestingConventionsTask is incompatible with projects with no test sourceSet.
This is a prerequisite to port more projects away from using StandaloneRestTestPlugin
and RestTestPlugin in favor of yaml, java or cluster tests with dedicated sourceSets.

Also we fix deprecation warnings for forbiddenPattern and filePermissions tasks about
implicit non declared dependencies on resources tasks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-benchmark Trigger build benchmark job :Delivery/Build Build or test infrastructure >enhancement Team:Delivery Meta label for Delivery team v7.17.3 v8.1.2 v8.2.0 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants