Different cron times for branches for periodics#1639
Conversation
| } | ||
|
|
||
| image_deps=$(generate_image_dependencies) | ||
| image_deps="$(generate_image_dependencies)" |
There was a problem hiding this comment.
Also touched this based on @devguyio comment here: #1636 (review)
| function generate_cron_expression { | ||
| if [[ "$branch" == "knative-v0.25.3" ]]; then | ||
| echo '0 1 * * 1-5' | ||
| elif [[ "$branch" == "knative-v0.26" ]]; then | ||
| echo '0 3 * * 1-5' | ||
| elif [[ "$branch" == "knative-v1.0" ]]; then | ||
| echo '0 5 * * 1-5' | ||
| elif [[ "$branch" == "knative-v1.1" ]]; then | ||
| echo '0 7 * * 1-5' | ||
| elif [[ "$branch" == "knative-v1.2" ]]; then | ||
| echo '0 9 * * 1-5' | ||
| fi | ||
| } | ||
|
|
There was a problem hiding this comment.
One idea to avoid hard-coding is to use the last number of minor version for the hour:
knative-v0.25.3 -> 0 5 * * 1-5
knative-v0.26 -> 0 6 * * 1-5
knative-v1.0 -> 0 0 * * 1-5
knative-v1.1 -> 0 1 * * 1-5
knative-v1.2 -> 0 2 ** 1-5
There was a problem hiding this comment.
If we don't do this, can we update docs?
https://github.com/openshift/knative-eventing#release-schedule
There was a problem hiding this comment.
Update with what? Sorry I didn't understand
There was a problem hiding this comment.
If we cut another branch, knative-v1.3 this doesn't produce any cron expression, so when we cut a new branch or remove an old one we need to update this logic here
There was a problem hiding this comment.
Or we're missing an else branch.
There was a problem hiding this comment.
By default it will fallback to the old cron expression. We would need to touch the file though, you are right.
knative-v0.25.3 -> 0 5 * * 1-5
knative-v0.26 -> 0 6 * * 1-5
knative-v1.0 -> 0 0 * * 1-5
knative-v1.1 -> 0 1 * * 1-5
knative-v1.2 -> 0 2 ** 1-5
This is good, but just adds Bash complexity IMO, which I am not a very big fan of.
There was a problem hiding this comment.
Added some docs in README now
|
/unhold |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, devguyio, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick release-1.2 |
|
/cherry-pick release-v1.2 |
|
/cherry-pick release-v1.1 |
|
/cherry-pick release-v1.0 |
|
/cherry-pick release-v0.26 |
|
@pierDipi: cannot checkout DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@pierDipi: #1639 failed to apply on top of branch "release-v1.2": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@pierDipi: #1639 failed to apply on top of branch "release-v1.1": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@pierDipi: #1639 failed to apply on top of branch "release-v1.0": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@pierDipi: #1639 failed to apply on top of branch "release-v0.26": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
* Different cron times for branches * Wrap function invocations in quotes * Add instructions Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Different cron times for branches * Wrap function invocations in quotes * Add instructions Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Different cron times for branches * Wrap function invocations in quotes * Add instructions Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Different cron times for branches for periodics