Skip to content

CI fails when prisma generate loses its connection while downloading the debian-openssl-1.1.x engine #1920

Open

Description

@joshunrau

The lint-and-test job on #1919 failed 28 seconds into its Lint step (run 43481147052, attempt 1) because @opendatacapture/gateway#db:generate (prisma generate --no-hints), which pnpm lint runs through turbo, exited on an uncaught network error:

Prisma schema loaded from prisma/schema.prisma
Error: aborted
    at TLSSocket.socketCloseListener (node:_http_client:734:19)
  code: 'ECONNRESET',
  attemptNumber: 1,
  retriesLeft: 2

Turbo then stopped the 12 other tasks in flight, so the log shows ELIFECYCLE Command failed under every sibling task and the cause appears only under the gateway one. Re-running the job got past the step.

Why the step needs the network

  • apps/gateway/prisma/schema.prisma and apps/api/prisma/schema.prisma both set binaryTargets = ["native", "debian-openssl-1.1.x"].
  • prisma generate downloads the non-native debian-openssl-1.1.x query engine from https://binaries.prisma.sh (@prisma/fetch-engine; PRISMA_ENGINES_MIRROR overrides the host) and copies it beside the generated client, for example apps/gateway/node_modules/@prisma/generated-client/libquery_engine-debian-openssl-1.1.x.so.node.
  • Prisma keeps its downloads in $XDG_CACHE_HOME/prisma, or ~/.cache/prisma when that is unset. .github/workflows/ci.yaml caches only the pnpm store (actions/setup-node with cache: 'pnpm'), so a fresh runner downloads the engine on every run, and one dropped connection fails the job.
  • The error carries attemptNumber: 1, retriesLeft: 2: Prisma's own retry had two attempts left, but the abort surfaced as an unhandled rejection and ended the process on the first.

The validate job of .github/workflows/release.yaml runs pnpm lint as well, and build needs it, so the same failure there holds up a release's images until someone re-runs the job.

How often

Once so far: none of the 20 failed CI runs before it (back to 2026-10-26) has ECONNRESET or a db:generate exit in its log.

Options

  • Cache ~/.cache/prisma in ci.yaml and in the validate job, keyed on the Prisma version, so a run after the first downloads nothing.
  • Check whether the debian-openssl-1.1.x target is still needed. apps/api/Dockerfile and apps/gateway/Dockerfile build on node:lts-krypton, which ships OpenSSL 3. If nothing runs on OpenSSL 1.1 any more, dropping the target removes the download from CI and from every local prisma generate.
  • Retry the db:generate task, or the step, on failure.

Activity

  1. added
    BugType: existing behavior is wrong
    Priority: LowNice to have, cosmetic or speculative
    Difficulty: LowIsolated change, about 2 hours or less
    Area: InfrastructureDeployment, Docker, CI, logging, CLIs, build and test tooling
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: InfrastructureDeployment, Docker, CI, logging, CLIs, build and test toolingBugType: existing behavior is wrongDifficulty: LowIsolated change, about 2 hours or lessPriority: LowNice to have, cosmetic or speculative

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions