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

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

                Author: ASF GitHub Bot
            Created on: 14/Jun/18 05:27
            Start Date: 14/Jun/18 05:27
    Worklog Time Spent: 10m 
      Work Description: jbonofre closed pull request #5638: [BEAM-4555] Revert 
pull request pre-commit triggering
URL: https://github.com/apache/beam/pull/5638
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.test-infra/jenkins/common_job_properties.groovy 
b/.test-infra/jenkins/common_job_properties.groovy
index d5e1b26bb47..ec19dd303c2 100644
--- a/.test-infra/jenkins/common_job_properties.groovy
+++ b/.test-infra/jenkins/common_job_properties.groovy
@@ -38,7 +38,6 @@ class common_job_properties {
         branch('${sha1}')
         extensions {
           cleanAfterCheckout()
-          disableRemotePoll() // needed for included regions PR triggering; 
see [JENKINS-23606]
           relativeTargetDirectory(checkoutDir)
         }
       }
@@ -129,8 +128,7 @@ class common_job_properties {
                                                  String commitStatusContext,
                                                  String prTriggerPhrase = '',
                                                  boolean 
onlyTriggerPhraseToggle = true,
-                                                 String successComment = 
'--none--',
-                                                 List<String> 
triggerPathPatterns = []) {
+                                                 String successComment = 
'--none--') {
     context.triggers {
       githubPullRequest {
         admins(['asfbot'])
@@ -149,9 +147,6 @@ class common_job_properties {
         if (onlyTriggerPhraseToggle) {
           onlyTriggerPhrase()
         }
-        if (!triggerPathPatterns.isEmpty()) {
-          includedRegions(triggerPathPatterns.join('\n'))
-        }
 
         extensions {
           commitStatus {
@@ -198,31 +193,13 @@ class common_job_properties {
     context.switches("-Dorg.gradle.jvmargs=-Xmx${(int)perWorkerMemoryMb}m")
   }
 
-  /**
-   * Sets common config for PreCommit jobs.
-   *
-   * @param commitStatusName Status displayed in pull request for the job
-   * @param prTriggerPhrase Adding a comment to the PR with this phrase will 
trigger the job to re-run
-   * @param triggerPathPatterns List of path includes regex which will trigger 
the PR. Patterns should
-   *                            match the entire file path. A default set of 
paths will also be added.
-   */
-
+  // Sets common config for PreCommit jobs.
   static void setPreCommit(context,
                            String commitStatusName,
                            String prTriggerPhrase = '',
-                           List<String> triggerPathPatterns = []) {
-    def defaultPathTriggers = [
-      '^build.gradle$',
-      '^build_rules.gradle$',
-      '^gradle.properties$',
-      '^gradlew$',
-      '^gradle.bat$',
-      '^settings.gradle$'
-    ]
-
+                           String successComment = '--none--') {
     // Set pull request build trigger.
-    triggerPathPatterns.addAll(defaultPathTriggers)
-    setPullRequestBuildTrigger context, commitStatusName, prTriggerPhrase, 
false, '--none--', triggerPathPatterns
+    setPullRequestBuildTrigger(context, commitStatusName, prTriggerPhrase, 
false, successComment)
   }
 
   // Enable triggering postcommit runs against pull requests. Users can 
comment the trigger phrase
diff --git a/.test-infra/jenkins/job_PreCommit_Go_GradleBuild.groovy 
b/.test-infra/jenkins/job_PreCommit_Go_GradleBuild.groovy
index e6a91f0df3c..6a3bc15c74b 100644
--- a/.test-infra/jenkins/job_PreCommit_Go_GradleBuild.groovy
+++ b/.test-infra/jenkins/job_PreCommit_Go_GradleBuild.groovy
@@ -33,12 +33,7 @@ job('beam_PreCommit_Go_GradleBuild') {
     150)
 
   // Sets that this is a PreCommit job.
-  common_job_properties.setPreCommit(delegate, './gradlew :goPreCommit', 'Run 
Go PreCommit', [
-      '^model/.*$',
-      '^sdks/go/.*$',
-      '^runners/.*$',
-      '^release/.*$',
-    ])
+  common_job_properties.setPreCommit(delegate, './gradlew :goPreCommit', 'Run 
Go PreCommit')
   steps {
     gradle {
       rootBuildScriptDir(common_job_properties.checkoutDir)
diff --git a/.test-infra/jenkins/job_PreCommit_Java_GradleBuild.groovy 
b/.test-infra/jenkins/job_PreCommit_Java_GradleBuild.groovy
index 0bf7cc843bc..ce67d399ea6 100644
--- a/.test-infra/jenkins/job_PreCommit_Java_GradleBuild.groovy
+++ b/.test-infra/jenkins/job_PreCommit_Java_GradleBuild.groovy
@@ -38,13 +38,7 @@ job('beam_PreCommit_Java_GradleBuild') {
   }
 
   // Sets that this is a PreCommit job.
-  common_job_properties.setPreCommit(delegate, './gradlew :javaPreCommit', 
'Run Java PreCommit', [
-      '^model/.*$',
-      '^sdks/java/.*$',
-      '^runners/.*$',
-      '^examples/java/.*$',
-      '^release/.*$',
-    ])
+  common_job_properties.setPreCommit(delegate, './gradlew :javaPreCommit', 
'Run Java PreCommit')
   steps {
     gradle {
       rootBuildScriptDir(common_job_properties.checkoutDir)
diff --git a/.test-infra/jenkins/job_PreCommit_Python_GradleBuild.groovy 
b/.test-infra/jenkins/job_PreCommit_Python_GradleBuild.groovy
index 3052a40b931..d03f04e7ed9 100644
--- a/.test-infra/jenkins/job_PreCommit_Python_GradleBuild.groovy
+++ b/.test-infra/jenkins/job_PreCommit_Python_GradleBuild.groovy
@@ -39,12 +39,7 @@ job('beam_PreCommit_Python_GradleBuild') {
   }
 
   // Sets that this is a PreCommit job.
-  common_job_properties.setPreCommit(delegate, './gradlew :pythonPreCommit', 
'Run Python PreCommit', [
-      '^model/.*$',
-      '^runners/.*$',
-      '^sdks/python/.*$',
-      '^release/.*$',
-    ])
+  common_job_properties.setPreCommit(delegate, './gradlew :pythonPreCommit', 
'Run Python PreCommit')
   steps {
     gradle {
       rootBuildScriptDir(common_job_properties.checkoutDir)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 111783)
    Time Spent: 2h  (was: 1h 50m)

> Pre-commit file include triggering breaks phrase triggering
> -----------------------------------------------------------
>
>                 Key: BEAM-4555
>                 URL: https://issues.apache.org/jira/browse/BEAM-4555
>             Project: Beam
>          Issue Type: Bug
>          Components: testing
>            Reporter: Scott Wegner
>            Assignee: Scott Wegner
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> In BEAM-4445 we changed pre-commit triggering on PR's to only run when 
> afffected file paths were changed. However as a side-effect, it is no longer 
> possible to use trigger phrases to manually run pre-commits if include path 
> files are not changed.
> This ability to run a pre-commit even if files are not changed is useful to 
> check the stability of the codebase before submitting.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to