Skip to content

fix: allow configurable request timeout#25

Open
saurabhhhcodes wants to merge 1 commit into
tanmayjoddar:mainfrom
saurabhhhcodes:fix/configurable-timeout-7
Open

fix: allow configurable request timeout#25
saurabhhhcodes wants to merge 1 commit into
tanmayjoddar:mainfrom
saurabhhhcodes:fix/configurable-timeout-7

Conversation

@saurabhhhcodes

@saurabhhhcodes saurabhhhcodes commented May 20, 2026

Copy link
Copy Markdown

Summary

  • closes dx: allow configuring HTTP timeout via env var #7
  • supports APIDRIFT_TIMEOUT_MS for slower APIs while keeping the default at 10000 ms
  • ignores invalid, non-integer, or non-positive timeout values
  • documents the environment variable in the README
  • adds focused unit tests for timeout parsing behavior

Validation

  • npm ci
  • npm test -- --runInBand (13 passed)
  • node --check src/core/fetcher.js
  • node --check tests/core/fetcher.test.js
  • git diff --check

Suggested labels: gssoc, dx, good first issue.

Suggested GSSoC labels

If accepted for scoring, this should fit gssoc, level:beginner, dx, type:feature, type:testing, quality:clean based on the linked issue labels and the focused validation in this PR.

@saurabhhhcodes

Copy link
Copy Markdown
Author

Quick status for review: this PR is mergeable from GitHub's side and intentionally scoped to the linked apidrift-cli issue.

Validation already included in the PR body:

  • focused Jest coverage for the touched behavior
  • syntax check for the touched test/source file where applicable
  • git diff --check

I also added the suggested GSSoC scoring labels in the PR body so maintainers can apply them directly if the change is accepted.

@saurabhhhcodes

Copy link
Copy Markdown
Author

Hi @tanmayjoddar, this PR is still open, mergeable, and clean against the current base branch. I rechecked the repo test baseline locally (node --experimental-vm-modules node_modules/jest/bin/jest.js -> 3 suites / 11 tests passed). Please review when you get a chance, and add the GSSoC labels on the PR to mirror the linked issue if you plan to merge it.

@saurabhhhcodes

Copy link
Copy Markdown
Author

Fresh validation pass on the current branch:\n- node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand -> 3 suites / 13 tests passed\n- node --check src/core/fetcher.js\n- git diff --check\n\nThis remains clean and mergeable from my side; no GitHub checks are configured on the branch, so local validation is the current proof.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dx: allow configuring HTTP timeout via env var

1 participant