Skip to content

fix(gen2-migration): tarball installation cannot find proxyAgent#14755

Merged
iliapolo merged 2 commits intogen2-migrationfrom
epolon/tarball
Apr 6, 2026
Merged

fix(gen2-migration): tarball installation cannot find proxyAgent#14755
iliapolo merged 2 commits intogen2-migrationfrom
epolon/tarball

Conversation

@iliapolo
Copy link
Copy Markdown
Contributor

@iliapolo iliapolo commented Apr 6, 2026

Description of changes

Re-implement proxyAgent instead of calling provider.proxyAgent. In the dev branch, proxyAgent is not exported from the cloudformation provider package:

formUserAgentParam,
loadConfiguration,
resolveRegion,

Since the gen2-migration tarball only packages the amplify-cli package, all other packages are consumed via normal dependencies that were published from the dev branch.

Note that in the gen2-migration branch, proxyAgent is exported since we added it:

formUserAgentParam,
loadConfiguration,
resolveRegion,
proxyAgent,

Meaning that when we merge gen2-migration with dev, we can remove this.

The implementation of proxyAgent came from here:

import { ProxyAgent } from 'proxy-agent';
export const proxyAgent = () => {
let httpAgent = undefined;
const httpProxy = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
if (httpProxy) {
httpAgent = new ProxyAgent();
}
return httpAgent;
};

Issue #, if available

#14754

Description of how you validated changes

  1. Build and install the local tarball
  2. Ran npx amplify gen2-migration asses

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@iliapolo iliapolo requested a review from a team as a code owner April 6, 2026 18:30
@iliapolo iliapolo enabled auto-merge (squash) April 6, 2026 18:33
@iliapolo iliapolo merged commit 5584a35 into gen2-migration Apr 6, 2026
4 checks passed
@iliapolo iliapolo deleted the epolon/tarball branch April 6, 2026 18:39
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