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

Do not create unused testCluster #77581

Merged

Conversation

breskeby
Copy link
Contributor

@breskeby breskeby commented Sep 10, 2021

This avoids creating test clusters that are not required during the build.
We use lazy configuration here on testClusters and only instantiate them as required.

Also updated BUILDING.MD giving hints on using test cluster plugin properly

@breskeby breskeby self-assigned this Sep 10, 2021
@breskeby breskeby added :Delivery/Build Build or test infrastructure >enhancement Team:Delivery Meta label for Delivery team v7.16.0 v8.0.0 labels Sep 10, 2021
@breskeby breskeby force-pushed the create-less-unused-cluster branch 2 times, most recently from e6120e2 to 11b90e2 Compare September 13, 2021 09:14
@breskeby breskeby marked this pull request as ready for review September 13, 2021 09:20
@elasticmachine
Copy link
Collaborator

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

@breskeby breskeby force-pushed the create-less-unused-cluster branch 4 times, most recently from 8e127c4 to eca88f7 Compare September 16, 2021 14:56
@breskeby breskeby force-pushed the create-less-unused-cluster branch from 8bf6eaf to 354687b Compare September 20, 2021 14:02
@@ -20,8 +20,8 @@ dependencies {
}

for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
String baseName = "v${bwcVersion}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This solves a problem with for loops and lazy evaluated strings that causes late resolved GStrings to only contain the last bwcVersion of the for loop

Copy link
Contributor

Choose a reason for hiding this comment

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

Ug, I've been bitten by that so many times.

@breskeby
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/part-2

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.

LGTM, although I wish using lazy configured domain objects didn't introduce so much awkwardness in our build scripts.

@breskeby breskeby force-pushed the create-less-unused-cluster branch from 65d79aa to f7dab15 Compare September 22, 2021 09:54
@breskeby breskeby added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Sep 23, 2021
@elasticsearchmachine elasticsearchmachine merged commit 6ef13ab into elastic:master Sep 23, 2021
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Sep 27, 2021
* Do not create unused testCluster

This avoids creating test clusters that are not required during the build.
We use lazy configuration here on testClusters and only instantiate them as theyre

* Do not fail on run task (debug)

* Create more test cluster lazy

* Make more test cluster lazy

* Avoid creating unused testcluster

* Fix PluginBuildPlugin

* Fix disabling geo db download

* Fix cluster setup in repository-multi-version

* Polishing

* Fix issue with irretic groovy ogic

* Fix bwc tests

* Fix more bwcTests

* Fix more bwc tests

* Fix more bwc tests

* Fix more bwc tests

* Fix typo

* Minor polishing

* Fix rolling upgrade tests

* Fix cluster config in sql qa mixedcluster project

* Fix more bwc tests

* Clean up before review

* Document test cluster usage

* Api polising after Review

provide useCluster(Provider) method to TestClusterAware

Ideally we take this a step further and realize those test clusters only on use.
But out of scope of this PR.

* Allow gradle provider as value for nonSystemProperties

* Some simplification on test configuration

* Fix typo in rest test config

* Fix more typos

* Fix another typo

* Fix more typos
elasticsearchmachine pushed a commit that referenced this pull request Sep 27, 2021
* Do not create unused testCluster (#77581)

* Do not create unused testCluster

This avoids creating test clusters that are not required during the build.
We use lazy configuration here on testClusters and only instantiate them as theyre

* Do not fail on run task (debug)

* Create more test cluster lazy

* Make more test cluster lazy

* Avoid creating unused testcluster

* Fix PluginBuildPlugin

* Fix disabling geo db download

* Fix cluster setup in repository-multi-version

* Polishing

* Fix issue with irretic groovy ogic

* Fix bwc tests

* Fix more bwcTests

* Fix more bwc tests

* Fix more bwc tests

* Fix more bwc tests

* Fix typo

* Minor polishing

* Fix rolling upgrade tests

* Fix cluster config in sql qa mixedcluster project

* Fix more bwc tests

* Clean up before review

* Document test cluster usage

* Api polising after Review

provide useCluster(Provider) method to TestClusterAware

Ideally we take this a step further and realize those test clusters only on use.
But out of scope of this PR.

* Allow gradle provider as value for nonSystemProperties

* Some simplification on test configuration

* Fix typo in rest test config

* Fix more typos

* Fix another typo

* Fix more typos

* Fix runEqlCorrectnessNode run task and cluster configuration (#78249)

* Fix merge issue

* Fix bwc tests after backporting
@breskeby breskeby deleted the create-less-unused-cluster branch December 10, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Delivery/Build Build or test infrastructure >enhancement Team:Delivery Meta label for Delivery team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants