Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cirrus: Skip deep testing on branches #7926

Merged

Conversation

cevich
Copy link
Member

@cevich cevich commented Oct 5, 2020

Previous to this commit, the entire suite of CI tasks run in a PR, run
again for every merge (a.k.a. branch push). This wastes time and
resources with substantively overlapping testing. The primary reason
to test on branch-push, is providing coverage for merge-semantics.
In other words, problems introduced due to the sequence of PR merging.
For this purpose, the vast majority of problems can be caught quickly by
a small subset of automated tests. If deeper debugging is necessary,
then opening a test-PR is a small price to ask for the enormous amount
of time/resource savings with more limited branch-push testing.

Signed-off-by: Chris Evich cevich@redhat.com

Previous to this commit, the entire suite of CI tasks run in a PR, run
again for every merge (a.k.a. branch push).  This wastes time and
resources with substantively overlapping testing.  The primary reason
to test on branch-push, is providing coverage for merge-semantics.
In other words, problems introduced due to the sequence of PR merging.
For this purpose, the vast majority of problems can be caught quickly by
a small subset of automated tests.  If deeper debugging is necessary,
then opening a test-PR is a small price to ask for the enormous amount
of time/resource savings with more limited branch-push testing.

Signed-off-by: Chris Evich <cevich@redhat.com>
@edsantiago
Copy link
Member

Perhaps I'm the only one... or perhaps I'm just ignorant... but the use of "branches" here seems really confusing to me. Maybe it's a Cirrus-ism or Github-ism? To me—and this assumes that I'm understanding this correctly—it would make more sense to label this as "Skip deep testing on merge action" or "on post-merge". Or have I missed something?

To put it another way: I want our team to have a subset of people familiar-enough with Cirrus to be able to understand and review these PRs, but without being utter SMEs like you. I think the term "branch" makes sense to SMEs but not us dabblers. Can we have terminology that makes sense to both groups?

@cevich
Copy link
Member Author

cevich commented Oct 5, 2020

@edsantiago I respect your motivation here. Really it's a "branch-push" that triggers a build (a.k.a. "job" or "run of all the tests"). Contrast this with Tag-push or a PR-push triggering events. A branch-push could happen because of a PR merge or because someone manually ran git push upstream HEAD:master (depending on the github repository settings at the moment). Though generally speaking, on this specific repo., with the current repo. settings, it will be a PR-merge that updates a branch.

So my hesitation to use the term "post-merge" is avoiding any ambiguity confusion WRT the other terms (PR-push and Tag-push) and other actions which could trigger testing.

@cevich
Copy link
Member Author

cevich commented Oct 5, 2020

Almost forgot: Cirrus has support for cron-triggered branch jobs as well. So there's another way branch testing can happen.

@edsantiago
Copy link
Member

OK - so it's just me who needs to get used to that terminology. I guess it LGTM then. For ease of visual review, and for posterity, attaching
flow diagram with a quick hack showing [SKIPPABLE] for newly added skips.

@cevich
Copy link
Member Author

cevich commented Oct 5, 2020

Thanks Ed.

@edsantiago
Copy link
Member

Cirrus has support for cron-triggered branch jobs as well.

Reflecting a bit more on this, I can see the desire to skip remote integration testing on post-merge, but I would think a nightly cron job would be low-impact and we might want as much testing as we can get. I'm not saying we should enable that right now, but if we do want to, would it be possible to selectively enable all tests via cron? Maybe some way to pass an envariable to .cirrus.yml?

Copy link
Member

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

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 5, 2020
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2020
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cevich, edsantiago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 5, 2020
@rhatdan
Copy link
Member

rhatdan commented Oct 5, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 5, 2020
@openshift-merge-robot openshift-merge-robot merged commit ea02d9c into containers:master Oct 5, 2020
@cevich
Copy link
Member Author

cevich commented Oct 6, 2020

would it be possible to selectively enable all tests via cron?

@edsantiago yes, $CIRRUS_CRON will be non-empty if the branch build (job) was triggered by cron. If you'd like to figure out the skip: logic to make that work, please (please!) take that liberty. I would undoubtedly make it way more complicated than necessary 😁

Note: Contrary to the docs, $CRON_BRANCHwill be non-empty for both a PR-push AND branch-push. For a PR it will be set to pull/<number> ☹️

@cevich cevich deleted the less_branch_testing branch June 30, 2021 18:00
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
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. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants