[release-v1.2] Different cron times for branches for periodics#1636
[release-v1.2] Different cron times for branches for periodics#1636aliok wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok 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 |
|
/retest |
|
@aliok: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/unhold All good. The script produces the right things in all branches. |
|
cc @pierDipi |
| 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.
I'm wondering if we can avoid hard-coding these branches here? 🤔
There was a problem hiding this comment.
yeah, I know what you mean. Alternative is maybe create a file in each branch that has the Cron expression. Then we can read the file in the script.
I thought about that but this hardcoding is at least making things more central and I don't have to look at 5 different branches for the cron expression when I want to see when jobs are running.
I am ok with both if you have a strong opinion.
There was a problem hiding this comment.
I'm fine with starting with this to validate the idea and not spend much effort in crappy shell until it's proven, then move to a more dynamic random distribution using modulo
https://stackoverflow.com/questions/13104478/uniformity-of-random-numbers-taken-modulo-n
|
/assign |
| } | ||
|
|
||
| function print_openshift_47_tests { | ||
| cron=$(generate_cron_expression) |
There was a problem hiding this comment.
| cron=$(generate_cron_expression) | |
| cron="$(generate_cron_expression)" |
devguyio
left a comment
There was a problem hiding this comment.
Is this just to test on 1.2? we try to create those changes on main then /cherry-pick back to release branches.
You cannot run the script on |
|
/close Closing in favor of #1639 |
|
@aliok: Closed this PR. 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. |
/hold
I need to hold this because I first need to test this change in different branches to see if my cron changes work.
Checked:
openshift/releaseconfiguration. I won't touch this script but manually update the config