beam icon indicating copy to clipboard operation
beam copied to clipboard

Enable prism by default (where supported)

Open damccorm opened this issue 8 months ago • 1 comments

Changes the default Python runner to be prism (when prism is supported). Excludes it from interactive environments for now.

TODO: Wait for next release cut so this has time to bake. Then add entry to CHANGES.md before submitting. Make sure that issues exist for all unsupported features

TODO - https://lists.apache.org/thread/rrpdj3b32cz8qhr23x82q9fbg0rn8crr

Part of https://github.com/apache/beam/issues/34549


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with noteworthy changes.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

damccorm avatar Apr 11 '25 19:04 damccorm

Looks like https://github.com/apache/beam/blob/0c92ee9343dfeadc1d2f3ac3d51362000464cda5/sdks/python/apache_beam/transforms/ptransform.py#L579 is the source of a lot of the test failures and that we're not handling applying transforms to non-PCollections in a portable-friendly way. This currently keys off of the process id and pipeline id (not-pickle safe), which is probably causing some problems - https://github.com/apache/beam/blob/0c92ee9343dfeadc1d2f3ac3d51362000464cda5/sdks/python/apache_beam/transforms/ptransform.py#L152

EDIT: I think that this is actually a function of pipelines double executing before https://github.com/apache/beam/pull/34921 was patched. So I think this is fine and my temporary patch can be removed

damccorm avatar May 12 '25 17:05 damccorm

Most remaining flakes should be fixed by https://github.com/apache/beam/pull/35337 with the next release, pausing work until then

damccorm avatar Jun 20 '25 18:06 damccorm

Current persistent (or possibly persistent) test failures:

beam_PreCommit_Python_ML and Python Unit Tests:

  • apache_beam.ml.ts.util_test.PeriodicStreamTest - a few failures, but this is a bad test. See https://github.com/apache/beam/pull/35300#issuecomment-2997517699 - if needed can fix here, but I'd rather we make some changes upstream

beam_PreCommit_Python:

  • apache_beam/io/textio_test.py::TextSinkTest::test_write_pipeline_footer - not sure what the issue is yet

beam_PreCommit_Python_Transforms:

  • apache_beam/transforms/userstate_test.py::StatefulDoFnOnDirectRunnerTest::test_stateful_set_state_clean_portably

Linting/formatting - I'll deal with this later

There are also some other flakes, which may or may not be related to this change

damccorm avatar Jun 23 '25 18:06 damccorm

R: @shunping

damccorm avatar Jul 01 '25 16:07 damccorm

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

github-actions[bot] avatar Jul 01 '25 16:07 github-actions[bot]

There were failing postcommit tests, but not on prism, so I'm not going to block merging

damccorm avatar Jul 15 '25 13:07 damccorm

There are tests failing after this PR, could it be related?

https://github.com/apache/beam/actions/workflows/beam_PostCommit_Python_Xlang_Gcp_Direct.yml?query=event%3Aschedule

https://github.com/apache/beam/actions/workflows/beam_PostCommit_Yaml_Xlang_Direct.yml?query=event%3Aschedule

Abacn avatar Jul 16 '25 14:07 Abacn

There are tests failing after this PR, could it be related?

https://github.com/apache/beam/actions/workflows/beam_PostCommit_Python_Xlang_Gcp_Direct.yml?query=event%3Aschedule

https://github.com/apache/beam/actions/workflows/beam_PostCommit_Yaml_Xlang_Direct.yml?query=event%3Aschedule

I think it likely is - https://github.com/apache/beam/pull/35608 tested these workflows with extended timeouts and they still failed. Temporarily reverting the core of this change here - https://github.com/apache/beam/pull/35610

damccorm avatar Jul 16 '25 17:07 damccorm