-
Notifications
You must be signed in to change notification settings - Fork 12
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
Use hpagent
with axios
for Apple Pay Merchant Validation with egress proxy
#3891
Merged
marcotranchino
merged 1 commit into
master
from
pp-12853-amendments-with-local-egress-proxy
Aug 9, 2024
Merged
Use hpagent
with axios
for Apple Pay Merchant Validation with egress proxy
#3891
marcotranchino
merged 1 commit into
master
from
pp-12853-amendments-with-local-egress-proxy
Aug 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
marcotranchino
force-pushed
the
pp-12853-amendments-with-local-egress-proxy
branch
from
August 9, 2024 08:51
c724279
to
d8990e8
Compare
marcotranchino
changed the title
Use
Use Aug 9, 2024
hpagent
with axios for Apple Pay Merchant Validation with proxyhpagent
with axios for Apple Pay Merchant Validation with egress proxy
marcotranchino
changed the title
Use
Use Aug 9, 2024
hpagent
with axios for Apple Pay Merchant Validation with egress proxyhpagent
with axios
for Apple Pay Merchant Validation with egress proxy
With this change, we have update the Apple Pay Merchant Validation implementation in order to use `hpagent` and `axios` in the presence of an egress proxy, as it's the case on our AWS environments. This is needed because we want to remove the use of `requestretry`, however `axios` has a problem preventing it from working with an egress proxy[1]. For this reason, we need to use an HttpsProxyAgent with it. We would want to use `https-proxy-agent`, however it has its own problem[2]. While we wait for these issues to be fixed, we can use `hpagent` which has been tested and works well with an egress proxy. Further information in the JIRA ticket[3]. [1] axios/axios#4531 [2] TooTallNate/proxy-agents#235 [3] https://payments-platform.atlassian.net/browse/PP-12853 Co-authored-by: Jonathan Harden <[email protected]> Co-authored-by: Dominic Belcher <[email protected]> Co-authored-by: Marco Tranchino <[email protected]>
marcotranchino
force-pushed
the
pp-12853-amendments-with-local-egress-proxy
branch
from
August 9, 2024 09:02
d8990e8
to
1ff3966
Compare
DomBelcher
approved these changes
Aug 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
marcotranchino
added a commit
that referenced
this pull request
Aug 9, 2024
With a recent change[1], we have enabled Apple Pay Merchant Validaton with `axios` and `hpagent`. The change has been successfully verified on the Test environment, where the code path with `axios` was switched on using an environment variable[2]. Once the code path with `axios` has been switched off also on Production, then we will be able to stop using `requestretry` in pay-frontend by completely deleting the code path using it for the Apple Pay Merchant Validation. Further information in JIRA[3]. [1] #3891 [2] alphagov/pay-infra#4913 [3] https://payments-platform.atlassian.net/browse/PP-12853
marcotranchino
added a commit
that referenced
this pull request
Aug 12, 2024
With a recent change[1], we have enabled Apple Pay Merchant Validaton with `axios` and `hpagent`. The change has been successfully verified on the Test environment, where the code path with `axios` was switched on using an environment variable[2]. Now that the code path with `axios` has been switched ON also on Production, then we are now able to stop using `requestretry` in pay-frontend by completely deleting the code path using it for the Apple Pay Merchant Validation. Note that whilst working on this code, we have also improved the Pay CLI, and that now it is possible to run Pay locally --with-egress-proxy. For this reason, we are also removing the code path using `axios` without a proxy URL, since it is not production like and it is not needed for local development either. Further information in JIRA[3]. [1] #3891 [2] alphagov/pay-infra#4913 [3] https://payments-platform.atlassian.net/browse/PP-12853
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this change, we have update the Apple Pay Merchant Validation implementation in order to use
hpagent
andaxios
in the presence of an egress proxy, as it's the case on our AWS environments.This is needed because we want to remove the use of
requestretry
, howeveraxios
has a problem preventing it from working with an egress proxy[1].For this reason, we need to use an HttpsProxyAgent with it.
We would want to use
https-proxy-agent
, however it has its own problem[2].While we wait for these issues to be fixed, we can use
hpagent
which has been tested and works well with an egress proxy.Further information in the JIRA ticket[3].
[1]
axios/axios#4531
[2]
TooTallNate/proxy-agents#235
[3]
https://payments-platform.atlassian.net/browse/PP-12853
Co-authored-by: Jonathan Harden [email protected]
Co-authored-by: Dominic Belcher [email protected]
Co-authored-by: Marco Tranchino [email protected]