Skip to content

feat: configure HTTP timeout via env#11

Closed
saurabhhhcodes wants to merge 1 commit into
tanmayjoddar:mainfrom
saurabhhhcodes:codex/configurable-http-timeout-7
Closed

feat: configure HTTP timeout via env#11
saurabhhhcodes wants to merge 1 commit into
tanmayjoddar:mainfrom
saurabhhhcodes:codex/configurable-http-timeout-7

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Summary

  • add APIDRIFT_HTTP_TIMEOUT_MS parsing with a safe 10s default and validation for positive integer values
  • apply the shared timeout helper to endpoint fetches, OpenAPI discovery, and GraphQL discovery
  • document the env var in .env.example and README
  • add Jest coverage for default, configured, and invalid timeout values

Fixes #7

Validation

  • git diff --check
  • node --check src/utils/httpTimeout.js
  • node --check src/core/fetcher.js
  • node --check src/discovery/openapi.js
  • node --check src/discovery/graphql.js
  • npm test -- --runInBand could not run locally because npm is not available in this shell

GSSoC labels requested

Please add/keep gssoc and any required difficulty/type scoring labels if this is accepted.

@saurabhhhcodes

Copy link
Copy Markdown
Author

Closing this older version to keep the review queue clean. The current replacement for the configurable timeout work is #25.

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