Skip to content

[core] Upgrade http(s)-proxy-agent#28563

Merged
mpodwysocki merged 1 commit into
mainfrom
feat/proxy-upgrade
Feb 13, 2024
Merged

[core] Upgrade http(s)-proxy-agent#28563
mpodwysocki merged 1 commit into
mainfrom
feat/proxy-upgrade

Conversation

@mpodwysocki
Copy link
Copy Markdown
Contributor

Packages impacted by this PR

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

Issues associated with this PR

Describe the problem that is addressed by this PR

Upgrades to the 7.x version of the https-proxy-agent and http-proxy-agent used for our proxy pipelines.

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

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

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

Copy link
Copy Markdown
Member

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the fix!

@mpodwysocki mpodwysocki enabled auto-merge (squash) February 13, 2024 17:04
@azure-sdk
Copy link
Copy Markdown
Collaborator

API change check

API changes are not detected in this pull request.

@mpodwysocki mpodwysocki merged commit ba2f5e6 into main Feb 13, 2024
@mpodwysocki mpodwysocki deleted the feat/proxy-upgrade branch February 13, 2024 17:48
xirzec added a commit that referenced this pull request Mar 19, 2024
…red (#28974)

### 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.
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.

3 participants