diff --git a/build.gradle.kts b/build.gradle.kts index ea1b4e6784e3..a1a3b2cca85c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -528,9 +528,9 @@ tasks.register("python310PostCommit") { tasks.register("python311PostCommit") { dependsOn(":sdks:python:test-suites:dataflow:py311:postCommitIT") - dependsOn(":sdks:python:test-suites:direct:py311:postCommitIT") - dependsOn(":sdks:python:test-suites:direct:py311:hdfsIntegrationTest") - dependsOn(":sdks:python:test-suites:portable:py311:postCommitPy311") + // dependsOn(":sdks:python:test-suites:direct:py311:postCommitIT") + // dependsOn(":sdks:python:test-suites:direct:py311:hdfsIntegrationTest") + // dependsOn(":sdks:python:test-suites:portable:py311:postCommitPy311") } tasks.register("portablePythonPreCommit") { @@ -712,14 +712,12 @@ if (project.hasProperty("javaLinkageArtifactIds")) { } } } -if (project.hasProperty("compileAndRunTestsWithJava11")) { - tasks.getByName("javaPreCommitPortabilityApi").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion") - tasks.getByName("javaExamplesDataflowPrecommit").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion") - tasks.getByName("sqlPreCommit").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion") -} else if (project.hasProperty("compileAndRunTestsWithJava17")) { - tasks.getByName("javaPreCommitPortabilityApi").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion17") - tasks.getByName("javaExamplesDataflowPrecommit").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion17") - tasks.getByName("sqlPreCommit").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion17") +if (project.hasProperty("testJavaVersion")) { + var testVer = project.property("testJavaVersion") + + tasks.getByName("javaPreCommitPortabilityApi").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion$testVer") + tasks.getByName("javaExamplesDataflowPrecommit").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion$testVer") + tasks.getByName("sqlPreCommit").dependsOn(":sdks:java:testing:test-utils:verifyJavaVersion$testVer") } else { allprojects { tasks.withType(Test::class).configureEach { diff --git a/sdks/python/apache_beam/examples/complete/juliaset/juliaset/juliaset_test_it.py b/sdks/python/apache_beam/examples/complete/juliaset/juliaset/juliaset_test_it.py index a2a3262a1fb6..062a9057e47a 100644 --- a/sdks/python/apache_beam/examples/complete/juliaset/juliaset/juliaset_test_it.py +++ b/sdks/python/apache_beam/examples/complete/juliaset/juliaset/juliaset_test_it.py @@ -34,14 +34,15 @@ from apache_beam.testing.test_pipeline import TestPipeline -@pytest.mark.it_postcommit +@pytest.mark.it_postcommit_1 class JuliaSetTestIT(unittest.TestCase): GRID_SIZE = 1000 def test_run_example_with_setup_file(self): - pipeline = TestPipeline(is_integration_test=True) + pipeline = TestPipeline(is_integration_test=False) coordinate_output = FileSystems.join( - pipeline.get_option('output'), + # pipeline.get_option('output'), + '/tmp/' 'juliaset-{}'.format(str(uuid.uuid4())), 'coordinates.txt') extra_args = { diff --git a/sdks/python/apache_beam/runners/portability/stager.py b/sdks/python/apache_beam/runners/portability/stager.py index 4afe5eaaa370..8e4c6a4cbfb9 100644 --- a/sdks/python/apache_beam/runners/portability/stager.py +++ b/sdks/python/apache_beam/runners/portability/stager.py @@ -793,7 +793,13 @@ def _build_setup_package(setup_file, # type: str temp_dir ] _LOGGER.info('Executing command: %s', build_setup_args) - processes.check_output(build_setup_args) + import subprocess + try: + out = subprocess.run(build_setup_args, capture_output=True, check=True) + print(out.stdout) + except subprocess.CalledProcessError as e: + _LOGGER.error('Failed to build setup package: %s', e.output) + raise output_files = glob.glob(os.path.join(temp_dir, '*.tar.gz')) if not output_files: raise RuntimeError( diff --git a/sdks/python/test-suites/dataflow/common.gradle b/sdks/python/test-suites/dataflow/common.gradle index a713b82400e7..b05f4c7d9bb9 100644 --- a/sdks/python/test-suites/dataflow/common.gradle +++ b/sdks/python/test-suites/dataflow/common.gradle @@ -133,7 +133,7 @@ task postCommitIT { "test_opts": testOpts, "sdk_location": project.ext.sdkLocation, "suite": "postCommitIT-df${pythonVersionSuffix}", - "collect": "it_postcommit" + "collect": "it_postcommit_1" ] def cmdArgs = mapToArgString(argMap) exec { @@ -154,7 +154,7 @@ task postCommitArmIT { "test_opts": testOpts, "sdk_location": project.ext.sdkLocation, "suite": "postCommitIT-df${pythonVersionSuffix}", - "collect": "it_postcommit", + "collect": "it_postcommit_1", "py_version": project.ext.pythonVersion, "arch": "ARM" ]