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


##########
.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:
   Yeah I was considering this. The signature of static `postCommitJob` and 
`PostcommitJobBuilder` constructor both have the last parameter is a Closure so 
that they can be called in a special syntax `method(para1, para2) { closure }` 
and pass the code block in the braces as its last parameter. If I need to add 
the parameters then I need to add `buildSchedule` as the second last parameter. 
However the method is called in both `method(para1, para2) { closure }` and 
`method(para1, para2, ..., closure)` and for the later I need to specify 
buildSchedule because it is not the last parameter.
   
   Anyway it turns out that adding a parameter introduces more code change (and 
must breaks current callers) so I decided to use the existing scope



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to