Skip to content

[BEAM-13008] Create gradle tasks for the Beam Playground - #15761

Merged
pabloem merged 6 commits into
apache:masterfrom
damondouglas:BEAM-13008-playground-build-gradle
Oct 21, 2021
Merged

[BEAM-13008] Create gradle tasks for the Beam Playground#15761
pabloem merged 6 commits into
apache:masterfrom
damondouglas:BEAM-13008-playground-build-gradle

Conversation

@damondouglas

@damondouglasdamondouglas commented Oct 20, 2021

Copy link
Copy Markdown
Contributor

This PR creates gradle tasks for the Beam Playground project as well as a bundled playgroundPrecommit task. Future work needs to configure the precommit process to install necessary dependencies to properly run the playgroundPrecommit task. Note that when running ./gradlew playgroundPrecommit in the current state will show multiple issues and errors in the playground code.

I'd like to request the following reviewers or whomever they delegate.
R: @pabloem
R: @tvalentyn

./gradlew playground:tasks
./gradlew playground:backend:tasks
./gradlew playground:frontend:tasks

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.

ValidatesRunner compliance status (on master branch)

LangULRDataflowFlinkSamzaSparkTwister2
Go---Build StatusBuild StatusBuild StatusBuild Status---
JavaBuild StatusBuild 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 StatusBuild Status---
XLangBuild StatusBuild StatusBuild StatusBuild StatusBuild Status---

Examples testing status on various runners

LangULRDataflowFlinkSamzaSparkTwister2
Go---------------------
Java---Build Status
Build Status
Build Status
---------------
Python---------------------
XLang---------------------

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

GoJavaPython
Build StatusBuild StatusBuild Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

---JavaPythonGoWebsiteWhitespaceTypescript
Non-portableBuild Status
Build Status
Build Status
Build Status
Build Status
Build StatusBuild StatusBuild StatusBuild Status
Portable---Build StatusBuild 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

codecovBot commented Oct 20, 2021

Copy link
Copy Markdown

Codecov Report

Merging #15761 (b0ff33f) into master (a05aa45) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #15761 +/- ##
==========================================
- Coverage 83.54% 83.52% -0.02% 
==========================================
Files 445 445 Lines 61185 61185 ==========================================
- Hits 51114 51107 -7 - Misses 10071 10078 +7 
Impacted FilesCoverage Δ
sdks/python/apache_beam/utils/interactive_utils.py92.68% <0.00%> (-2.44%)⬇️
...hon/apache_beam/runners/direct/test_stream_impl.py94.02% <0.00%> (-2.24%)⬇️
sdks/python/apache_beam/io/source_test_utils.py88.47% <0.00%> (-1.39%)⬇️
...ks/python/apache_beam/runners/worker/sdk_worker.py89.25% <0.00%> (-0.17%)⬇️
...hon/apache_beam/runners/worker/bundle_processor.py93.64% <0.00%> (+0.12%)⬆️

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 a05aa45...b0ff33f. Read the comment docs.

Comment threadsettings.gradle.kts Outdated
Comment threadbuild.gradle.kts Outdated
@pabloem

Copy link
Copy Markdown
Member

have you ran this locally? can you share the output?

@damondouglas

damondouglas commented Oct 20, 2021

Copy link
Copy Markdown
ContributorAuthor

(cc: @pabloem )
The following is the output running:

./gradlew playgroundPrecommit

@ilya-kozyrev would you mind to fix the following and make a PR to https://github.com/damondouglas/beam/tree/BEAM-13008-playground-build-gradle. Also you'll want to confirm that the ./gradlew playground:generateProto task either generates in the right place or change the go dependency references.

> Task :playground:backend:tidy FAILED
go: finding module for package beam.apache.org/playground/backend/internal/environment
beam.apache.org/playground/backend/cmd/server imports
beam.apache.org/playground/backend/internal/environment: cannot find module providing package beam.apache.org/playground/backend/internal/environment: unrecognized import path "beam.apache.org/playground/backend/internal/environment": reading https://beam.apache.org/playground/backend/internal/environment?go-get=1: 404 Not Found

@ElessarST would you mind to fix the following and make a PR to https://github.com/damondouglas/beam/tree/BEAM-13008-playground-build-gradle.

  1. For the mockito related errors, I realize there is this SOF post about commiting/notcommiting mockito generated code. I personally am in favor of commiting but I'll leave it to your judgement to figure out a way to make the ./gradlew playgroundPrecommit pass either through another gradle task that would generate these dependencies.

  2. Also you'll want to confirm that the ./gradlew playground:generateProto task either generates in the right place or change the dart dependency references.

> Task :playground:frontend:analyze FAILED
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:21:8 - Target of URI doesn't exist: 'package:playground/generated/playground.pbgrpc.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist. - uri_does_not_exist
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:103:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:103:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:105:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:105:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:107:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:107:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:109:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:109:12 - Case expressions must be constant. - non_constant_case_expression
error - test/modules/editor/repository/code_repository/code_repository_test.dart:31:8 - Target of URI doesn't exist: 'code_repository_test.mocks.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist. - uri_does_not_exist
error - test/modules/editor/repository/code_repository/code_repository_test.dart:54:22 - The function 'MockCodeClient' isn't defined. Try importing the library that defines 'MockCodeClient', correcting the name to the name of an existing function, or defining a function named 'MockCodeClient'. - undefined_function
error - test/modules/editor/repository/code_repository/code_repository_test.dart:87:22 - The function 'MockCodeClient' isn't defined. Try importing the library that defines 'MockCodeClient', correcting the name to the name of an existing function, or defining a function named 'MockCodeClient'. - undefined_function
error - test/modules/editor/repository/code_repository/code_repository_test.dart:121:22 - The function 'MockCodeClient' isn't defined. Try importing the library that defines 'MockCodeClient', correcting the name to the name of an existing function, or defining a function named 'MockCodeClient'. - undefined_function
13 issues found.

Comment threadbuild.gradle.kts
"playground/frontend/assets/**/*.svg",
"playground/frontend/assets/**/*.png",
"playground/frontend/assets/**/*.jpg",
"playground/frontend/**/*.svg",

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@ElessarST@ilya-kozyrev (cc: @pabloem ) what is the license for these SVGs?

@pabloem

Copy link
Copy Markdown
Member

LGTM. This is wonderful.

@pabloem

Copy link
Copy Markdown
Member

Run Java PreCommit

@ElessarST

Copy link
Copy Markdown
Contributor

@damondouglas I created PR with frontend changes damondouglas#2

@ilya-kozyrev

Copy link
Copy Markdown
Contributor

(cc: @pabloem ) The following is the output running:

./gradlew playgroundPrecommit

@ilya-kozyrev would you mind to fix the following and make a PR to https://github.com/damondouglas/beam/tree/BEAM-13008-playground-build-gradle. Also you'll want to confirm that the ./gradlew playground:generateProto task either generates in the right place or change the go dependency references.

> Task :playground:backend:tidy FAILED
go: finding module for package beam.apache.org/playground/backend/internal/environment
beam.apache.org/playground/backend/cmd/server imports
beam.apache.org/playground/backend/internal/environment: cannot find module providing package beam.apache.org/playground/backend/internal/environment: unrecognized import path "beam.apache.org/playground/backend/internal/environment": reading https://beam.apache.org/playground/backend/internal/environment?go-get=1: 404 Not Found

@ElessarST would you mind to fix the following and make a PR to https://github.com/damondouglas/beam/tree/BEAM-13008-playground-build-gradle.

  1. For the mockito related errors, I realize there is this SOF post about commiting/notcommiting mockito generated code. I personally am in favor of commiting but I'll leave it to your judgement to figure out a way to make the ./gradlew playgroundPrecommit pass either through another gradle task that would generate these dependencies.
  2. Also you'll want to confirm that the ./gradlew playground:generateProto task either generates in the right place or change the dart dependency references.
> Task :playground:frontend:analyze FAILED
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:21:8 - Target of URI doesn't exist: 'package:playground/generated/playground.pbgrpc.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist. - uri_does_not_exist
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:103:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:103:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:105:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:105:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:107:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:107:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:109:12 - Case expressions must be constant. - non_constant_case_expression
error - lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart:109:12 - Case expressions must be constant. - non_constant_case_expression
error - test/modules/editor/repository/code_repository/code_repository_test.dart:31:8 - Target of URI doesn't exist: 'code_repository_test.mocks.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist. - uri_does_not_exist
error - test/modules/editor/repository/code_repository/code_repository_test.dart:54:22 - The function 'MockCodeClient' isn't defined. Try importing the library that defines 'MockCodeClient', correcting the name to the name of an existing function, or defining a function named 'MockCodeClient'. - undefined_function
error - test/modules/editor/repository/code_repository/code_repository_test.dart:87:22 - The function 'MockCodeClient' isn't defined. Try importing the library that defines 'MockCodeClient', correcting the name to the name of an existing function, or defining a function named 'MockCodeClient'. - undefined_function
error - test/modules/editor/repository/code_repository/code_repository_test.dart:121:22 - The function 'MockCodeClient' isn't defined. Try importing the library that defines 'MockCodeClient', correcting the name to the name of an existing function, or defining a function named 'MockCodeClient'. - undefined_function
13 issues found.

@damondouglas Regarding this error

> Task :playground:backend:tidy FAILED
go: finding module for package beam.apache.org/playground/backend/internal/environment
beam.apache.org/playground/backend/cmd/server imports
beam.apache.org/playground/backend/internal/environment: cannot find module providing package beam.apache.org/playground/backend/internal/environment: unrecognized import path "beam.apache.org/playground/backend/internal/environment": reading https://beam.apache.org/playground/backend/internal/environment?go-get=1: 404 Not Found

It happened because we are still waiting for #15654 to get merged. Can we merge Environments first of all to resolve it?

@damondouglas

Copy link
Copy Markdown
ContributorAuthor

@pabloem

./gradlew playgroundPrecommit

has the following output:

BUILD SUCCESSFUL in 21s
5 actionable tasks: 5 executed

@pabloem

Copy link
Copy Markdown
Member

LGTM. Merging.

@pabloem
pabloem merged commit dc0548e into apache:masterOct 21, 2021
dmitriikuzinepam pushed a commit to dmitriikuzinepam/beam that referenced this pull request Nov 2, 2021
… for the Beam Playground
* Implement Beam Playground gradle tasks
* Fix trailing whitespace
* Remove format from precommit
* Fix order of includes and add descriptions
* [BEAM-13008] add generated files and fix analysis issues (apache#2)
* Reconcile errors with playgroundPrecommit output
Co-authored-by: Aydar Farrakhov <stranniknm@gmail.com>
Sign up for freeto 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.

5 participants

@damondouglas@pabloem@ElessarST@ilya-kozyrev@tvalentyn