This repository was archived by the owner on Nov 28, 2022. It is now read-only.
forked from knative/eventing
-
Notifications
You must be signed in to change notification settings - Fork 7
Different cron times for branches for periodics #1639
Merged
openshift-merge-robot
merged 3 commits into
openshift:main
from
aliok:2022-02-16-update-ci-time-main
Feb 17, 2022
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,20 @@ EOF | |
| done | ||
| } | ||
|
|
||
| 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 | ||
| } | ||
|
|
||
| function print_single_test { | ||
| local name=${1} | ||
| local commands=${2} | ||
|
|
@@ -115,22 +129,26 @@ EOF | |
| } | ||
|
|
||
| function print_openshift_47_tests { | ||
| cron="$(generate_cron_expression)" | ||
|
|
||
| print_single_test "e2e-aws-ocp-${openshift//./}" "make test-e2e" "aws" "false" "ipi-aws" "" | ||
| print_single_test "conformance-aws-ocp-${openshift//./}" "make test-conformance" "aws" "false" "ipi-aws" "" | ||
| print_single_test "reconciler-aws-ocp-${openshift//./}" "make test-reconciler" "aws" "false" "ipi-aws" "" | ||
|
|
||
| if [[ "$generate_continuous" == true ]]; then | ||
| print_single_test "e2e-aws-ocp-${openshift//./}-continuous" "make test-e2e" "aws" "false" "ipi-aws" "0 */12 * * 1-5" | ||
| print_single_test "e2e-aws-ocp-${openshift//./}-continuous" "make test-e2e" "aws" "false" "ipi-aws" "${cron}" | ||
| fi | ||
| } | ||
|
|
||
| function print_non_openshift_47_tests { | ||
| cron="$(generate_cron_expression)" | ||
|
|
||
| print_single_test "e2e-aws-ocp-${openshift//./}" "make test-e2e" "" "true" "generic-claim" "" | ||
| print_single_test "conformance-aws-ocp-${openshift//./}" "make test-conformance" "" "true" "generic-claim" "" | ||
| print_single_test "reconciler-aws-ocp-${openshift//./}" "make test-reconciler" "" "true" "generic-claim" "" | ||
|
|
||
| if [[ "$generate_continuous" == true ]]; then | ||
| print_single_test "e2e-aws-ocp-${openshift//./}-continuous" "make test-e2e" "" "true" "generic-claim" "0 */12 * * 1-5" | ||
| print_single_test "e2e-aws-ocp-${openshift//./}-continuous" "make test-e2e" "" "true" "generic-claim" "${cron}" | ||
| fi | ||
| } | ||
|
|
||
|
|
@@ -229,7 +247,7 @@ EOF | |
| done | ||
| } | ||
|
|
||
| image_deps=$(generate_image_dependencies) | ||
| image_deps="$(generate_image_dependencies)" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also touched this based on @devguyio comment here: #1636 (review) |
||
|
|
||
| print_base_images | ||
| print_build_root | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-5knative-v0.26->0 6 * * 1-5knative-v1.0->0 0 * * 1-5knative-v1.1->0 1 * * 1-5knative-v1.2->0 2 ** 1-5There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update with what? Sorry I didn't understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we cut another branch,
knative-v1.3this doesn't produce any cron expression, so when we cut a new branch or remove an old one we need to update this logic hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we're missing an else branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default it will fallback to the old cron expression. We would need to touch the file though, you are right.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some docs in README now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @pierDipi