Skip to content

fix: rest client timeout is not set as per template#4173

Merged
cgrinds merged 1 commit intomainfrom
rg2-fix-client
Mar 3, 2026
Merged

fix: rest client timeout is not set as per template#4173
cgrinds merged 1 commit intomainfrom
rg2-fix-client

Conversation

@rahulguptajss
Copy link
Contributor

No description provided.

@rahulguptajss rahulguptajss requested a review from cgrinds as a code owner March 3, 2026 11:38
Copilot AI review requested due to automatic review settings March 3, 2026 11:38
@rahulguptajss rahulguptajss requested a review from Hardikl as a code owner March 3, 2026 11:38
@cla-bot cla-bot bot added the cla-signed label Mar 3, 2026
Copy link
Contributor

Copilot AI left a comment

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 fixes REST client timeout handling so that client_timeout values defined in templates/config actually update the underlying http.Client timeout used for REST requests.

Changes:

  • Remove the exported Timeout field from cmd/tools/rest.Client and rely on the underlying http.Client.Timeout.
  • Add SetTimeout(time.Duration) / GetTimeout() time.Duration helpers to manage/read the effective timeout.
  • Update REST-based collectors to use the new accessors for logging and for applying client_timeout from config.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cmd/tools/rest/client.go Removes Client.Timeout, sets timeout on http.Client, adds SetTimeout/GetTimeout.
cmd/collectors/statperf/statperf.go Switches timeout logging to Client.GetTimeout().
cmd/collectors/restperf/restperf.go Switches timeout logging to Client.GetTimeout().
cmd/collectors/rest/rest.go Applies template/config client_timeout via Client.SetTimeout(); updates logging and ASUP output.
cmd/collectors/keyperf/keyperf.go Switches timeout logging to Client.GetTimeout().

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

@rahulguptajss rahulguptajss linked an issue Mar 3, 2026 that may be closed by this pull request
@cgrinds cgrinds merged commit 4ec8b86 into main Mar 3, 2026
14 checks passed
@cgrinds cgrinds deleted the rg2-fix-client branch March 3, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rest Template client_timeout configuration is not working

4 participants