fix(timeout): allow inherit request timeout for yaml requests#8382
fix(timeout): allow inherit request timeout for yaml requests#8382shubh-bruno wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughTimeout handling for HTTP and GraphQL requests now accepts ChangesTimeout inherit support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts`:
- Around line 121-124: Add regression tests for the timeout
serialization/deserialization path in stringifyHttpRequest and the corresponding
load logic to cover the new “inherit” support. Include cases for both HTTP and
GraphQL requests that round-trip timeout: 'inherit' and a numeric timeout, and
assert they do not fall back to 0. Place the coverage near the existing request
format tests so the behavior stays tied to the stringify/load contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1d2a4cc9-5fa4-44f7-bd4b-9d23839109fd
📒 Files selected for processing (4)
packages/bruno-converters/src/opencollection/items/graphql.tspackages/bruno-converters/src/opencollection/items/http.tspackages/bruno-filestore/src/formats/yml/items/stringifyGraphQLRequest.tspackages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts
| if (isNumber(timeout) || timeout === 'inherit') { | ||
| settings.timeout = timeout; | ||
| } else { | ||
| settings.timeout = 0; |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add regression coverage for the 'inherit' timeout round-trip.
This fixes a cross-layer serialization contract, but no matching tests are included here. Please add cases that save/load both HTTP and GraphQL requests with timeout: 'inherit' and with a numeric timeout so this path does not silently fall back to 0 again. As per coding guidelines, "Add tests for any new functionality or meaningful changes."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts`
around lines 121 - 124, Add regression tests for the timeout
serialization/deserialization path in stringifyHttpRequest and the corresponding
load logic to cover the new “inherit” support. Include cases for both HTTP and
GraphQL requests that round-trip timeout: 'inherit' and a numeric timeout, and
assert they do not fall back to 0. Place the coverage near the existing request
format tests so the behavior stays tied to the stringify/load contract.
Source: Coding guidelines
Description
JIRA
Problem
Request-level timeout set to 'inherit' was reset to 0 on save for .yaml requests (.bru worked fine). The YAML stringifiers forced timeout with
isNumber(timeout) ? timeout : 0, dropping the 'inherit' string. The YAML parse path and both .bru paths already handled 'inherit' correctly, so the loss happened only on saveSolution
Allow 'inherit' to pass through alongside numbers in the YAML stringifiers and the OpenCollection converters.
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit
0.