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

simplify ./gradlew run-ccs #89711

Merged
merged 2 commits into from
Aug 30, 2022
Merged

simplify ./gradlew run-ccs #89711

merged 2 commits into from
Aug 30, 2022

Conversation

jakelandis
Copy link
Contributor

This commit reverts the changes introduced via #89442 / 20ed7e3
and re-implements the same goals but with fewer changes. Also included in this commit
is the ability to change the proxyMode via system property and mention of this
new run task in the testing documentation.

===

While working #89563 I found a better pattern that does not require updates to the run task. I think this approach is cleaner especially for debugging.

@github-actions
Copy link
Contributor

Documentation preview:

@@ -37,8 +37,8 @@ default void useCluster(Provider<ElasticsearchCluster> cluster) {

default void beforeStart() {}

default void enableDebug(int portOffset) {
int debugPort = 5007 + portOffset;
default void enableDebug() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

part of the revert

@@ -104,7 +104,7 @@ public WorkResult delete(Object... objects) {
@Override
public void beforeStart() {
if (debugServer) {
enableDebug(0);
enableDebug();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

part of the revert

@@ -35,16 +35,12 @@ public class RunTask extends DefaultTestClustersTask {

private Boolean debug = false;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all changes are part of the revert

node.setting('cluster.remote.my_remote_cluster.seeds', fulfillingCluster.get().getAllTransportPortURI().collect { "\"$it\"" }.toString())
}
}
queryingCluster.get().restart() //updates the on-disk config
Copy link
Contributor Author

@jakelandis jakelandis Aug 29, 2022

Choose a reason for hiding this comment

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

this is the main change. specifically calling .restart() to update the configuration on disk

@jakelandis jakelandis added >non-issue :Delivery/Build Build or test infrastructure labels Aug 29, 2022
@jakelandis jakelandis requested a review from mark-vieira August 29, 2022 23:39
@jakelandis jakelandis marked this pull request as ready for review August 29, 2022 23:40
@elasticsearchmachine elasticsearchmachine added the Team:Delivery Meta label for Delivery team label Aug 29, 2022
@elasticsearchmachine
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.

LGTM

@jakelandis
Copy link
Contributor Author

thanks Mark!

@jakelandis jakelandis changed the title reimplement ./gradlew run-ccs simplify ./gradlew run-ccs Aug 30, 2022
@jakelandis jakelandis merged commit 54e1309 into elastic:main Aug 30, 2022
@jakelandis jakelandis deleted the fix_run_ccs branch August 30, 2022 17:41
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 >non-issue Team:Delivery Meta label for Delivery team v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants