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-11607] Add word count tasks #14467

Merged
merged 6 commits into from
Apr 15, 2021

Conversation

isidroamv
Copy link
Contributor

@isidroamv isidroamv commented Apr 7, 2021

This PR adds a task to check the environment setup and tasks for wordCount example for Java, Python, and Go.

R: @tysonjh


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

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • 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.

Post-Commit Tests Status (on master branch)

Lang SDK ULR Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status Build Status --- Build Status ---
Java Build Status Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status --- Build Status Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #14467 (d3a338f) into master (bb7c427) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14467      +/-   ##
==========================================
  Coverage   83.47%   83.47%              
==========================================
  Files         450      898     +448     
  Lines       58806   117956   +59150     
==========================================
+ Hits        49088    98464   +49376     
- Misses       9718    19492    +9774     
Impacted Files Coverage Δ
...rcs/sdks/python/apache_beam/testing/test_stream.py
...hon/apache_beam/runners/dataflow/internal/names.py
...mples/snippets/transforms/elementwise/partition.py
...uild/srcs/sdks/python/apache_beam/metrics/cells.py
...n/apache_beam/runners/dataflow/native_io/iobase.py
...cp/internal/clients/storage/storage_v1_messages.py
.../srcs/sdks/python/apache_beam/io/range_trackers.py
...les/complete/juliaset/juliaset/juliaset_test_it.py
...beam/runners/interactive/background_caching_job.py
.../srcs/sdks/python/apache_beam/utils/annotations.py
... and 1338 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 bb7c427...d3a338f. Read the comment docs.

@tysonjh
Copy link
Contributor

tysonjh commented Apr 8, 2021

It would be helpful to also see the documentation updates to go along with this to make sure the task name makes sense.

@isidroamv
Copy link
Contributor Author

isidroamv commented Apr 8, 2021

It would be helpful to also see the documentation updates to go along with this to make sure the task name makes sense.

This PR will update the documentation based on the work of BEAM-11607 and BEAM-11608

@tysonjh
Copy link
Contributor

tysonjh commented Apr 9, 2021

When I ran this locally, it failed with the following error:


> Task :sdks:python:setupVirtualenv FAILED
created virtual environment CPython3.8.7.final.0-64 in 334ms
  creator CPython3Posix(dest=/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/usr/local/google/home/tysonjh/.local/share/virtualenv)
    added seed packages: pip==21.0.1, pkg_resources==0.0.0, setuptools==54.1.1, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Traceback (most recent call last):
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 8, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 20, in <module>
    from pip._vendor.packaging.utils import canonicalize_name
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_vendor/packaging/utils.py", line 9, in <module>
    from .tags import Tag, parse_tag
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_vendor/packaging/tags.py", line 7, in <module>
    import distutils.util
ModuleNotFoundError: No module named 'distutils.util'

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sdks:python:setupVirtualenv'.
> Process 'command 'sh'' finished with non-zero exit value 1

@isidroamv
Copy link
Contributor Author

When I ran this locally, it failed with the following error:


> Task :sdks:python:setupVirtualenv FAILED
created virtual environment CPython3.8.7.final.0-64 in 334ms
  creator CPython3Posix(dest=/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/usr/local/google/home/tysonjh/.local/share/virtualenv)
    added seed packages: pip==21.0.1, pkg_resources==0.0.0, setuptools==54.1.1, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Traceback (most recent call last):
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 8, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 20, in <module>
    from pip._vendor.packaging.utils import canonicalize_name
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_vendor/packaging/utils.py", line 9, in <module>
    from .tags import Tag, parse_tag
  File "/usr/local/google/home/tysonjh/Development/beam/build/gradleenv/1922375555/lib/python3.8/site-packages/pip/_vendor/packaging/tags.py", line 7, in <module>
    import distutils.util
ModuleNotFoundError: No module named 'distutils.util'

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sdks:python:setupVirtualenv'.
> Process 'command 'sh'' finished with non-zero exit value 1

I already solved this issue. Try again @tysonjh

Copy link
Contributor

@tysonjh tysonjh left a comment

Choose a reason for hiding this comment

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

I'm not able to verify the python tests for some reason due to my local setup. I'm going to ask for someone else to try and merge. Otherwise LGTM.

build.gradle.kts Outdated Show resolved Hide resolved
@tysonjh
Copy link
Contributor

tysonjh commented Apr 13, 2021

R: @udim

@udim
Copy link
Member

udim commented Apr 14, 2021

Runs for me successfully

@udim
Copy link
Member

udim commented Apr 14, 2021

Run PythonLint PreCommit

@udim
Copy link
Member

udim commented Apr 14, 2021

Run Python PreCommit

Copy link
Member

@udim udim left a comment

Choose a reason for hiding this comment

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

LGTM, waiting for tests to pass

@pabloem
Copy link
Member

pabloem commented Apr 15, 2021

I successfully ran this in my environment. I'll merge if that's okay : )

@pabloem pabloem merged commit 0d8f22d into apache:master Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants