Skip to content

fix(timeout): allow inherit request timeout for yaml requests#8382

Open
shubh-bruno wants to merge 2 commits into
usebruno:mainfrom
shubh-bruno:fix/timeout-yaml
Open

fix(timeout): allow inherit request timeout for yaml requests#8382
shubh-bruno wants to merge 2 commits into
usebruno:mainfrom
shubh-bruno:fix/timeout-yaml

Conversation

@shubh-bruno

@shubh-bruno shubh-bruno commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

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 withisNumber(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 save

Solution

Allow 'inherit' to pass through alongside numbers in the YAML stringifiers and the OpenCollection converters.

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

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

  • Bug Fixes
    • Request timeout settings now preserve the “inherit” option instead of resetting to 0.
    • Improved timeout handling when importing and exporting both HTTP and GraphQL requests.
    • Consistent timeout behavior now applies across supported file formats and conversions.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8b1a63e2-2122-4b2a-b314-13fd52669912

📥 Commits

Reviewing files that changed from the base of the PR and between da9b45d and 5f2592d.

📒 Files selected for processing (1)
  • packages/bruno-filestore/src/formats/yml/items/stringifyGraphQLRequest.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/bruno-filestore/src/formats/yml/items/stringifyGraphQLRequest.ts

Walkthrough

Timeout handling for HTTP and GraphQL requests now accepts 'inherit' in YAML stringification and OpenCollection conversion paths instead of defaulting to 0.

Changes

Timeout inherit support

Layer / File(s) Summary
YAML stringification
packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts, packages/bruno-filestore/src/formats/yml/items/stringifyGraphQLRequest.ts
Request timeout serialization now treats 'inherit' as a valid value for HTTP and GraphQL settings.
OpenCollection conversion
packages/bruno-converters/src/opencollection/items/http.ts, packages/bruno-converters/src/opencollection/items/graphql.ts
HTTP and GraphQL OpenCollection converters now accept 'inherit' when reading and writing timeout settings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • bijin-bruno
  • lohit-bruno
  • naman-bruno

Poem

A timeout once fixed at zero,
Now inherits with a cheerful glow.
HTTP and GraphQL sing,
'inherit' joins the stringy spring. 🌸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: preserving request timeout inheritance for YAML requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d6e17e1 and da9b45d.

📒 Files selected for processing (4)
  • packages/bruno-converters/src/opencollection/items/graphql.ts
  • packages/bruno-converters/src/opencollection/items/http.ts
  • packages/bruno-filestore/src/formats/yml/items/stringifyGraphQLRequest.ts
  • packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts

Comment on lines +121 to 124
if (isNumber(timeout) || timeout === 'inherit') {
settings.timeout = timeout;
} else {
settings.timeout = 0;

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.

📐 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

@shubh-bruno shubh-bruno changed the title fix(timeout): allow inherit in timout for yaml requests fix(timeout): allow inherit request timeout for yaml requests Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant