kubernetes-sigs / prow

Prow is a Kubernetes based CI/CD system developed to serve the Kubernetes community. This repository contains Prow source code and Hugo sources for Prow documentation site.
https://docs.prow.k8s.io
Apache License 2.0
127 stars 98 forks source link

gangway: BulkJobStatusChange: return early and finish later #203

Closed Prucek closed 3 months ago

Prucek commented 4 months ago

This change will accept the BulkJobStatusChange request and return immediately and it will finish the processing in a separate goroutine. On bigger prow instances, with a lot of Prowjobs, it was observed, that it takes a lot of time to only to list all Prowjobs, and calls to this endpoint caused: context timeout

k8s-ci-robot commented 4 months ago

Hi @Prucek. 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
netlify[bot] commented 4 months ago

Deploy Preview for k8s-prow ready!

Name Link
Latest commit a039769574467639f969ccfbf0ae8d388293b2f7
Latest deploy log https://app.netlify.com/sites/k8s-prow/deploys/668fccfcd8618c0008e533ec
Deploy Preview https://deploy-preview-203--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.

smg247 commented 4 months ago

/ok-to-test

smg247 commented 4 months ago

This takes a bit of a different direction than what I was expecting. My impression is that this service will nearly always be used when there are more than 10 jobs to update. If we have 10 or less, we will likely find it just as easy to just manually update each one. With that context, I think it makes sense to always return the list of jobs to be updated, prior to actually updating any of them. Then spawn a new thread to update all the jobs. What do you think about that approach?

Prucek commented 4 months ago

/unhold

Prucek commented 4 months ago

/retest

smg247 commented 3 months ago

/lgtm

k8s-ci-robot commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: droslean, Prucek

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/prow/blob/main/OWNERS)~~ [droslean] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment