Skip to content

Export 502s on a Postgres-less er-server (the 501 shape meets the tags prequery) #896

Done

Description

@athvin

What

Before #805, the segment CSV export worked against an er-server booted without ER_PG_DSN (it only needs the lake). After, the route prequeries /v1/orgs/{org}/tags and /v1/orgs/{org}/datasets/{ds}/taggings, both of which answer 501 tags require Postgres there, and the BFF maps any upstream 5xx/501 to a blanket 502 — so the export fails wholesale on a deploy shape where the tags column could never be non-empty.

All deployed environments carry a DSN (the frontend's own auth needs Postgres), so this is narrow — but it is a behaviour regression on a supported boot mode.

Candidate fixes (pick one)

  1. Reads return the empty truth: tags_index/taggings_index answer [] (not 501) without a DSN — without Postgres there ARE no tags, so empty is honest. Writes keep 501. Trade-off: a deploy that LOST its DSN reads as "no tags" instead of failing loud — the 501 exists to make that misconfiguration noisy.
  2. BFF treats upstream 501 on the prequery as an empty column: needs a 501 branch in mapUpstreamError (none exists today) or string-sniffing detail, which is brittle.

Leaning (1) for reads only, but it changes a deliberate existing contract, so it is its own decision. Surfaced by pr-review on #805.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions