Skip to content

fix(boot): an org with two datasets each at config v1 fails every boot — ensure_default_dataset_for's config read returns two rows #1445

Done

Description

@athvin

er-dev deploys broken since 2026-11-29 ~12:45Z. Deploy run 46264663476: er-schema-migrate failed with ensuring the control-plane schema: query returned an unexpected number of rows.

Cause: fixups::ensure_default_dataset_for runs on every boot and reads SELECT yaml FROM public.config_versions WHERE org_id = $1 AND version = $2 with query_opt. Config versions are numbered per dataset. Once an org has a second dataset that has published its own v1, the read returns two rows, query_opt returns RowCount, and the control plane refuses to boot. Trigger: p3live/spill10m, created for #558.

Done when that read can't fail on a multi-dataset org, a pg test boots an org with two datasets each at config v1, and the er-dev deploy goes green.

Activity

  1. added
    followup
    on Nov 29, 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

    followup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions