apache / beam

Apache Beam is a unified programming model for Batch and Streaming data processing.
https://beam.apache.org/
Apache License 2.0
7.77k stars 4.21k forks source link

[Failing Test]: PostCommit Python and PostCommit Python Arm perma red #31203

Open damondouglas opened 4 months ago

damondouglas commented 4 months ago

What happened?

PostCommit Python and PostCommit Python Arm in perma red status.

Issue Failure

Failure: Test is flaky

Issue Priority

Priority: 2 (backlog / disabled test but we think the product is healthy)

Issue Components

shunping commented 4 months ago

I took a look at the logs in PostCommit Python.

Note that Buffer was introduced in typing_extensions at 4.6.0, but the version resolved here is 4.5.0.

Successfully installed ...(omitted) typing-extensions-4.5.0 ...(omitted)

During checking the previous log, I found that there was an existing version incompatible problem on typing_extensions even before the recent post commit failures. It looks like a lot of packages depend on a newer version of typing-extensions, while tensorflow requires typing-extensions < 4.6.0.

Collecting typing-extensions<4.6.0,>=3.6.6 (from tensorflow>=2.12.0->-r /runner/_work/beam/beam/sdks/python/apache_beam/ml/inference/tensorflow_tests_requirements.txt (line 19))
Downloading typing_extensions-4.5.0-py3-none-any.whl.metadata (8.5 kB)

...

azure-core 1.30.1 requires typing-extensions>=4.6.0, but you have typing-extensions 4.5.0 which is incompatible.
azure-storage-blob 12.20.0b1 requires typing-extensions>=4.6.0, but you have typing-extensions 4.5.0 which is incompatible.
pydantic 2.7.1 requires typing-extensions>=4.6.1, but you have typing-extensions 4.5.0 which is incompatible.
pydantic-core 2.18.2 requires typing-extensions!=4.7.0,>=4.6.0, but you have typing-extensions 4.5.0 which is incompatible.

However this didn't show up as a PostCommit failure until typeguard was introduced as a dependency from https://github.com/apache/beam/blob/3329edba79f7b99af983b22cf44ab6e77a8ee987/sdks/python/apache_beam/transforms/enrichment_handlers/feast_tests_requirements.txt. (Code submitted on 04/26/2024 2:31PM EDT after the last successful run)

Collecting typeguard>=4.0.0 (from feast[gcp]->-r /runner/_work/beam/beam/sdks/python/apache_beam/transforms/enrichment_handlers/feast_tests_requirements.txt (line 18))

In typeguard, the code tries to import Buffer which causes an import error as shown in the traceback.

Adding @riteshghorse who submitted the above commit to the discussion here.

riteshghorse commented 4 months ago

Thanks for the analysis @shunping! I think I can take this one

damondouglas commented 3 months ago

Numerous errors still showing for PostCommit Python: https://github.com/apache/beam/actions/runs/9447564413 https://github.com/apache/beam/actions/runs/9447157024 https://github.com/apache/beam/actions/runs/9447191775 https://github.com/apache/beam/actions/runs/9447544394 https://github.com/apache/beam/actions/runs/9447549306