-
Notifications
You must be signed in to change notification settings - Fork 159
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
redocly/cli lint hangs for a while before exiting #1146
Comments
Tried something... It turns out it hangs when behind a proxy. I assume it is attempting to make a HTTP request? Can that behavior be disabled? Switching telemetry off doesn't make a difference: |
Thanks for the update, although you've disproved my working hypothesis which was that the telemetry could cause a problem despite our testing on it! We'll take a look and keep you posted. |
Hi @philipnbbc, |
I ran The output of tcpdump showed DNS queries for |
Which version is this? Could you also switch off the telemetry? My last guess is this is a combo 😅 |
🎉 That did the trick. It returns immediately and tcpdump no longer shows |
I tried set the environment |
I double-checked what works for me.
|
Could you check whether the issue has been resolved in version |
It hasn't fixed it for me unfortunately. I ran I also tried it with |
Thanks @philipnbbc. Reopening the issue. |
@philipnbbc Hi, could you check it one more time with beta.131? |
I ran I confirmed that without docker that @redocly/[email protected] fixed the delay issue. I don't see the proxy in the tcpdump output and so I guess the fundamental issue is that there is nodejs code trying to connect that doesn't support proxies and recognise the proxy environment variables. |
Thanks @philipnbbc, We will continue researching this then. |
I'm trying to replicate this by calling a very slow endpoint, and I cannot see it hanging for too long. How long is the delay for you? Has it been changed in the recent updates? Any additional reproduction steps or info you can provide us with (e.g. OS, nodeJS version &c.)? |
I think the issue is that we have a proxy and network traffic has to go via that proxy. It appears from the tcpdump that the code is attempting to make connections without going via the proxy. I checked that the proxy environment variables are set in the docker container. The tcpdump shows DNS queries for I ran the cli docker a couple times and it was taking around 2 min 12 sec fairly consistently. It does vary because the delay was less last week. I've had issues with other nodejs code that don't support proxies, but in this case we can workaround it by using the 2 environment variables. |
I am putting it on hold for now, as there is a workaround. |
Note: this is tangentially related. |
JFYI @philipnbbc, hopefully this should have been fixed in v1.16.0. 😅 |
Yes it has, thank you 🎉 |
@philipnbbc we're going to remove the |
Describe the bug
Running version >=
v1.0.0-beta.127
(latest
isv1.0.0-beta.129
) ofredocly/cli
Docker results in the validation completing and then the process sits there for a while before exiting. The wait time can be significant (30 sec) for larger OpenAPI spec files.To Reproduce
Steps to reproduce the behavior:
A small OpenAPI file,
example.yaml
:docker run --rm -v $PWD:/spec redocly/cli lint example.yaml
redocly lint --generate-ignore-file
to add all problems to the ignore file." and then sits there for a couple secondsdocker run --rm -v $PWD:/spec redocly/cli:v1.0.0-beta.126 lint example.yaml
and it exits immediatelyUsing a larger OpenAPI file results in a longer and more significant hang time.
Expected behavior
It shouldn't, or it is unclear why it would hang for a while before exiting.
Redocly Version(s)
Issue is with Docker image
redocly/cli
version >=v1.0.0-beta.127
(latest
==v1.0.0-beta.129
)The text was updated successfully, but these errors were encountered: