You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Number of Python examples are failing for Flink and Spark on 2.43.0 release branch #23907
RuntimeError: Pipeline BeamApp-jenkins-1028002928-4325f8c5_d8258ff0-6727-4335-867f-56bc846d9f3e failed in state FAILED: java.lang.IllegalArgumentException: PCollectionNodes [PCollectionNode{id=ref_PCollection_PCollection_52, PCollection=unique_name: "61Write/BigQueryBatchFileLoads/TriggerLoadJobsWithoutTempTables.None"
coder_id: "ref_Coder_FastPrimitivesCoder_3"
is_bounded: BOUNDED
windowing_strategy_id: "ref_Windowing_Windowing_1"
}] were consumed but never produced
I found #21300 that probably explain some example failures but this doesn't explain all failures above.
Valentyn, are there any known issues that explain these failures ?
Looks like failed tests are all BigQuery tests. Both have been failed after Sept 14th. Possible related changes on the Day of 14th: #23122 and/or #23012
Seeing a lot of ValueError: Unable to parse jar URL "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python_Examples_Spark/src/runners/spark/2/job-server/build/libs/beam-runners-spark-3-job-server-2.44.0-SNAPSHOT.jar". If using a full URL, make sure the scheme is specified. If using a local file path, make sure the file exists; you may have to first build the job server using './gradlew runners:spark:3:job-server:shadowJar'.
Is this familiar to anyone?
Seeing a lot of ValueError: Unable to parse jar URL "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python_Examples_Spark/src/runners/spark/2/job-server/build/libs/beam-runners-spark-3-job-server-2.44.0-SNAPSHOT.jar". If using a full URL, make sure the scheme is specified. If using a local file path, make sure the file exists; you may have to first build the job server using './gradlew runners:spark:3:job-server:shadowJar'. Is this familiar to anyone?
The affected tests have a step that writes to BQ with FILE_LOADS. I've been reproducing locally with other tests and found that pipelines with this write method don't even start on Flink runner. They pass with STREAMING_INSERTS method though.
The errors showing up in Spark examples in @mosche 's fix in #23936 (here) now show the same error: RuntimeError: Pipeline BeamApp-jenkins-1102122925-c4be4910_cbaf26e4-874a-42dc-adf1-f3a63242d10c failed in state FAILED: java.lang.IllegalArgumentException: PCollectionNodes [PCollectionNode{id=ref_PCollection_PCollection_52, PCollection=unique_name: "61Write/BigQueryBatchFileLoads/TriggerLoadJobsWithoutTempTables.None" coder_id: "ref_Coder_FastPrimitivesCoder_3" is_bounded: BOUNDED windowing_strategy_id: "ref_Windowing_Windowing_1" }] were consumed but never produced
Update: this fails when the pipeline writes with FILE_LOADS and is paired with a BigqueryMatcher to verify (example here).
Update#2: it's actually not the BigqueryMatcher, but it's when test args are passed into the Pipeline() instantiation (eg here)
---> ie. telling the pipeline to use FlinkRunner... so nothing too helpful yet.
The error is caused by this beam.Flatten() operation that merges the results from two transforms. In most cases, one of those transforms, label: TriggerLoadJobsWithoutTempTables, will not be used and so will not have any elements to output. Hence, this transform is "consumed but never produced" by the Flatten operation.
This is not an issue for DirectRunner and DataflowRunner, but is caught by Flink and Spark.
#23954 is a workaround. The relevant BQ tests in that PR are passing now, though there are other tests in Flink and Spark example suites that are failing relatively recently (just a day ago).
Activity
chamikaramj commentedon Oct 31, 2022
P0 since this is blocking the ongoing Beam release.
tvalentyn commentedon Oct 31, 2022
Did these pass on previous release? If so, errors should be bisectable.
Abacn commentedon Oct 31, 2022
Looks like failed tests are all BigQuery tests. Both have been failed after Sept 14th. Possible related changes on the Day of 14th: #23122 and/or #23012
tvalentyn commentedon Nov 1, 2022
Thanks, @Abacn . The first change affects go sdk only. #23012 looks suspicious. @ahmedabu98 could you please take a look?
chamikaramj commentedon Nov 1, 2022
Confirmed that this:
Passes on 2.42.0 branch
Fails on 2.43.0 branch
Fails on master
Will also try a revert.
chamikaramj commentedon Nov 1, 2022
Fails for commit ac37784
Passes for commit 2d4f61c (one before above).
So the culprit seems to be ac37784
@ahmedabu98 can you please take a look ? We can either do a forward fix in the release branch or revert this if we can revert cleanly.
To reproduce locally, you can run the command below.
./gradlew :sdks:python:test-suites:portable:py37:flinkExamples
ahmedabu98 commentedon Nov 1, 2022
Seeing a lot of
ValueError: Unable to parse jar URL "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python_Examples_Spark/src/runners/spark/2/job-server/build/libs/beam-runners-spark-3-job-server-2.44.0-SNAPSHOT.jar". If using a full URL, make sure the scheme is specified. If using a local file path, make sure the file exists; you may have to first build the job server using './gradlew runners:spark:3:job-server:shadowJar'.Is this familiar to anyone?
2 remaining items
Fix Spark 3 job-server jar path for Python test suites (closes apache…
mosche commentedon Nov 2, 2022
Sorry @Abacn @ahmedabu98 @chamikaramj, my bad! This slipped in #23751 when migrating to the Spark 3 job-server. Fixed it here: #23936
ahmedabu98 commentedon Nov 2, 2022
Great 👍🏽 that solves the spark issues. Still looking into why those BQ tests are not starting.
ahmedabu98 commentedon Nov 2, 2022
The affected tests have a step that writes to BQ with
FILE_LOADS. I've been reproducing locally with other tests and found that pipelines with this write method don't even start on Flink runner. They pass withSTREAMING_INSERTSmethod though.The errors showing up in Spark examples in @mosche 's fix in #23936 (here) now show the same error:
RuntimeError: Pipeline BeamApp-jenkins-1102122925-c4be4910_cbaf26e4-874a-42dc-adf1-f3a63242d10c failed in state FAILED: java.lang.IllegalArgumentException: PCollectionNodes [PCollectionNode{id=ref_PCollection_PCollection_52, PCollection=unique_name: "61Write/BigQueryBatchFileLoads/TriggerLoadJobsWithoutTempTables.None" coder_id: "ref_Coder_FastPrimitivesCoder_3" is_bounded: BOUNDED windowing_strategy_id: "ref_Windowing_Windowing_1" }] were consumed but never producedahmedabu98 commentedon Nov 2, 2022
Update: this fails when the pipeline writes with
FILE_LOADSand is paired with aBigqueryMatcherto verify (example here).Update#2: it's actually not the BigqueryMatcher, but it's when test args are passed into the Pipeline() instantiation (eg here)
---> ie. telling the pipeline to use FlinkRunner... so nothing too helpful yet.
ahmedabu98 commentedon Nov 2, 2022
The error is caused by this
beam.Flatten()operation that merges the results from two transforms. In most cases, one of those transforms, label:TriggerLoadJobsWithoutTempTables, will not be used and so will not have any elements to output. Hence, this transform is"consumed but never produced"by the Flatten operation.This is not an issue for DirectRunner and DataflowRunner, but is caught by Flink and Spark.
chamikaramj commentedon Nov 2, 2022
Hmm, that's strange. I don't think Flatten requires the input PCollections to be non-empty but there might be an existing Flink/Spark bug here.
ahmedabu98 commentedon Nov 2, 2022
Yeah I'm beginning to doubt my assessment because this was always the setup...
One thing #23012 did change though: the main output of
TriggerLoadJobsis now produced by a return statement, previously was by a yield statement.ahmedabu98 commentedon Nov 2, 2022
#23954 is a workaround. The relevant BQ tests in that PR are passing now, though there are other tests in Flink and Spark example suites that are failing relatively recently (just a day ago).
Fix Spark 3 job-server jar path for Python test suites (closes apache…