bruno icon indicating copy to clipboard operation
bruno copied to clipboard

[Feature] More configurable request timeouts

Open awinder opened this issue 2 years ago • 11 comments

Previously there was some work done in #557 to add configuration for request timeouts, however, the code addressed only some of what was discussed in that issue. I think it would be nice to:

  1. Add support to the .bru / collection.bru files to specify a timeout
  2. Handle the timeout settings in the bruno CLI
  3. Allow a --timeout override option on the CLI (useful for CI environments where you might have different timing parameters than in local dev, for instance)
  4. Add UI support for setting these timeout values

I have code done for 1-3, wondering about the UI though. Maybe "timeout" could go under the Presets tab in collection settings? I'm not sure where a good place would be for this config in the request settings though. Vars might be the closest tab for something like this but even then it's not great, and adding another tab just for the timeout seems a little much. Any thoughts on what would make sense here? Is this feature useful? I could also punt on making the UI changes but I assume it's best to ship support for stuff like this with UI at the same time as it's enabled by the underlying system / config files.

#557 also mentioned being able to configure this on the environment level, but I'm not sure how that would work because the environment configuration is all substitution variables, there's not something like a direct config override. Maybe that could work if the timeout settings in collection + request accepted variable substitution? Wondering if that's worth pursuing or not as well.

awinder avatar Dec 19 '23 16:12 awinder

I've taken a crack at this in #1308 with the UI from point #4 implemented by renaming the Docs tab to "Meta" and pushing docs + this new option under that tab. I did punt on including variable support / something tied into environments for now but if that's a showstopper we could discuss as well. @helloanoop -- mind checking this out / discussing?

awinder avatar Jan 02 '24 16:01 awinder

Hi guys. So there's no way to set timeout now in CLI right?

usrbad avatar Nov 04 '24 16:11 usrbad

Correct, it’s in the linked pull request but never made it to master. I’d be happy to update / resolve merge conflicts if project maintainers have interest in this. I tried keeping it up to date for a few months but couldn’t get traction to have someone review the feature.

awinder avatar Nov 04 '24 17:11 awinder

I would VERY much appreciate the possibility to configure timeouts in CLI, like --timeout. Please, if possible.

frille7070 avatar Feb 28 '25 14:02 frille7070

Is there any update regarding configuring the timeout via cli?

ko-maren avatar Jun 24 '25 11:06 ko-maren

I'm really looking forward to this feature!

NoPatient avatar Oct 17 '25 09:10 NoPatient

Bruno now supports request level timeouts in the UI. Support in CLI is pending. We've allocated time for this in December.

Happy to review a PR if anyone in the community wants to take a stab at it.

Image

helloanoop avatar Oct 17 '25 10:10 helloanoop

@helloanoop this is cool / much better than what I tried to do originally for per-request settings. I put up a pull request for just CLI support for a --max-timeout flag here:

https://github.com/usebruno/bruno/pull/5847

thought with --max-timeout flag was that it seemed more logical to involve any per-request timeout configs in the logic for how to apply to the CLI. So with --max-timeout I could make sure that no request went on way too long, while also enforcing that sensitive endpoints returned quickly or else threw errors. totally willing to change this logic if something else makes sense 😄

awinder avatar Oct 20 '25 14:10 awinder

Just checking if there's any update on CLI support for timeout?

finbargp avatar Jan 05 '26 15:01 finbargp

Hi dear, I look forward to this feature quite a long time. Could I help any in this issue?

NoPatient avatar Feb 26 '26 06:02 NoPatient

Is there a way now to increase the timeout in the *.bru files ?

hima-bash avatar Apr 21 '26 16:04 hima-bash