Skip to content

feat(postgres)!: promote Nais Postgres to the root command - #807

Merged
frodesundby merged 2 commits into
mainfrom
feat/postgres-root-command
Oct 22, 2026
Merged

frodesundby merged 2 commits into
mainfrom
feat/postgres-root-command

Conversation

@frodesundby

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: nais alpha postgres has moved to nais postgres. The postgres and pg aliases for Cloud SQL have been removed; use nais cloudsql instead.

BREAKING CHANGE: nais alpha postgres has moved to nais postgres. The postgres and pg aliases for Cloud SQL have been removed; use nais cloudsql instead.
@frodesundby
frodesundby requested a balanced review from Copilot October 22, 2026 11:40
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📝 Changelog preview

Below is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog.

v7.0.0 - 2026-10-22

Full Changelog: v6.8.0...v7.0.0

🚀 Features

  • (postgres) 💥 Breaking change: Promote Nais Postgres to the root command (186d617)

🐛 Bug Fixes

  • (postgres) Use authenticated tenant for console links (0647e60)

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

Postgres listing links must use the authenticated tenant’s console rather than NAV’s hard-coded host.

No open issues 🎉

What changed in this PR

Promotes Nais Postgres from nais alpha postgres to nais postgres, separating it from the existing Cloud SQL commands.

Changes:

  • Registers Nais Postgres at the root and removes the Cloud SQL postgres and pg aliases.
  • Relocates Postgres implementation and tests, updating imports, help text, and command hints.
  • Documents the breaking migration and adds command-routing regression tests.
File Description
internal/​postgres/​relay/​relay.go Provides authenticated HTTP/3 relay forwarding.
internal/​postgres/​relay/​relay_test.go Tests relay streaming and credential validation.
internal/​postgres/​list.go Provides instance listing and console links.
internal/​postgres/​list_test.go Tests instance-to-output conversion.
internal/​postgres/​instance.go Provides instance lifecycle mutations.
internal/​postgres/​instance_test.go Tests mutation contracts.
internal/​postgres/​get.go Fetches instance metadata and branches.
internal/​postgres/​command/​validation_test.go Updates relocated flag imports.
internal/​postgres/​command/​recovery_time_test.go Tests relative recovery times.
internal/​postgres/​command/​readiness.go Updates the Postgres package import.
internal/​postgres/​command/​progress.go Provides personal-access progress output.
internal/​postgres/​command/​progress_test.go Tests progress-output cleanup.
internal/​postgres/​command/​postgres.go Removes experimental command labeling.
internal/​postgres/​command/​instance.go Updates lifecycle command imports.
internal/​postgres/​command/​instance_update_test.go Tests update previews and validation.
internal/​postgres/​command/​instance_test.go Updates relocated flag imports.
internal/​postgres/​command/​instance_create_environment_test.go Updates creation-test imports.
internal/​postgres/​command/​inspection_commands_test.go Tests inspection at the root command.
internal/​postgres/​command/​hint.go Updates suggested command paths.
internal/​postgres/​command/​get.go Updates inspection command imports.
internal/​postgres/​command/​get_test.go Updates inspection-test imports.
internal/​postgres/​command/​get_readiness_test.go Updates readiness-test imports.
internal/​postgres/​command/​flag/​flag.go Updates the Postgres package import.
internal/​postgres/​command/​environment.go Updates environment-resolution imports.
internal/​postgres/​command/​environment_test.go Updates environment-test imports.
internal/​postgres/​command/​choices_test.go Tests instance choices and completion.
internal/​postgres/​command/​branch.go Updates branch help, imports, and examples.
internal/​postgres/​command/​branch_test.go Tests recovery-time parsing.
internal/​postgres/​command/​branch_delete_test.go Tests usage warnings before deletion.
internal/​postgres/​command/​branch_create_test.go Updates branch-creation imports.
internal/​postgres/​command/​branch_create_interactive_test.go Updates the expected command example.
internal/​postgres/​command/​access.go Updates access command imports and guidance.
internal/​postgres/​command/​access_test.go Tests inherited PostgreSQL environment filtering.
internal/​postgres/​command/​access_reason_test.go Tests access-reason validation and auditing.
internal/​postgres/​branch.go Provides branch queries and mutations.
internal/​postgres/​access.go Provides access creation and readiness polling.
internal/​postgres/​access_test.go Tests access polling and cancellation.
internal/​cloudsql/​command/​cloudsql.go Removes legacy aliases and their warning.
internal/​cloudsql/​command/​cloudsql_test.go Removes obsolete alias-warning tests.
internal/​application/​postgres_migration_test.go Tests new routing and removed commands.
internal/​application/​completion_validation_test.go Updates Postgres completion paths.
internal/​application/​application.go Registers the root Postgres command.
internal/​alpha/​command/​alpha.go Removes Postgres from alpha commands.
docs/​index.md Documents migration and removed aliases.

Review effort: Balanced

@frodesundby
frodesundby enabled auto-merge (squash) October 22, 2026 11:54
@frodesundby
frodesundby merged commit 0d0b3af into main Oct 22, 2026
22 checks passed
@frodesundby
frodesundby deleted the feat/postgres-root-command branch October 22, 2026 11:56
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