[ https://issues.apache.org/jira/browse/BEAM-6907?focusedWorklogId=290791&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-290791 ]
ASF GitHub Bot logged work on BEAM-6907: ---------------------------------------- Author: ASF GitHub Bot Created on: 07/Aug/19 21:47 Start Date: 07/Aug/19 21:47 Worklog Time Spent: 10m Work Description: markflyhigh commented on pull request #9277: [BEAM-6907] Reuse Python tarball in tox & dataflow integration tests URL: https://github.com/apache/beam/pull/9277#discussion_r311777665 ########## File path: buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy ########## @@ -1820,15 +1794,23 @@ class BeamModulePlugin implements Plugin<Project> { project.ext.toxTask = { name, tox_env -> project.tasks.create(name) { - dependsOn = ['sdist'] + dependsOn 'setupVirtualenv' + dependsOn ':sdks:python:sdist' + doLast { + // Python source directory is also tox execution workspace, We want + // to isolate them per tox suite to avoid conflict when running + // multiple tox suites in parallel. + project.copy { from project.pythonSdkDeps; into copiedSrcRoot } + def copiedPyRoot = "${copiedSrcRoot}/sdks/python" + def distTarBall = "${pythonRootDir}/build/apache-beam.tar.gz" project.exec { executable 'sh' - args '-c', ". ${project.ext.envdir}/bin/activate && cd ${copiedPyRoot} && scripts/run_tox.sh $tox_env ${project.buildDir}/apache-beam.tar.gz" + args '-c', ". ${project.ext.envdir}/bin/activate && cd ${copiedPyRoot} && scripts/run_tox.sh $tox_env $distTarBall" Review comment: tox will build tarball for venv install automatically if not provided. This build depends on shared file when running in parallel and cause our test flaky. So we prebuild the tarball and pass it from `--installpkg` flag. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 290791) Time Spent: 2h (was: 1h 50m) > Standardize Gradle projects/tasks structure for Python SDK > ---------------------------------------------------------- > > Key: BEAM-6907 > URL: https://issues.apache.org/jira/browse/BEAM-6907 > Project: Beam > Issue Type: Task > Components: build-system > Reporter: Mark Liu > Assignee: Mark Liu > Priority: Major > Time Spent: 2h > Remaining Estimate: 0h > > As Gradle parallelism applied to Python tests and more python versions added > to tests, the way Gradle manages projects/tasks changed a lot. Frictions are > generated during Gradle refactor since some projects defined separate build > script under source directory. Thus, It will be better to standardize how we > use Gradle. This will help to manage Python tests/builds/tasks across > different versions and runners, and also easy for people to learn/use/develop. > In general, we may want to: > - Apply parallel execution > - Share common tasks > - Centralize test related tasks > - Have a clear Gradle structure for projects/tasks -- This message was sent by Atlassian JIRA (v7.6.14#76016)