project-infra icon indicating copy to clipboard operation
project-infra copied to clipboard

Avoid running functional tests for PRs whenever it makes sense

Open iholder101 opened this issue 2 years ago • 14 comments

Currently in Kubevirt, every PR needs to run and pass the complete test suite in order to merge.

However, for some PRs (e.g. non-code PRs) there's no value in running any functional tests at all, therefore CI resources are being wasted with no value whatsoever. As an example, a PR making someone an approver [1], which only requires changing a text file, should be tested. This leads to a waste of costly CI resources and should be avoided, which becomes even worse when tests are flakie and need to be re-tested for multiple times.

One possible approach to solving this is to trigger CI only if files under certain paths are being changed.

An even better situation would be to avoid running CI on more sophisticated scenarios, like changing a variable name, comments, file names, and other non-logical code refactoring.

[1] https://github.com/kubevirt/kubevirt/pull/9900

iholder101 avatar Jun 21 '23 08:06 iholder101

/cc @dhiller @jean-edouard @fossedihelm

iholder101 avatar Jun 21 '23 08:06 iholder101

/assign

dhiller avatar Jun 21 '23 08:06 dhiller

/kind enhancement

dhiller avatar Jun 21 '23 09:06 dhiller

/area prow

dhiller avatar Jun 21 '23 09:06 dhiller

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

kubevirt-bot avatar Sep 19 '23 09:09 kubevirt-bot

/remove-lifecycle stale

iholder101 avatar Oct 02 '23 08:10 iholder101

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

kubevirt-bot avatar Dec 31 '23 08:12 kubevirt-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

kubevirt-bot avatar Jan 30 '24 09:01 kubevirt-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

/close

kubevirt-bot avatar Feb 29 '24 09:02 kubevirt-bot

@kubevirt-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

/close

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.

kubevirt-bot avatar Feb 29 '24 09:02 kubevirt-bot

/reopen /lifecycle frozen

dhiller avatar Feb 29 '24 11:02 dhiller

@dhiller: Reopened this issue.

In response to this:

/reopen /lifecycle frozen

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.

kubevirt-bot avatar Feb 29 '24 11:02 kubevirt-bot

Short update: we are still investigating how to tackle this. @oshoval contributed the phased plugin recently, which enables us holding back on testing until the PR has reached merge queue state. We are still investigating how to find a proper solution wrt run_if_changed/skip_if_only_changed, since it currently interferes with how the phased plugin works. Instead, a pragmatic solution has been merged, aborting functests directly if only certain files have been changed.

dhiller avatar Feb 29 '24 12:02 dhiller

Short update: we are still investigating how to tackle this. @oshoval contributed the phased plugin recently, which enables us holding back on testing until the PR has reached merge queue state. We are still investigating how to find a proper solution wrt run_if_changed/skip_if_only_changed, since it currently interferes with how the phased plugin works. Instead, a pragmatic solution has been merged, aborting functests directly if only certain files have been changed.

Great news! Thanks for the update and for pushing this subject forward!

Can we abort functests for files with certain suffixes? e.g. .md, .txt, etc?

iholder101 avatar Feb 29 '24 13:02 iholder101