Skip to content

v0.2.2 API server migration crashes with SQL parameter mismatch #1424

Description

@jeremyeder

Problem

The migration init container in the v0.2.2 ambient-api-server crashes on startup with:

F0422 11:49:27.544781  1 migrate.go:30] pq: got 2 parameters but the statement requires 1

This prevents the new api-server pod from starting. The old v0.2.0 pod continues serving because the new ReplicaSet never reaches Ready, but the schema is stale and may be incompatible with v0.2.2 operator/backend behavior.

Introduced by the credential/inbox/RBAC changes in #1354 (alpha migration PR 2/7).

Fix

  • Audit the migration at migrate.go:30 — a SQL statement expects 1 bind parameter but receives 2
  • Add a CI check that runs migrations against a test DB before the release pipeline proceeds to deploy

Affected files

  • components/ambient-api-server/cmd/ambient-api-server/migrate.go (or the migration SQL files it references)

Context

Discovered during investigation of vteam-uat outage on 2026-04-22. The init container has been in CrashLoopBackOff since the v0.2.2 deploy at 00:58 UTC.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions