Skip to content

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

Merged
xirzec merged 3 commits into
Azure:mainfrom
xirzec:fixProxyPort
Mar 19, 2024
Merged

[core-rest-pipeline] Address issue with proxy port setting being ignored#28974
xirzec merged 3 commits into
Azure:mainfrom
xirzec:fixProxyPort

Conversation

@xirzec
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@xirzec xirzec deleted the fixProxyPort branch March 19, 2024 21:07
@waldekmastykarz
Copy link
Copy Markdown

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

@timovv
Copy link
Copy Markdown
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