Skip to content

fix: increase http client timeout#98

Merged
ajbeattie merged 1 commit into
mainfrom
fix/increase-http-client-timeout
Jun 17, 2026
Merged

fix: increase http client timeout#98
ajbeattie merged 1 commit into
mainfrom
fix/increase-http-client-timeout

Conversation

@ajbeattie

Copy link
Copy Markdown
Contributor
  • Increases the global timeout for the http client, as posting a job for over 1000 deployments can easily take more than the 5 second default timer
  • There is a small tradeoff here that a hung PostOne or Get call could now occupy a worker for the full 30 seconds, but the risk and downside of that are both pretty low in practice. We can optionally move to per-request timeouts later, but that's a bit more involved.

@ajbeattie ajbeattie requested a review from a team as a code owner June 17, 2026 17:59
@ajbeattie ajbeattie requested review from Copilot and malancas June 17, 2026 17:59
GitHub Advanced Security started work on behalf of ajbeattie June 17, 2026 18:00 View session
GitHub Advanced Security finished work on behalf of ajbeattie June 17, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases the HTTP client timeout used by the controller’s deploymentrecord API client to better support long-running requests (e.g., posting a cluster job when syncing large numbers of deployments).

Changes:

  • Introduces a controller-level constant to define a 30-second timeout for the deployment record API client.
  • Applies the new timeout by adding deploymentrecord.WithTimeout(...) when constructing the API client.
Show a summary per file
File Description
internal/controller/controller.go Adds and applies a 30s deployment record API client timeout during controller initialization.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@ajbeattie ajbeattie merged commit 92da85c into main Jun 17, 2026
9 checks passed
@ajbeattie ajbeattie deleted the fix/increase-http-client-timeout branch June 17, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants