Skip to content

Commit

Permalink
Default to THROUGHPUT_BASED autoscaling for classic templates (Google…
Browse files Browse the repository at this point in the history
…CloudPlatform#1403)

* single commit off of master

* No-op comment change to kick copybara

* Revert "No-op comment change to kick copybara"

This reverts commit 928dc6b.

* Different no-op to kick copybara and avoid conflicts

* One more try to get copybara to merge
  • Loading branch information
damccorm authored Apr 5, 2024
1 parent 5dacf36 commit 980e7ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ protected String stageClassicTemplate(
arguments.add(element("argument", "--templateLocation=" + templatePath));
arguments.add(element("argument", "--project=" + projectId));
arguments.add(element("argument", "--region=" + region));
if (imageSpec.getMetadata().isStreaming()) {
// Default to THROUGHPUT_BASED autoscaling for streaming classic templates
arguments.add(element("argument", "--autoscalingAlgorithm=THROUGHPUT_BASED"));
arguments.add(element("argument", "--maxNumWorkers=5"));
}

if (gcpTempLocation != null) {
String gcpTempLocationPath = "gs://" + bucketNameOnly(gcpTempLocation) + "/temp/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ public void testPubSubToSplunkUsingAtleastOnceMode() throws IOException {
.addParameter("token", splunkResourceManager.getHecToken())
.addParameter("batchCount", "1")
.addEnvironment("additionalExperiments", experiments)
.addEnvironment("enableStreamingEngine", true);
.addEnvironment("enableStreamingEngine", true)
.addEnvironment("maxWorkers", 10);
testPubSubToSplunkMain(parameters, false);
}
}

0 comments on commit 980e7ab

Please sign in to comment.