You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short summary of what the user sees:
As a user I want to pass the proxy argument to SC so I can have SC be set up with a proxy.
Currently we filter this out which makes passing a proxy to SC impossible
Isolation: What must be true for it to happen? When does it not happen?
Happens when passing the proxy key. It happens both on CLI and using it as a package.
Links to Relevant Test Archives or Logs:
N/A
What attempts were made to find the root cause so far?
This happens due to the fact that --proxy is included here:
const CLI_PARAM_KEYS = CLI_PARAMS.map((param) => param.name).filter((name) => name != 'proxy')
const CLI_PARAM_ALIASES = CLI_PARAMS.map((param) => param.alias).filter(Boolean).filter((name) => name != 'p')
which would remove them from the lists and therefore keep them before sending them to SC.
The problem is that when the proxy is used to create a proxy agent for got it expects it to be a proper URL (e.g. http://localhost:8889) whereas SC expects this to be a domain with a port (e.g. localhost:8889)
Given this, I think there are two ways to go about this:
Do some magic so that you pass in a proper URL to --proxy/proxy object and it transforms it to how SC expects it.
Pros with this approach are that we have the same flag for both REST API calls as well as SC startup.
Cons is that this will add complexity to the source code.
Create a separate flag like --sauceconnect-proxy that exclusively passes it to SC.
Pros are that we keep the code clean. Cons that it will be confusing to customers since this is not a SC flag.
I'm tempted to go with 1. but wanted someone else's input on this
The text was updated successfully, but these errors were encountered:
Short summary of what the user sees:
As a user I want to pass the proxy argument to SC so I can have SC be set up with a proxy.
Currently we filter this out which makes passing a proxy to SC impossible
Exact steps to reproduce the problem:
https://github.com/enriquegh/node-saucelabs-proxy-bug
and then:
See something like:
and notice no
--proxy
flag is included.Isolation: What must be true for it to happen? When does it not happen?
Happens when passing the
proxy
key. It happens both on CLI and using it as a package.Links to Relevant Test Archives or Logs:
N/A
What attempts were made to find the root cause so far?
This happens due to the fact that
--proxy
is included here:node-saucelabs/src/constants.js
Line 141 in 9c9f90c
which is then added:
node-saucelabs/src/constants.js
Line 300 in 9c9f90c
and therefore removed before getting sent to SC.
At first I thought that doing something like:
which would remove them from the lists and therefore keep them before sending them to SC.
The problem is that when the proxy is used to create a proxy agent for got it expects it to be a proper URL (e.g. http://localhost:8889) whereas SC expects this to be a domain with a port (e.g. localhost:8889)
Given this, I think there are two ways to go about this:
Do some magic so that you pass in a proper URL to
--proxy
/proxy
object and it transforms it to how SC expects it.Pros with this approach are that we have the same flag for both REST API calls as well as SC startup.
Cons is that this will add complexity to the source code.
Create a separate flag like
--sauceconnect-proxy
that exclusively passes it to SC.Pros are that we keep the code clean. Cons that it will be confusing to customers since this is not a SC flag.
I'm tempted to go with 1. but wanted someone else's input on this
The text was updated successfully, but these errors were encountered: