Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use proxy env variables and abort-controller package to prevent hanging behind proxies #1173

Closed
wants to merge 2 commits into from

Conversation

tatomyr
Copy link
Contributor

@tatomyr tatomyr commented Jul 12, 2023

What/Why/How?

While working behind proxy, HTTP_PROXY or HTTPS_PROXY environment variables might be used to detect this and skip unnecessary http calls.
Also, added abort-controller package to ensure consistent usage throughout different nodeJS versions.

Reference

Related to #1146

Testing

IN PROGRESS. Trying to replicate the original issue...

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested with redoc/reference-docs/workflows
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

@tatomyr tatomyr self-assigned this Jul 12, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2023

Command Mean [s] Min [s] Max [s] Relative
REDOCLY_TELEMETRY=off redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.441 ± 0.034 1.401 1.494 1.00
REDOCLY_TELEMETRY=off redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.465 ± 0.040 1.429 1.538 1.02 ± 0.04

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 74.47% 3727/5005
🟡 Branches 65.41% 2065/3157
🟡 Functions 66.7% 619/928
🟡 Lines 74.55% 3477/4664
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / fetch-with-timeout.ts
84.62% (-1.1% 🔻)
100% 66.67%
83.33% (-1.28% 🔻)
🔴
... / update-version-notifier.ts
34.43%
6.67% (-1.03% 🔻)
0% 34.55%

Test suite run success

615 tests passing in 89 suites.

Report generated by 🧪jest coverage report action from 0b8da1f

@tatomyr tatomyr changed the title fix: use proxy env variables and abort-controller package to prevent failing behind proxies fix: use proxy env variables and abort-controller package to prevent hanging behind proxies Jul 12, 2023
@lornajane
Copy link
Contributor

I'm closing this as we're not actively working on it. If we get more replication cases, we should revisit.

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.

2 participants