Neon "endpoint ... not found" in CI
The endpoint id embedded in the Neon host no longer maps to a live compute. Either the per-PR branch was deleted, or DATABASE_URL points at an old endpoint from a previous run. The host cannot resolve to a running compute.
What this error means
A connection fails with "could not translate host name ... to address" for an ep-...neon.tech host, or neonctl reports "endpoint ... not found" for the branch.
psql: error: could not translate host name
"ep-old-name-000000.us-east-2.aws.neon.tech" to address: Name or service not knownCommon causes
The branch and its endpoint were deleted
A cleanup job removed the per-PR branch (and its compute) but a later step still holds the old connection string.
A stale DATABASE_URL from a prior run
The secret or artifact carrying the connection string points at an endpoint that no longer exists.
How to fix it
Re-derive the connection string for the current branch
- Confirm the branch still exists with
neonctl branches list. - Regenerate the connection string for the live branch at CI time.
- Order cleanup after all steps that use the branch so it is not deleted early.
neonctl connection-string "pr-${{ github.event.number }}" \
--project-id "$NEON_PROJECT_ID" --pooledCreate the branch before using it
Ensure the create-branch step runs and succeeds before any step reads its connection string.
neonctl branches create --name "pr-${{ github.event.number }}" --project-id "$NEON_PROJECT_ID"How to prevent it
- Derive the connection string in the same run that creates the branch.
- Run branch cleanup only after all dependent steps complete.
- Never carry a Neon host between runs; regenerate it each time.