devfile / devworkspace-operator

Apache License 2.0
61 stars 55 forks source link

Add timeout to health checks to avoid very long reconciles #1191

Closed amisevsk closed 11 months ago

amisevsk commented 11 months ago

What does this PR do?

Adds a timeout (500ms) to the health check HTTP client. This hopefully avoids cases where the controller effectively idles for long periods while the health check server is being started (i.e. the server is not ready and is not sending a response)

What issues does this PR fix or reference?

Haven't created an issue yet, need to do a bit more diagnosing.

Is it tested? How?

Also hard to test -- it's hard to trigger a slow response from the editor server manually. Regular workspace startup should not be impacted by this change, however.

PR Checklist

openshift-ci[bot] commented 11 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amisevsk

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/devfile/devworkspace-operator/blob/main/OWNERS)~~ [amisevsk] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment