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-11608] Development environment set up automation #14584

Merged
merged 13 commits into from
May 29, 2021

Conversation

benWize
Copy link
Contributor

@benWize benWize commented Apr 20, 2021

Added local-env-setup.sh to automate the installation of local environment dependencies for new Beam users.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- 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
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status Build Status Build Status --- Build Status ---

Examples testing status on various runners

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

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status 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.

@TheNeuralBit
Copy link
Member

Hm is this intended to replace #14475? Should we close that one?

@benWize
Copy link
Contributor Author

benWize commented Apr 28, 2021

Hm is this intended to replace #14475? Should we close that one?

Yes, the intention is to replace #14475 which we should close.

@TheNeuralBit
Copy link
Member

Thank you! Copying my comment from that PR over here:

Is it possible to de-dupe this with the logic for the development container defined in start-build-env.sh? I think there could be value in having both 1) a development docker container, and 2) a script for installing build requirements locally if using a compatible OS (this) , but we should strive to define the requirements in one place.

For example, could we use this script to install requirements within the development container?

@tysonjh
Copy link
Contributor

tysonjh commented May 4, 2021

Thank you! Copying my comment from that PR over here:

Is it possible to de-dupe this with the logic for the development container defined in start-build-env.sh? I think there could be value in having both 1) a development docker container, and 2) a script for installing build requirements locally if using a compatible OS (this) , but we should strive to define the requirements in one place.
For example, could we use this script to install requirements within the development container?

Yes, this is a good idea. I like the idea of having a single place to define requirements.

@tysonjh
Copy link
Contributor

tysonjh commented May 6, 2021

R: @TheNeuralBit

@tysonjh
Copy link
Contributor

tysonjh commented May 6, 2021

Any update on this work Ben?

@benWize
Copy link
Contributor Author

benWize commented May 6, 2021

Any update on this work Ben?

Yes, @fernando-wizeline and I are checking to have a separate file with package dependencies and install them in both scripts from that list. We expect to push new commits today.

@benWize
Copy link
Contributor Author

benWize commented May 7, 2021

Run RAT PreCommit

@thiscensustaker
Copy link

retest this please

@thiscensustaker
Copy link

Hi @tysonjh! Do you know who can help us to merge this?
Thanks!

@tysonjh
Copy link
Contributor

tysonjh commented May 13, 2021

Hi @tysonjh! Do you know who can help us to merge this?
Thanks!

@TheNeuralBit is out of office right now, I think he'd be the best person and will return on Monday.

Copy link
Member

@TheNeuralBit TheNeuralBit left a comment

Choose a reason for hiding this comment

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

Looks good overall. I have a few suggestions and questions.

fi

# Running on Mac
if [ "$(uname -s)" = "Darwin" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this should be structured as:

kernelname = $(uname -s)
if kernelname == "Linux"
   ...
elseif kernelname == "Darwin"
  ...
else
  echo "Unrecognized Kernel Name: $kernelname"

Right now if we don't hit either if the script just exits silently.

dev-support/docker/Dockerfile Show resolved Hide resolved
id: local_env_install_mac
- name: "Gradle check"
run: "./gradlew checkSetup"
id: local_env_install_gradle_check_mac
Copy link
Member

Choose a reason for hiding this comment

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

Have these been tested?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Brian! Yeah, this has been tested successfully.

inputs:
runDataflow:
description: 'Type "true" if you want to run Dataflow tests (GCP variables must be configured, check CI.md)'
default: false
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a copy-paste error, I don't think a runDataflow input is relevant here.

Copy link
Member

Choose a reason for hiding this comment

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

Hi @fernando-wizeline, just wanted to double-check you saw this and the comment below

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Brian @TheNeuralBit !
Yeah, I already applied both changes and will upload them today.

pull_request:
branches: ['master', 'release-*']
tags: 'v*'
paths: ['sdks/python/**', 'model/**']
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a copy-paste error, I don't think we should restrict this to run only when the Python SDK changes. I'm not sure if there's a reasonable set of paths we can restrict this to, we may just want to run it on every PR.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps changes to the following paths should trigger it:

  • dev-support/**
  • buildSrc/**
  • **/build.gradle
  • sdks/python/setup.py
  • sdks/python/tox.ini

That's almost certainly not exhaustive, but maybe enough.

@aaltay
Copy link
Member

aaltay commented May 27, 2021

What is the next step on this PR?

@fernando-wizeline
Copy link
Contributor

What is the next step on this PR?

Hi Ahmet!
I got distracted by other stuff; we're testing again on our local envs to determine why the virtualenv step is failing on github.

@fernando-wizeline
Copy link
Contributor

Hi @TheNeuralBit @aaltay !
All changes have been applied and the virtualenv issue fixed.
Please let me know what else is needed to merge this.

Thanks a lot for the help!

Copy link
Member

@TheNeuralBit TheNeuralBit left a comment

Choose a reason for hiding this comment

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

LGTM aside from one nit. Thanks for figuring this out!

@@ -36,5 +36,4 @@ python3.6
python3.7
python3.8
tox
virtualenv
Copy link
Member

Choose a reason for hiding this comment

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

nit: since this will affect the dev docker container as well please add virtualenv to the pip install line there:

RUN pip3 install grpcio-tools mypy-protobuf

Copy link
Contributor

Choose a reason for hiding this comment

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

oh good catch!
Dependency added.
Thanks for the heads up!

@codecov
Copy link

codecov bot commented May 29, 2021

Codecov Report

Merging #14584 (dd15d59) into master (3d4db26) will increase coverage by 0.16%.
The diff coverage is n/a.

❗ Current head dd15d59 differs from pull request most recent head 25da8ad. Consider uploading reports for the commit 25da8ad to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14584      +/-   ##
==========================================
+ Coverage   83.62%   83.79%   +0.16%     
==========================================
  Files         445      435      -10     
  Lines       59027    58423     -604     
==========================================
- Hits        49360    48954     -406     
+ Misses       9667     9469     -198     
Impacted Files Coverage Δ
...thon/apache_beam/runners/worker/sdk_worker_main.py 73.04% <0.00%> (-5.14%) ⬇️
...sdks/python/apache_beam/utils/interactive_utils.py 90.24% <0.00%> (-4.88%) ⬇️
...n/apache_beam/runners/direct/test_direct_runner.py 37.50% <0.00%> (-4.81%) ⬇️
...tes/tox/py38/build/srcs/sdks/python/test_config.py 66.66% <0.00%> (-4.77%) ⬇️
...s/sdks/python/apache_beam/runners/test/__init__.py 66.66% <0.00%> (-4.77%) ⬇️
.../python/apache_beam/examples/dataframe/taxiride.py 61.11% <0.00%> (-4.68%) ⬇️
...thon/apache_beam/runners/worker/channel_factory.py 75.00% <0.00%> (-3.95%) ⬇️
...ache_beam/runners/dataflow/test_dataflow_runner.py 32.65% <0.00%> (-2.65%) ⬇️
...ild/srcs/sdks/python/apache_beam/transforms/sql.py 83.33% <0.00%> (-2.39%) ⬇️
.../srcs/sdks/python/apache_beam/portability/utils.py 83.33% <0.00%> (-2.39%) ⬇️
... and 200 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 3d4db26...25da8ad. Read the comment docs.

@TheNeuralBit
Copy link
Member

Thank you!

@TheNeuralBit TheNeuralBit merged commit d8c5da8 into apache:master May 29, 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.

7 participants