You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "Abacn (via GitHub)" <gi...@apache.org> on 2023/05/08 13:55:17 UTC

[GitHub] [beam] Abacn commented on a diff in pull request #26562: Remove never-worked githubPush trigger

Abacn commented on code in PR #26562:
URL: https://github.com/apache/beam/pull/26562#discussion_r1187478468


##########
.test-infra/jenkins/PostcommitJobBuilder.groovy:
##########
@@ -57,8 +60,15 @@ class PostcommitJobBuilder {
   }
 
   void defineAutoPostCommitJob(name) {
+    // default build schedule
+    String buildSchedule = 'H H/6 * * *'
+    try {
+      buildSchedule = scope.getProperty('buildSchedule')
+    } catch (MissingPropertyException ignored) {
+      // do nothing
+    }

Review Comment:
   This is a weird part of groovy. Tested that `getProperty('buildSchedule')` returns the string if previously set but `hasProperty('buildSchedule')` always returns false value. 
   
   refer to: https://stackoverflow.com/questions/17921490/hasproperty-returns-null (though the answer there were not super clear). Basically it seems hasProperty does not recognize the property dynamically added to the instance, but hasProperty does.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org