prow icon indicating copy to clipboard operation
prow copied to clipboard

Introduce an option to overwrite GitHub contexts of pending presubmit ProwJobs when merging batches in `tide`

Open oliver-goetz opened this issue 10 months ago • 9 comments

Fixes #209

With this PR tide overwrites the context of pending ProwJobs when it merges a batch of PRs. It uses the status of the succeeded batch job with the same context. The feature is disabled by default and can be enabled via overwrite-pending-contexts context option. When the context is overwritten, tide deletes any test report comments created by crier (ref) of this PR which might still exist. They contain previous failed runs of the contexts which have just been overwritten. It would be confusing to keep them in the PR. Before, Github branch-protection rules could prevent merging PRs from a batch (see https://github.com/kubernetes/test-infra/issues/32097 for details).

When a PR is merged the ProwJobs which are still running are canceled automatically by trigger plugin of hook, so there is no need to cancel them in tide.

This PR replaces https://github.com/kubernetes/test-infra/pull/32416.

oliver-goetz avatar Apr 25 '24 15:04 oliver-goetz

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: oliver-goetz Once this PR has been reviewed and has the lgtm label, please assign cjwagner for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

k8s-ci-robot avatar Apr 25 '24 15:04 k8s-ci-robot

Welcome @oliver-goetz!

It looks like this is your first PR to kubernetes-sigs/prow 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/prow has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Apr 25 '24 15:04 k8s-ci-robot

Hi @oliver-goetz. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

k8s-ci-robot avatar Apr 25 '24 15:04 k8s-ci-robot

Deploy Preview for k8s-prow ready!

Name Link
Latest commit bf0e9aa3a751d4a5feabead799db4460809c681b
Latest deploy log https://app.netlify.com/sites/k8s-prow/deploys/66f59c0d86af250008b84d5c
Deploy Preview https://deploy-preview-135--k8s-prow.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 25 '24 15:04 netlify[bot]

/ok-to-test

jihoon-seo avatar May 07 '24 08:05 jihoon-seo

@stevekuznetsov could you check this PR again please? 🙂

oliver-goetz avatar May 17 '24 07:05 oliver-goetz

Now, any leftover test report comments will be deleted too, when the context was overwritten. This avoids situations like shown in the screenshot where the context is marked as SUCCESS but there is still a comment with a link to a failed test.

Screenshot 2024-06-05 at 17 25 55

It might happen when the batch jobs succeed and there is a failing test in the trigger PR, which is restarted fast enough while the batch job is still running.

oliver-goetz avatar Jun 05 '24 15:06 oliver-goetz

friendly reminder, please review this PR 😄

oliver-goetz avatar Jun 17 '24 10:06 oliver-goetz

/cc

petr-muller avatar Jul 18 '24 09:07 petr-muller

ping 🔔 Could someone review this PR please.

oliver-goetz avatar Sep 02 '24 07:09 oliver-goetz

@stevekuznetsov @petr-muller wanna skim through again as you are the original reviewers?

krzyzacy avatar Sep 26 '24 16:09 krzyzacy