From f4d840afb323d5a5afd2d0624cb452d620fa477a Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Thu, 13 Aug 2020 16:26:39 -0700 Subject: [PATCH 01/10] Adding Python docs precommit as separate suite. --- .../jenkins/job_PreCommit_PythonDocs.groovy | 38 +++++++++++++++++++ build.gradle | 4 ++ .../test-suites/tox/pycommon/build.gradle | 1 - 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .test-infra/jenkins/job_PreCommit_PythonDocs.groovy diff --git a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy new file mode 100644 index 000000000000..84f761739fde --- /dev/null +++ b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy @@ -0,0 +1,38 @@ +/* + * 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. + */ + +import PrecommitJobBuilder +import CommonJobProperties as common + +PrecommitJobBuilder builder = new PrecommitJobBuilder( + scope: this, + nameBase: 'Python', + gradleTask: ':pythonDocsPreCommit', + timeoutMins: 180, + triggerPathPatterns: [ + '^model/.*$', + '^sdks/python/.*$', + '^release/.*$', + ] + ) +builder.build { + // Publish all test results to Jenkins. + publishers { + common.setArchiveJunitWithStabilityHistory(delegate, '**/pytest*.xml') + } +} diff --git a/build.gradle b/build.gradle index 44a944928a5e..227dd0481e3d 100644 --- a/build.gradle +++ b/build.gradle @@ -230,6 +230,10 @@ task pythonPreCommit() { // have caught. Note that the same tests will still run in postcommit. } +task pythonDocsPreCommit() { + dependsOn ":sdks:python:test-suites:tox:pycommon:docs" +} + task pythonDockerBuildPreCommit() { dependsOn ":sdks:python:container:py2:docker" dependsOn ":sdks:python:container:py35:docker" diff --git a/sdks/python/test-suites/tox/pycommon/build.gradle b/sdks/python/test-suites/tox/pycommon/build.gradle index 2204e5be6ed6..d578b1573767 100644 --- a/sdks/python/test-suites/tox/pycommon/build.gradle +++ b/sdks/python/test-suites/tox/pycommon/build.gradle @@ -27,7 +27,6 @@ toxTask "docs", "py38-docs" assemble.dependsOn docs task preCommitPyCommon() { - dependsOn "docs" } toxTask "dependency-check", "py3-dependency-check" From 93cff1b8bbb2375926166470423b3e5e064817ee Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Thu, 13 Aug 2020 16:35:05 -0700 Subject: [PATCH 02/10] Adding Python docs precommit as separate suite. --- .test-infra/jenkins/job_PreCommit_Python.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.test-infra/jenkins/job_PreCommit_Python.groovy b/.test-infra/jenkins/job_PreCommit_Python.groovy index 4804c10677e5..b3a1fb318c1b 100644 --- a/.test-infra/jenkins/job_PreCommit_Python.groovy +++ b/.test-infra/jenkins/job_PreCommit_Python.groovy @@ -21,7 +21,7 @@ import CommonJobProperties as common PrecommitJobBuilder builder = new PrecommitJobBuilder( scope: this, - nameBase: 'Python', + nameBase: 'PythonDocs', gradleTask: ':pythonPreCommit', timeoutMins: 180, triggerPathPatterns: [ From 4bdcca328a1e368d351e2d36e7d7215b36ed1570 Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Thu, 13 Aug 2020 16:37:43 -0700 Subject: [PATCH 03/10] Adding Python docs precommit as separate suite. --- .test-infra/jenkins/job_PreCommit_Python.groovy | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.test-infra/jenkins/job_PreCommit_Python.groovy b/.test-infra/jenkins/job_PreCommit_Python.groovy index b3a1fb318c1b..a4e541b96b1e 100644 --- a/.test-infra/jenkins/job_PreCommit_Python.groovy +++ b/.test-infra/jenkins/job_PreCommit_Python.groovy @@ -22,12 +22,10 @@ import CommonJobProperties as common PrecommitJobBuilder builder = new PrecommitJobBuilder( scope: this, nameBase: 'PythonDocs', - gradleTask: ':pythonPreCommit', + gradleTask: ':pythonDocsPreCommit', timeoutMins: 180, triggerPathPatterns: [ - '^model/.*$', '^sdks/python/.*$', - '^release/.*$', ] ) builder.build { From 3c75570a514f26d57c30396f21a77669c30e126e Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Thu, 13 Aug 2020 16:44:15 -0700 Subject: [PATCH 04/10] Adding Python docs precommit as separate suite. --- .test-infra/jenkins/job_PreCommit_Python.groovy | 6 ++++-- .test-infra/jenkins/job_PreCommit_PythonDocs.groovy | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.test-infra/jenkins/job_PreCommit_Python.groovy b/.test-infra/jenkins/job_PreCommit_Python.groovy index a4e541b96b1e..4804c10677e5 100644 --- a/.test-infra/jenkins/job_PreCommit_Python.groovy +++ b/.test-infra/jenkins/job_PreCommit_Python.groovy @@ -21,11 +21,13 @@ import CommonJobProperties as common PrecommitJobBuilder builder = new PrecommitJobBuilder( scope: this, - nameBase: 'PythonDocs', - gradleTask: ':pythonDocsPreCommit', + nameBase: 'Python', + gradleTask: ':pythonPreCommit', timeoutMins: 180, triggerPathPatterns: [ + '^model/.*$', '^sdks/python/.*$', + '^release/.*$', ] ) builder.build { diff --git a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy index 84f761739fde..b850a5cd5973 100644 --- a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy +++ b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy @@ -21,13 +21,11 @@ import CommonJobProperties as common PrecommitJobBuilder builder = new PrecommitJobBuilder( scope: this, - nameBase: 'Python', + nameBase: 'PythonDocs', gradleTask: ':pythonDocsPreCommit', - timeoutMins: 180, + timeoutMins: 30, triggerPathPatterns: [ - '^model/.*$', '^sdks/python/.*$', - '^release/.*$', ] ) builder.build { From 556d2fd9c9f3c8032f01ba31d65cb0fd5ec4583a Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Thu, 13 Aug 2020 17:40:47 -0700 Subject: [PATCH 05/10] Adding Python docs precommit as separate suite. --- .test-infra/jenkins/job_PreCommit_PythonDocs.groovy | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy index b850a5cd5973..83476eaeea72 100644 --- a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy +++ b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy @@ -28,9 +28,3 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder( '^sdks/python/.*$', ] ) -builder.build { - // Publish all test results to Jenkins. - publishers { - common.setArchiveJunitWithStabilityHistory(delegate, '**/pytest*.xml') - } -} From 2838c01e8ce567665391eef9b55c60245fa3bc08 Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Thu, 13 Aug 2020 18:16:03 -0700 Subject: [PATCH 06/10] Adding Python docs precommit as separate suite. --- .test-infra/jenkins/job_PreCommit_PythonDocs.groovy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy index 83476eaeea72..bc6bea8fb8b6 100644 --- a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy +++ b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy @@ -28,3 +28,8 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder( '^sdks/python/.*$', ] ) +builder.build { + // Publish all test results to Jenkins. + publishers { + } +} From a227f138323697f60711d47f0d78a5fae3ba5c11 Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Fri, 14 Aug 2020 11:40:26 -0700 Subject: [PATCH 07/10] Adding to PR template --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3db64598f091..dae4d0c3641f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -26,7 +26,7 @@ Pre-Commit Tests Status (on master branch) --- |Java | Python | Go | Website --- | --- | --- | --- | --- -Non-portable | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/)
[![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/)
[![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/) +Non-portable | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/)
[![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/)
[![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/lastCompletedBuild/)
[![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Cron/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/) Portable | --- | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/) | --- | --- See [.test-infra/jenkins/README](https://github.com/apache/beam/blob/master/.test-infra/jenkins/README.md) for trigger phrase, status and link of all Jenkins jobs. From 59bf675d93f467800946e7ce4786d5605a73f732 Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Fri, 14 Aug 2020 12:57:33 -0700 Subject: [PATCH 08/10] Adding to jenkins readme --- .test-infra/jenkins/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.test-infra/jenkins/README.md b/.test-infra/jenkins/README.md index 5821c0b80bb5..9fd21faaf55c 100644 --- a/.test-infra/jenkins/README.md +++ b/.test-infra/jenkins/README.md @@ -37,6 +37,7 @@ Beam Jenkins overview page: [link](https://ci-beam.apache.org/) | beam_PreCommit_PythonLint | [commit](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Phrase/) | `Run PythonLint PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron) | | beam_PreCommit_Python | [commit](https://ci-beam.apache.org/job/beam_PreCommit_Python_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_Python_Phrase/) | `Run Python PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron) | | beam_PreCommit_PythonDocker | [commit](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Phrase/) | `Run PythonDocker PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/) | +| beam_PreCommit_PythonDocs| [commit](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Phrase/) | `Run PythonDocs PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Cron/) | | beam_PreCommit_Python2_PVR_Flink | [commit](https://ci-beam.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Phrase/) | `Run Python2_PVR_Flink PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron) | | beam_PreCommit_RAT | [commit](https://ci-beam.apache.org/job/beam_PreCommit_RAT_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_RAT_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_RAT_Phrase/) | `Run RAT PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_RAT_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_RAT_Cron) | | beam_PreCommit_Spotless | [commit](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Phrase/) | `Run Spotless PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Cron) | From 9384ab12348c2e1f3bf49cd46c7080f60c5ea785 Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Fri, 14 Aug 2020 15:13:03 -0700 Subject: [PATCH 09/10] indentation --- .test-infra/jenkins/job_PreCommit_PythonDocs.groovy | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy index bc6bea8fb8b6..16523d8a2090 100644 --- a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy +++ b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy @@ -27,9 +27,7 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder( triggerPathPatterns: [ '^sdks/python/.*$', ] - ) +) builder.build { - // Publish all test results to Jenkins. - publishers { - } + publishers {} } From c73b9b07b8d7a8d2d4c8d56cff0a86bca2b9744d Mon Sep 17 00:00:00 2001 From: Pablo Estrada Date: Fri, 14 Aug 2020 15:24:13 -0700 Subject: [PATCH 10/10] fix spotless --- .test-infra/jenkins/job_PreCommit_PythonDocs.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy index 16523d8a2090..17202263493c 100644 --- a/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy +++ b/.test-infra/jenkins/job_PreCommit_PythonDocs.groovy @@ -27,7 +27,7 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder( triggerPathPatterns: [ '^sdks/python/.*$', ] -) + ) builder.build { publishers {} }