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

Fix Python PostCommit Example CustomPTransformIT on portable #24159

Merged
merged 2 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Python_Examples_Flink',
gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
tasks(":sdks:python:test-suites:portable:flinkExamplesPostCommit")
switches("-PflinkConfDir=$WORKSPACE/src/runners/flink/src/test/resources")
commonJobProperties.setGradleSwitches(delegate)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ def get_args(argv):

def run(argv=None):
known_args, pipeline_args = get_args(argv)
options = PipelineOptions(pipeline_args)

run_count1(known_args, options)
run_count2(known_args, options)
run_count3(known_args, options)
# pipeline initialization may modify PipelineOptions object.
# Create instances for each.
run_count1(known_args, PipelineOptions(pipeline_args))
run_count2(known_args, PipelineOptions(pipeline_args))
run_count3(known_args, PipelineOptions(pipeline_args))


if __name__ == '__main__':
Expand Down
8 changes: 8 additions & 0 deletions sdks/python/test-suites/portable/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ project.tasks.register("flinkExamples") {
"--environment_type=LOOPBACK",
"--temp_location=gs://temp-storage-for-end-to-end-tests/temp-it",
"--flink_job_server_jar=${project(":runners:flink:${latestFlinkVersion}:job-server").shadowJar.archivePath}",
'--sdk_harness_log_level_overrides=' +
// suppress info level flink.runtime log flood
'{\\"org.apache.flink.runtime\\":\\"WARN\\",' +
// suppress full __metricscontainers log printed in FlinkPipelineRunner.createPortablePipelineResult
'\\"org.apache.beam.runners.flink.FlinkPipelineRunner\\":\\"WARN\\"}'
]
def cmdArgs = mapToArgString([
"test_opts": testOpts,
Expand Down Expand Up @@ -312,6 +317,9 @@ project.tasks.register("postCommitPy${pythonVersionSuffix}IT") {
// suppress metric name collision warning logs
'\\"org.apache.flink.runtime.metrics.groups\\":\\"ERROR\\"}'
]
if (project.hasProperty('flinkConfDir')) {
pipelineOpts += ["--flink-conf-dir=${project.property('flinkConfDir')}"]
}
def cmdArgs = mapToArgString([
"test_opts": testOpts,
"suite": "postCommitIT-flink-py${pythonVersionSuffix}",
Expand Down