Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-12000] Add Python 3.9 support. #16008

Merged
merged 11 commits into from
Feb 10, 2022
Merged

Conversation

tvalentyn
Copy link
Contributor

@tvalentyn tvalentyn commented Nov 17, 2021

Add Python 3.9 infrastructure and test suites for Apache Beam.

@tvalentyn
Copy link
Contributor Author

run seed job

@tvalentyn
Copy link
Contributor Author

Run Seed Job

@codecov
Copy link

codecov bot commented Nov 17, 2021

Codecov Report

Merging #16008 (2401a11) into master (f3412a4) will increase coverage by 36.83%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #16008       +/-   ##
===========================================
+ Coverage   46.79%   83.62%   +36.83%     
===========================================
  Files         203      452      +249     
  Lines       20044    62252    +42208     
===========================================
+ Hits         9379    52060    +42681     
- Misses       9665    10192      +527     
+ Partials     1000        0     -1000     
Impacted Files Coverage Δ
...apache_beam/typehints/native_type_compatibility.py 86.57% <0.00%> (ø)
sdks/python/apache_beam/__init__.py 85.00% <100.00%> (ø)
sdks/python/apache_beam/runners/common.py 89.98% <100.00%> (ø)
...apache_beam/runners/dataflow/internal/apiclient.py 77.39% <100.00%> (ø)
sdks/go/pkg/beam/core/util/protox/any.go
sdks/go/pkg/beam/io/filesystem/local/local.go
sdks/go/pkg/beam/core/funcx/output.go
sdks/go/pkg/beam/core/metrics/sampler.go
...o/pkg/beam/runners/dataflow/dataflowlib/metrics.go
sdks/go/pkg/beam/transforms/stats/min_switch.go
... and 649 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3412a4...2401a11. Read the comment docs.

@tvalentyn
Copy link
Contributor Author

Run Seed Job

@tvalentyn
Copy link
Contributor Author

Run Python 3.9 PostCommit

@tvalentyn
Copy link
Contributor Author

Run Dataflow Python ValidatesRunner

@tvalentyn
Copy link
Contributor Author

Run Python Dataflow ValidatesRunner

@aaltay
Copy link
Member

aaltay commented Dec 3, 2021

What is the next step on this PR?

@tvalentyn
Copy link
Contributor Author

Next step is to remove changes related to Dataflow Py 3.9 support since that runner needs additional work, and check in bits related to Apache Beam 3.9 support.

@robertwb
Copy link
Contributor

robertwb commented Feb 4, 2022

Is this still being worked on? Are there parts of this CL that we can check in sooner rather than later?

@tvalentyn
Copy link
Contributor Author

yes, it's being worked on as we speak.

@tvalentyn
Copy link
Contributor Author

tvalentyn commented Feb 7, 2022

Thanks for taking a look at BEAM-12914, @robertwb . I will exclude the 4 failing test temporarily in this PR and it should be ready to go.

@tvalentyn tvalentyn force-pushed the py39_containers branch 2 times, most recently from 92b3cf4 to 5a89115 Compare February 7, 2022 23:17
@tvalentyn
Copy link
Contributor Author

R: @AnandInguva

@tvalentyn
Copy link
Contributor Author

Cython currently uninstallable on Py3.9 on Jenkins VMs after Ubuntu upgrade, looking into that.

build.gradle.kts Outdated
}

tasks.register("pythonLintPreCommit") {
// TODO(BEAM-8890): Find a better way to specify lint and formatter tasks without hardcoding py version.
Copy link
Contributor

@AnandInguva AnandInguva Feb 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to verify, for this Jira, I see an issue related to updating google-cloud-java. I don't see anything on lint and formatter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be BEAM-9980

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

tasks.register("portablePythonPreCommit") {
dependsOn(":sdks:python:test-suites:portable:py36:preCommitPy36")
dependsOn(":sdks:python:test-suites:portable:py37:preCommitPy37")
dependsOn(":sdks:python:test-suites:portable:py39:preCommitPy39")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have only py36, py39?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some test suites, the main value may be in testing the highest supported version and the lowest supported version only to save resources and reduce execution time. But, existing suite definitions not always follow this rule and sometimes test random versions. Some suites test all versions.

@tvalentyn
Copy link
Contributor Author

Fixed one more issue (https://issues.apache.org/jira/browse/BEAM-13845 has details)

build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated
dependsOn(":sdks:python:test-suites:tox:py38:archiveFilesToLint")
dependsOn(":sdks:python:test-suites:tox:py38:unpackFilesToLint")
dependsOn(":sdks:python:test-suites:tox:py38:whitespacelint")
}

tasks.register("typescriptPreCommit") {
// TODO(BEAM-8890): Find a better way to specify the tasks without hardcoding py version.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace BEAM-8890 with BEAM-9980

exclude:
# TODO remove exclusion after issue with protobuf is solved
# https://github.com/protocolbuffers/protobuf/issues/7765
- os: windows-latest
python: 3.8
python: 3.9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According the PR, this is solved for 3.9[Wheels are now present for Windows] IIUC. Can you check the PR and if it solved, can we remove the exclude for Python 3.9?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching!

.github/workflows/python_tests.yml Outdated Show resolved Hide resolved
@tvalentyn
Copy link
Contributor Author

Thanks, PTAL, @AnandInguva

@AnandInguva
Copy link
Contributor

LGTM!

@tvalentyn
Copy link
Contributor Author

remaining test failures are unrelated to this PR. I will squash fixups and merge.

@tvalentyn
Copy link
Contributor Author

Run Seed Job

@tvalentyn
Copy link
Contributor Author

Run Python 3.9 PostCommit

@tvalentyn
Copy link
Contributor Author

Run Python Dataflow V2 ValidatesRunner

@tvalentyn
Copy link
Contributor Author

Run Python Dataflow ValidatesRunner

@tvalentyn
Copy link
Contributor Author

Run Python Dataflow ValidatesContainer

@tvalentyn
Copy link
Contributor Author

Run Python Examples_Direct

@tvalentyn
Copy link
Contributor Author

Run Python 3.9 PostCommit

@tvalentyn
Copy link
Contributor Author

Run Python 3.9 PostCommit

@tvalentyn
Copy link
Contributor Author

Run Seed Job

@tvalentyn
Copy link
Contributor Author

Run Python 3.9 PostCommit

@tvalentyn
Copy link
Contributor Author

Merging based on the result of local execution + prior test results.

@tvalentyn tvalentyn merged commit b07840e into apache:master Feb 10, 2022
@tvalentyn tvalentyn deleted the py39_containers branch February 10, 2022 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants