Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Different cron times for branches for periodics#1639

Merged
openshift-merge-robot merged 3 commits into
openshift:mainfrom
aliok:2022-02-16-update-ci-time-main
Feb 17, 2022
Merged

Different cron times for branches for periodics#1639
openshift-merge-robot merged 3 commits into
openshift:mainfrom
aliok:2022-02-16-update-ci-time-main

Conversation

@aliok
Copy link
Copy Markdown
Member

@aliok aliok commented Feb 16, 2022

Different cron times for branches for periodics

@openshift-ci openshift-ci Bot requested review from devguyio and matzew February 16, 2022 11:38
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 16, 2022
}

image_deps=$(generate_image_dependencies)
image_deps="$(generate_image_dependencies)"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also touched this based on @devguyio comment here: #1636 (review)

Comment on lines +44 to +57
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
}

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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.

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.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 16, 2022
Copy link
Copy Markdown

@devguyio devguyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/hold

keeping it for @pierDipi to unhold , I'm fine with doing the hard coding now until we validate the idea as I mentioned in the other PR

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2022
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 17, 2022
Copy link
Copy Markdown
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@pierDipi
Copy link
Copy Markdown
Member

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 17, 2022
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 17, 2022
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Feb 17, 2022

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [aliok,devguyio,pierDipi]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 442d1e3 into openshift:main Feb 17, 2022
@pierDipi
Copy link
Copy Markdown
Member

/cherry-pick release-1.2

@pierDipi
Copy link
Copy Markdown
Member

/cherry-pick release-v1.2

@pierDipi
Copy link
Copy Markdown
Member

/cherry-pick release-v1.1

@pierDipi
Copy link
Copy Markdown
Member

/cherry-pick release-v1.0

@pierDipi
Copy link
Copy Markdown
Member

/cherry-pick release-v0.26

@openshift-cherrypick-robot
Copy link
Copy Markdown

@pierDipi: cannot checkout release-1.2: error checking out release-1.2: exit status 1. output: error: pathspec 'release-1.2' did not match any file(s) known to git

Details

In response to this:

/cherry-pick release-1.2

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.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@pierDipi: #1639 failed to apply on top of branch "release-v1.2":

Applying: Different cron times for branches
Applying: Wrap function invocations in quotes
Applying: Add instructions
Using index info to reconstruct a base tree...
M	README.md
Falling back to patching base and 3-way merge...
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Add instructions
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-v1.2

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.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@pierDipi: #1639 failed to apply on top of branch "release-v1.1":

Applying: Different cron times for branches
Applying: Wrap function invocations in quotes
Applying: Add instructions
Using index info to reconstruct a base tree...
M	README.md
Falling back to patching base and 3-way merge...
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Add instructions
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-v1.1

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.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@pierDipi: #1639 failed to apply on top of branch "release-v1.0":

Applying: Different cron times for branches
Applying: Wrap function invocations in quotes
Applying: Add instructions
Using index info to reconstruct a base tree...
M	README.md
Falling back to patching base and 3-way merge...
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Add instructions
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-v1.0

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.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@pierDipi: #1639 failed to apply on top of branch "release-v0.26":

Applying: Different cron times for branches
Applying: Wrap function invocations in quotes
Applying: Add instructions
Using index info to reconstruct a base tree...
M	README.md
Falling back to patching base and 3-way merge...
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Add instructions
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-v0.26

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.

openshift-merge-robot pushed a commit that referenced this pull request Feb 22, 2022
* Different cron times for branches

* Wrap function invocations in quotes

* Add instructions

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

Co-authored-by: Ali Ok <aliok@redhat.com>
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/knative-eventing that referenced this pull request Feb 22, 2022
* Different cron times for branches

* Wrap function invocations in quotes

* Add instructions

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/knative-eventing that referenced this pull request Feb 22, 2022
* Different cron times for branches

* Wrap function invocations in quotes

* Add instructions

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/knative-eventing that referenced this pull request Feb 22, 2022
* Different cron times for branches

* Wrap function invocations in quotes

* Add instructions

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
openshift-merge-robot pushed a commit that referenced this pull request Feb 22, 2022
* Different cron times for branches

* Wrap function invocations in quotes

* Add instructions

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

Co-authored-by: Ali Ok <aliok@redhat.com>
openshift-merge-robot pushed a commit that referenced this pull request Feb 22, 2022
* Different cron times for branches

* Wrap function invocations in quotes

* Add instructions

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

Co-authored-by: Ali Ok <aliok@redhat.com>
openshift-merge-robot pushed a commit that referenced this pull request Feb 22, 2022
* Different cron times for branches

* Wrap function invocations in quotes

* Add instructions

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

Co-authored-by: Ali Ok <aliok@redhat.com>
@aliok aliok deleted the 2022-02-16-update-ci-time-main branch November 30, 2023 09:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants