redocly-cli: redocly/cli lint hangs for a while before exiting

Describe the bug

Running version >= v1.0.0-beta.127 (latest is v1.0.0-beta.129) of redocly/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:

openapi: 3.0.3
info:
  title: Test
paths:
  /:
    get:
      responses:
        '200':
  1. Given the OpenAPI example file shown above
  2. Run docker run --rm -v $PWD:/spec redocly/cli lint example.yaml
  3. It outputs “run redocly lint --generate-ignore-file to add all problems to the ignore file.” and then sits there for a couple seconds
  4. Run docker run --rm -v $PWD:/spec redocly/cli:v1.0.0-beta.126 lint example.yaml and it exits immediately

Using 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)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

🎉 That did the trick. It returns immediately and tcpdump no longer shows api.redocly.com. This was the latest / v1.0.0-beta.129 version.

I am putting it on hold for now, as there is a workaround.

I tried set the environment REDOCLY_TELEMETRY=off resolve this problem. This version is v1.0.0-beta.129

I double-checked what works for me.

  • -e REDOCLY_TELEMETRY=off: results in a delay and tcpdump shows lookups for registry.npmjs.org
  • -e CI=true: results in a delay and tcpdump shows lookups for api.redocly.com
  • -e REDOCLY_TELEMETRY=off -e CI=true: results in no delay and tcpdump show no lookups

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.