Skip to content

Commit

Permalink
Check why postcommits are failing
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandInguva committed Oct 13, 2023
1 parent 58e3bdd commit b38db05
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
20 changes: 9 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
8 changes: 7 additions & 1 deletion sdks/python/apache_beam/runners/portability/stager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions sdks/python/test-suites/dataflow/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"
]
Expand Down

0 comments on commit b38db05

Please sign in to comment.