Skip to content

Fix merge train stack collapse Postgres index length#619

Merged
cbusillo merged 1 commit into
mainfrom
fix/launchplane-postgres-index-length
May 14, 2026
Merged

Fix merge train stack collapse Postgres index length#619
cbusillo merged 1 commit into
mainfrom
fix/launchplane-postgres-index-length

Conversation

@cbusillo
Copy link
Copy Markdown
Owner

Summary

  • shorten the stack-collapse repository/base Postgres index name so it fits Postgres's 63-byte identifier limit
  • keep the Alembic migration and ORM metadata in sync
  • add a metadata guard test so future Postgres index names stay within the limit

Root cause

The first failing deploy introduced a 64-character index name: launchplane_merge_train_stack_collapse_plans_repository_base_idx. The live service creates missing schema at startup against Postgres, so the new image could fail before binding HTTP. The rollback image stays healthy, which is why the website remains usable.

Validation

  • uv run --extra dev ruff check tests/test_postgres_store.py control_plane/storage/postgres.py control_plane/storage/migrations/versions/d289e3ab4012_add_merge_train_stack_collapse_plans.py
  • uv run python -m unittest tests.test_postgres_store.PostgresRecordStoreTests.test_postgres_metadata_index_names_fit_identifier_limit tests.test_postgres_store.PostgresRecordStoreTests.test_alembic_baseline_creates_schema_used_by_record_store tests.test_postgres_store.PostgresRecordStoreTests.test_merge_train_stack_collapse_plan_records_round_trip
  • uv run python -m unittest tests.test_postgres_store tests.test_service tests.test_merge_train_stack_collapse
  • uv run python -m unittest

@cbusillo cbusillo merged commit 1ff1f8d into main May 14, 2026
12 checks passed
@cbusillo cbusillo deleted the fix/launchplane-postgres-index-length branch May 14, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant