You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/08/01 02:49:00 UTC

[jira] [Work logged] (BEAM-9980) Specific Python version tied tests are to be version-selective

     [ https://issues.apache.org/jira/browse/BEAM-9980?focusedWorklogId=465247&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-465247 ]

ASF GitHub Bot logged work on BEAM-9980:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Aug/20 02:48
            Start Date: 01/Aug/20 02:48
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on a change in pull request #12239:
URL: https://github.com/apache/beam/pull/12239#discussion_r463910737



##########
File path: build.gradle
##########
@@ -243,13 +241,16 @@ task pythonFormatterPreCommit() {
   dependsOn 'sdks:python:test-suites:tox:py38:formatter'
 }
 
+task pythonPostCommit() {

Review comment:
       I think adding a new Jenkins job in this PR might add more confusion until we clarify how to reconcile this suite with other postcommit suites. 
   
   How about we keep the test suites in the jenkins jobs where they are defined right now, but make the python versions configurable in the gradle.properties file? This would allow us to merge most of these changes faster, including the refactoring to use suites definitions from common.gradle.
   
   Later we can reconsider the shapes of Jenkins job when we define High Priortity/Low priority versions.

##########
File path: sdks/python/test-suites/dataflow/py37/build.gradle
##########
@@ -20,10 +20,6 @@ apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyPythonNature()
 enablePythonPerformanceTest()

Review comment:
       Can `enablePythonPerformanceTest()` be moved to common.gradle as well?

##########
File path: .test-infra/jenkins/job_PostCommit_Python_MongoDBIO_Load_Test.groovy
##########
@@ -51,7 +51,7 @@ job(jobName) {
       rootBuildScriptDir(common.checkoutDir)
       common.setGradleSwitches(delegate)
       switches("-Popts=\'${common.mapToArgString(pipelineOptions)}\'")
-      tasks(":sdks:python:test-suites:dataflow:py35:mongodbioIT")
+      tasks(":sdks:python:test-suites:dataflow:mongodbioIT")

Review comment:
       Note that this is a load test, and we also have integration test suite: https://github.com/apache/beam/blob/d971ba13b8ed31de3413558f701d752cbf202d47/.test-infra/jenkins/job_PostCommit_Python_MongoDBIO_IT.groovy#L35

##########
File path: sdks/python/test-suites/dataflow/build.gradle
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
+applyPythonNature()
+
+dependencies {
+  distTarBall project(path: ":sdks:python", configuration: "distTarBall")
+}
+
+task preCommitIT {
+  getListProperty('dataflow_precommit_it_task_py_versions').each {

Review comment:
       I think for a reader `getListProperty` name might be confusing  and they would have to look up the implementation. We could consider the name `getVersionsAsList` or use `getProperty('dataflow_precommit_it_task_py_versions').split(',').each` directly.

##########
File path: build.gradle
##########
@@ -243,13 +241,16 @@ task pythonFormatterPreCommit() {
   dependsOn 'sdks:python:test-suites:tox:py38:formatter'
 }
 
+task pythonPostCommit() {

Review comment:
       (missed this comment) I think I understand what you mean.
   Let's consider a contributor who is adding a new test or test suite that needs to run in postcommit (after PR is merged). How would they configure their suite? Looking at this file it may not be obvious, for example hdfs test suite is added in PostCommit and Py38 PostCommit but MongoDBIO suite is only defined in PostCommit. 
   How can we make the configuration more straightforward?
   We should also consider what guidance we can give contributors when to create a new jenkins job and when to add to add to existing postcommit jobs. For example we have a separate job for MongoDB IO, but do not for HDFS, probably because both tests were added by different people and the configuration was not easy to figure out.




----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 465247)
    Time Spent: 1.5h  (was: 1h 20m)

> Specific Python version tied tests are to be version-selective
> --------------------------------------------------------------
>
>                 Key: BEAM-9980
>                 URL: https://issues.apache.org/jira/browse/BEAM-9980
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: yoshiki obata
>            Assignee: yoshiki obata
>            Priority: P2
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> We have some tests that we run only under specific Python versions,
> - FlinkValidatesRunner test runs using Python 3.5
> - HDFS Python 3 tests are running only with Python 3.7
> - Cross-language Py3 tests for Spark are running under Python 3.5
>     etc...
> Python versions to run them under need to be switchable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)