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

[core-rest-pipeline] Address issue with proxy port setting being ignored #28974

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

xirzec
Copy link
Member

@xirzec xirzec commented Mar 19, 2024

Packages impacted by this PR

@azure/core-rest-pipeline

Issues associated with this PR

#28951

Describe the problem that is addressed by this PR

When PR #28563 upgraded http-proxy-agent it didn't properly pass along port as this is now encoded in the proxy URL instead of the agent options.

This PR trims down the unnecessary parsing we are doing to turn the proxy URL into ProxySettings, preferring to pass the URL as-is to http-proxy-agent and avoid losing information. In cases where we receive ProxySettings we will convert it into a URL correctly.

For unknown historical reasons, getDefaultProxySettings was exposed as public surface, but since we no longer need this internally, I have marked it as deprecated so we may remove it in a later major version.

Are there test cases added in this PR? (If not, why?)

Existing tests were updated to validate the proxy URL being set correctly on the agent itself.

Copy link
Member

@timovv timovv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get this in ts-http-runtime as well?

Copy link
Member

@timovv timovv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the port 😀

@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 19, 2024

API change check

APIView has identified API level changes in this PR and created following API reviews.

@azure/core-rest-pipeline
@typespec/ts-http-runtime

@xirzec xirzec merged commit 56edcbd into Azure:main Mar 19, 2024
14 checks passed
@xirzec xirzec deleted the fixProxyPort branch March 19, 2024 21:07
@waldekmastykarz
Copy link

When can we expect the patched version of @azure/core-rest-pipeline to be released?

@timovv
Copy link
Member

timovv commented Mar 20, 2024

This change will be in 1.15.1 which I plan to release later today.

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

Successfully merging this pull request may close these issues.

5 participants