Skip to content

Commit ee92a55

Browse files
authored
Disable public IP for Dataflow Python and Go Validate runner tests (#38990)
1 parent 2802de3 commit ee92a55

5 files changed

Lines changed: 17 additions & 3 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"comment": "Modify this file in a trivial way to cause this test suite to run.",
3-
"modification": 2
3+
"modification": 3
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"comment": "Modify this file in a trivial way to cause this test suite to run",
3-
"modification": 4
3+
"modification": 5
44
}

sdks/go/test/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ task dataflowValidatesRunner() {
3636
dependsOn ":sdks:go:test:goBuild"
3737

3838
doLast {
39+
def pipelineOptions = ["--no_use_public_ips"]
3940
def options = [
4041
"--runner dataflow",
42+
"--pipeline_opts \"${pipelineOptions.join(' ')}\"",
4143
]
4244
exec {
4345
if (fork_java_home) {
@@ -59,6 +61,7 @@ task dataflowValidatesRunnerARM64() {
5961
doLast {
6062
def pipelineOptions = [ // Pipeline options piped directly to Go SDK flags.
6163
"--machine_type=t2a-standard-1",
64+
"--no_use_public_ips",
6265
]
6366
def options = [
6467
"--runner dataflow",

sdks/python/scripts/run_integration_test.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
# flag is specified, all above flag will be ignored.
4343
# Please include all required pipeline options when
4444
# using this flag.
45+
# additional_opts -> List of space separated pipeline options. Unlike pipeline_opts,
46+
# it appends to other flags options instead of ignoring them.
4547
#
4648
# Test related flags:
4749
# test_opts -> List of space separated options to configure Pytest test
@@ -150,6 +152,11 @@ case $key in
150152
shift # past argument
151153
shift # past value
152154
;;
155+
--additional_opts)
156+
ADDITIONAL_OPTS="$2"
157+
shift # past argument
158+
shift # past value
159+
;;
153160
--test_opts)
154161
TEST_OPTS="$2"
155162
shift # past argument
@@ -257,7 +264,9 @@ if [[ -z $PIPELINE_OPTS ]]; then
257264
fi
258265

259266
PIPELINE_OPTS=$(IFS=" " ; echo "${opts[*]}")
260-
267+
if [[ -n $ADDITIONAL_OPTS ]]; then
268+
PIPELINE_OPTS+=" ${ADDITIONAL_OPTS}"
269+
fi
261270
fi
262271

263272
# Handle double quotes in PIPELINE_OPTS

sdks/python/test-suites/dataflow/common.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ task validatesRunnerBatchTests {
245245
doLast {
246246
def argMap = [
247247
"test_opts" : basicPytestOpts + ["--numprocesses=8"],
248+
"additional_opts": ['--no_use_public_ips'],
248249
"sdk_location": project.ext.sdkLocation,
249250
"suite" : "validatesRunnerBatchTests-df${pythonVersionSuffix}",
250251
"collect": "it_validatesrunner and not no_sickbay_batch"
@@ -266,6 +267,7 @@ task validatesRunnerStreamingTests {
266267
doFirst {
267268
def argMap = [
268269
"test_opts": basicPytestOpts + ["--numprocesses=8"],
270+
"additional_opts": ['--no_use_public_ips'],
269271
"streaming": "true",
270272
"sdk_location": project.ext.sdkLocation,
271273
"suite": "validatesRunnerStreamingTests-df${pythonVersionSuffix}-xdist",

0 commit comments

Comments
 (0)