[Feature] More configurable request timeouts
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:
- Add support to the .bru / collection.bru files to specify a timeout
- Handle the timeout settings in the bruno CLI
- Allow a
--timeoutoverride option on the CLI (useful for CI environments where you might have different timing parameters than in local dev, for instance) - 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.
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?
Hi guys. So there's no way to set timeout now in CLI right?
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.
I would VERY much appreciate the possibility to configure timeouts in CLI, like --timeout. Please, if possible.
Is there any update regarding configuring the timeout via cli?
I'm really looking forward to this feature!
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.
@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 😄
Just checking if there's any update on CLI support for timeout?
Hi dear, I look forward to this feature quite a long time. Could I help any in this issue?
Is there a way now to increase the timeout in the *.bru files ?