-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Proxy settings not applied to all outgoing requests #1324
Comments
Want to see if you can take a swing at a PR on this one? It’s a little odd that AJV is making that request, it doesn’t need to be a resolvable URI just a URI, so I’m not sure why it would do that. |
@dlouzan FWIW, I'm also working behind a corporate proxy at $DAYJOB and never encountered this behavior. So we may indeed need your help to get this weird behavior fixed. There are two places where that url appears in Spectral:
One way to start troubleshooting the origin of this issue would be to check the code out, run then run Note: Would ajv be in cause, it looks like it exposes a |
I am experiencing the same issue behind a corporate proxy. Interestingly I checked the code out and attempted to build it. I get a similar issue during the build process where it appears to be attempting to resolve
|
We are behind the proxy as well also having the same issue. After around 90 seconds delay Lint continues. |
Yup, I can confirm the issue. |
@P0lip works like a charm just installed 5.9.0. Will run in docker later but am I right to assume the stoplight/spectral image is pointing to the latest? Many thanks for this!!! |
@PawelKolat glad to hear it resolved the issue! |
@P0lip Thanks for that. I'm not clear if the bump after your comment has changed the situation? This will bite us when we go into the local CICD. Is there anything we could do to help to fix the deployment? I guess we can always host our own spectral image with the latest Spectral version |
Nope, it's the same.
If I am not mistaken Hosting your own spectral image will be probably the right thing to do for now until we get it fixed. |
Describe the bug
While using spectral on a corporate network, our lints are taking a long time (hitting a network timeout) because not all outgoing connections are honouring the proxy settings.
After initiating a lint, spectral seemed to hang and we tracked this to an outgoing connection to http://json-schema.org on startup:
Looks like this is triggered from one of the libraries (ajv?), and it is not respecting the proxy settings. The net effect is that on startup spectral will hang for a big while until the timeout hits and then the lint continues.
On top of this, the standard environment variables
HTTP(S)_PROXY
are not used to configure the proxy settings, the CLI will only recognizePROXY
. This is documented in https://meta.stoplight.io/docs/spectral/docs/guides/2-cli.md#proxying, but it is non-standard behaviour.Environment
The text was updated successfully, but these errors were encountered: