Skip to content

refactor(postgres): remove branch compatibility - #769

Merged
sechmann merged 1 commit into
mainfrom
remove-postgres-branch-compatibility
Nov 20, 2026
Merged

sechmann merged 1 commit into
mainfrom
remove-postgres-branch-compatibility

Conversation

@sechmann

@sechmann sechmann commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Remove remaining Postgres branch compatibility:

  • Remove /branches redirect; old links now return 404.
  • Remove legacy branch validation from layouts, Insights, Logs, and Queries. Branch parameters are ignored.
  • Stop stripping branch parameters from metrics navigation.
  • Update log documentation to describe database-scoped logs.

Remove obsolete branch regression tests; retain current database-behavior coverage.

Evidence

  • Before: Legacy branch validation and redirect route remained.
  • After: Removed; 2021 tests pass.
  • Type checks, lint, formatting, and Helm lint pass.

Validation ran before rebase.

Merge Danger

Door: Two-way — revert restores compatibility.

Blast Radius: Postgres

Old /branches bookmarks now return 404. Branch query parameters no longer cause validation errors or affect database selection.

Copilot AI balanced review requested due to automatic review settings November 20, 2026 12:39
Drop legacy link validation and /branches redirect (now 404).
Stop stripping branch parameters from metrics navigation.
Remove obsolete branch regression tests.
@sechmann
sechmann force-pushed the remove-postgres-branch-compatibility branch from b39568c to b397b01 Compare November 20, 2026 12:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The supplied diffs omit the schema refresh, homeAttention.gql, homeOverview.test.ts, and activity changes, leaving the full change scope and removal of the API compatibility contract unverifiable.

No open issues 🎉

What changed in this PR

Removes legacy Postgres branch compatibility from Console’s database routes and navigation. The reviewed changes simplify database-focused behavior and remove obsolete branch-specific tests.

Changes:

  • Remove legacy branch URL validation and the /branches redirect route.
  • Preserve branch query parameters during metrics navigation while retaining interval handling.
  • Simplify regression tests, validate GraphQL documents against the current schema, and document database-scoped logs.
File Description
src/​routes/​team/​[team]/​[env]/​postgres/​[postgres]/​+layout.ts Remove branch URL validation.
src/​routes/​team/​[team]/​[env]/​postgres/​[postgres]/​(single)/​queries/​+page.ts Remove branch checks from query loading.
src/​routes/​team/​[team]/​[env]/​postgres/​[postgres]/​(single)/​logs/​+page.ts Remove branch checks from log loading.
src/​routes/​team/​[team]/​[env]/​postgres/​[postgres]/​(single)/​insights/​+page.ts Remove branch checks from insights loading.
src/​routes/​team/​[team]/​[env]/​postgres/​[postgres]/​(single)/​branches/​+page.ts Delete the legacy redirect route.
src/​routes/​team/​[team]/​[env]/​postgres/​[postgres]/​(single)/​+layout.svelte Stop stripping branch parameters from metrics links.
src/​lib/​utils/​lokiLogQuery.test.ts Use generic application fixtures for prefix filtering.
src/​lib/​domain/​postgres/​queryInsightsPage.test.ts Focus navigation tests on intervals and database filters.
src/​lib/​domain/​postgres/​queryInsightsLoad.test.ts Remove legacy branch-loading expectations.
src/​lib/​domain/​postgres/​queryInsights.test.ts Remove the branch-label exclusion assertion.
src/​lib/​domain/​postgres/​PostgresTable.test.ts Simplify the state-rendering test name.
src/​lib/​domain/​postgres/​postgresQueries.test.ts Validate documents directly against the current schema.
src/​lib/​domain/​postgres/​overviewPage.test.ts Update route mocks and remove branch assertions.
src/​lib/​domain/​postgres/​logsPage.test.ts Remove branch fixtures and UI assertions.
src/​lib/​domain/​postgres/​legacyLinks.ts Delete the legacy branch validation helper.
src/​lib/​domain/​postgres/​legacyLinks.test.ts Delete compatibility and redirect tests.
src/​lib/​domain/​postgres/​labels.test.ts Point route mocks to the database overview.
src/​lib/​domain/​postgres/​insightsPage.test.ts Remove branch-specific rendering checks.
src/​lib/​domain/​postgres/​insights.test.ts Retain database scoping checks without branch assertions.
src/​lib/​domain/​persistence/​Persistence.test.ts Keep database deduplication coverage with neutral fixtures.
src/​lib/​domain/​logs/​LogExplorer.test.ts Rename filter fixture text to resource filters.
src/​lib/​domain/​issues/​WorkloadIssuesFacets.test.ts Simplify Postgres issue-filter coverage.
src/​lib/​domain/​issues/​PostgresIssue.test.ts Remove obsolete branch-related assertions.
README.md Describe API-managed database log scope.

Review effort: Balanced

@sechmann
sechmann merged commit 42d1d4f into main Nov 20, 2026
7 checks passed
@sechmann
sechmann deleted the remove-postgres-branch-compatibility branch November 20, 2026 13:19
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.

2 participants