Skip to content

feat: psql v2#657

Merged
avirtopeanu-ionos merged 36 commits into
masterfrom
feat/psql-2
Apr 14, 2026
Merged

feat: psql v2#657
avirtopeanu-ionos merged 36 commits into
masterfrom
feat/psql-2

Conversation

@avirtopeanu-ionos

@avirtopeanu-ionos avirtopeanu-ionos commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Adds support for psql v2 API using a separate postgres-v2 command.

Changes ionosctl login --whitelist to support also sending versions

Comment thread commands/dbaas/postgres-v2/cluster/create.go Fixed
Comment thread commands/dbaas/postgres-v2/cluster/create.go Fixed
Comment thread commands/dbaas/postgres-v2/cluster/create.go Fixed
Comment thread commands/dbaas/postgres-v2/cluster/create.go Fixed
Comment thread commands/dbaas/postgres-v2/cluster/update.go Fixed
Comment thread commands/dbaas/postgres-v2/cluster/update.go Fixed
Comment thread commands/dbaas/postgres-v2/cluster/update.go Fixed
@avirtopeanu-ionos avirtopeanu-ionos force-pushed the feat/psql-2 branch 2 times, most recently from 2a1a11d to 6eea4ce Compare March 25, 2026 10:13
@avirtopeanu-ionos avirtopeanu-ionos force-pushed the feat/psql-2 branch 2 times, most recently from edbc17e to d50cb3a Compare April 2, 2026 12:53
@avirtopeanu-ionos avirtopeanu-ionos marked this pull request as ready for review April 2, 2026 12:53
Copilot AI review requested due to automatic review settings April 2, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds DBaaS PostgreSQL API v2 support by introducing a separate ionosctl dbaas postgres-v2 command tree backed by the github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3 SDK.

Changes:

  • Vendored and wired the dbaas/psql/v3 SDK as the client for the new postgres-v2 commands (clusters, backups, versions, waiters).
  • Added new jsonpaths/table conversion mappings and new CLI flags/constants for the postgres-v2 surface.
  • Updated generated docs to include the new postgres-v2 command group and adjusted the existing postgres --sync flag name to --sync-mode.

Reviewed changes

Copilot reviewed 42 out of 91 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
vendor/modules.txt Adds vendored module entry for dbaas/psql/v3.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_postgres_version.go Vendored SDK model for Postgres versions.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_postgres_version_read.go Vendored SDK model for reading a Postgres version resource.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_postgres_version_read_list_all_of.go Vendored SDK list wrapper for Postgres versions.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_postgres_user.go Vendored SDK model for cluster user credentials.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_postgres_cluster_states.go Vendored SDK enum for cluster states.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_postgres_cluster_replication_mode.go Vendored SDK enum for replication modes.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_postgres_cluster_from_backup.go Vendored SDK model for in-place restore / init from backup.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_postgres_cluster_connection.go Vendored SDK model for cluster network connection.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_pagination.go Vendored SDK pagination model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_maintenance_window.go Vendored SDK maintenance window model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_links.go Vendored SDK pagination links model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_instance_configuration.go Vendored SDK instance sizing model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_error.go Vendored SDK error model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_error_messages.go Vendored SDK error message model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_day_of_the_week.go Vendored SDK day-of-week enum.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_cluster_read.go Vendored SDK cluster read model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_cluster_read_list_all_of.go Vendored SDK cluster list wrapper.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_cluster_metadata_all_of.go Vendored SDK cluster metadata model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_cluster_metadata_all_of_1.go Vendored SDK cluster metadata extension model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_cluster_ensure.go Vendored SDK ensure/update wrapper model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_cluster_create.go Vendored SDK create wrapper model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_backup_read.go Vendored SDK backup read model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_backup_read_list_all_of.go Vendored SDK backup list wrapper.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_backup_location.go Vendored SDK backup location model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_backup_location_read.go Vendored SDK backup location read model.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_backup_location_read_list_all_of.go Vendored SDK backup location list wrapper.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_backup_ensure.go Vendored SDK backup ensure wrapper.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/model_backup_create.go Vendored SDK backup create wrapper.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/LICENSE Vendored SDK license file.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/.travis.yml Vendored SDK CI config file.
vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/psql/v3/.gitignore Vendored SDK gitignore file.
internal/printer/json2table/resource2table/dbaas-postgres.go Adds table conversion helpers for Postgres version list/read using psql/v3.
internal/printer/json2table/jsonpaths/dbaas.go Adds jsonpath mappings for postgres-v2 cluster/version/backup resources.
internal/core/doc/flag.go Adjusts doc default rendering for “random” maintenance flags (stabilizes generated docs).
internal/constants/constants.go Adds postgres-v2 constants (regional URL/locations, new flags) and renames sync flag to sync-mode.
internal/client/types.go Adds PostgresClientV2 to the shared client struct.
internal/client/builder.go Instantiates PostgresClientV2 using shared config.
go.sum Adds checksums for dbaas/psql/v3.
go.mod Adds dependency on dbaas/psql/v3.
docs/summary.md Adds postgres-v2 section to the documentation summary.
docs/subcommands/Database-as-a-Service/postgres/v2/version/list.md New generated docs for postgres-v2 version list.
docs/subcommands/Database-as-a-Service/postgres/v2/version/get.md New generated docs for postgres-v2 version get.
docs/subcommands/Database-as-a-Service/postgres/v2/cluster/update.md New generated docs for postgres-v2 cluster update.
docs/subcommands/Database-as-a-Service/postgres/v2/cluster/restore.md New generated docs for postgres-v2 cluster restore.
docs/subcommands/Database-as-a-Service/postgres/v2/cluster/list.md New generated docs for postgres-v2 cluster list.
docs/subcommands/Database-as-a-Service/postgres/v2/cluster/get.md New generated docs for postgres-v2 cluster get.
docs/subcommands/Database-as-a-Service/postgres/v2/cluster/delete.md New generated docs for postgres-v2 cluster delete.
docs/subcommands/Database-as-a-Service/postgres/v2/cluster/create.md New generated docs for postgres-v2 cluster create.
docs/subcommands/Database-as-a-Service/postgres/v2/backup/location/list.md New generated docs for postgres-v2 backup location list.
docs/subcommands/Database-as-a-Service/postgres/v2/backup/location/get.md New generated docs for postgres-v2 backup location get.
docs/subcommands/Database-as-a-Service/postgres/v2/backup/list.md New generated docs for postgres-v2 backup list.
docs/subcommands/Database-as-a-Service/postgres/v2/backup/get.md New generated docs for postgres-v2 backup get.
docs/subcommands/Database-as-a-Service/postgres/cluster/create.md Updates existing postgres docs to reflect --sync-mode flag name.
commands/dbaas/postgres-v2/waiter/state.go Adds waiter interrogator to poll cluster state via v2 client.
commands/dbaas/postgres-v2/waiter/deletion.go Adds waiter interrogator to detect deletion via v2 client.
commands/dbaas/postgres-v2/version/version.go Adds postgres-v2 version command root.
commands/dbaas/postgres-v2/version/list.go Implements postgres-v2 version listing.
commands/dbaas/postgres-v2/version/get.go Implements postgres-v2 version retrieval + shell completion.
commands/dbaas/postgres-v2/root.go Adds postgres-v2 root command and regional config override wiring.
commands/dbaas/postgres-v2/cluster/restore.go Implements postgres-v2 cluster restore from backup with optional recovery time.
commands/dbaas/postgres-v2/cluster/list.go Implements postgres-v2 cluster listing + filters.
commands/dbaas/postgres-v2/cluster/get.go Implements postgres-v2 cluster get + optional wait-for-state.
commands/dbaas/postgres-v2/cluster/delete.go Implements postgres-v2 cluster deletion (+ delete-all flow).
commands/dbaas/postgres-v2/cluster/cluster.go Adds postgres-v2 cluster command root and shared list helper.
commands/dbaas/postgres-v2/backup/location/location.go Adds postgres-v2 backup location subcommand root.
commands/dbaas/postgres-v2/backup/location/list.go Implements postgres-v2 backup location list.
commands/dbaas/postgres-v2/backup/location/get.go Implements postgres-v2 backup location get + shell completion.
commands/dbaas/postgres-v2/backup/list.go Implements postgres-v2 backup list + optional cluster filter.
commands/dbaas/postgres-v2/backup/get.go Implements postgres-v2 backup get + shell completion.
commands/dbaas/postgres-v2/backup/backup.go Adds postgres-v2 backup command root and shared list helper.
commands/dbaas/dbaas.go Registers postgres-v2 under the main dbaas command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread commands/dbaas/postgres-v2/root.go Outdated
Comment thread commands/dbaas/postgres-v2/version/version.go
Comment thread commands/dbaas/postgres-v2/version/list.go
Comment thread commands/dbaas/postgres-v2/version/get.go
Comment thread commands/dbaas/postgres-v2/cluster/list.go Outdated
Comment thread docs/subcommands/Database-as-a-Service/postgres/v2/cluster/list.md Outdated
Comment thread commands/dbaas/postgres-v2/cluster/cluster.go Outdated
Comment thread commands/dbaas/postgres-v2/backup/backup.go Outdated
Comment thread commands/dbaas/postgres-v2/backup/location/location.go Outdated
Comment thread internal/constants/constants.go
@avirtopeanu-ionos avirtopeanu-ionos force-pushed the feat/psql-2 branch 2 times, most recently from 674354e to 9e9f95f Compare April 7, 2026 09:59
@avirtopeanu-ionos avirtopeanu-ionos force-pushed the feat/psql-2 branch 3 times, most recently from 45204c9 to f143954 Compare April 7, 2026 11:23

@glimberea glimberea 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.

Please ensure to remove all uses of the old printer package functions. I've flagged a couple of them, but not all of them :))))

Comment thread commands/dbaas/postgres-v2/cluster/cluster.go
Comment thread commands/dbaas/postgres-v2/cluster/create.go
Comment thread commands/dbaas/postgres-v2/cluster/create.go Outdated
Comment thread commands/dbaas/postgres-v2/cluster/create.go Outdated
Comment thread commands/dbaas/postgres-v2/cluster/create.go Outdated
Comment thread commands/dbaas/postgres-v2/version/get.go Outdated
Comment thread commands/dbaas/postgres-v2/version/list.go Outdated
Comment thread commands/dbaas/postgres-v2/waiter/state.go
Comment thread internal/printer/json2table/jsonpaths/dbaas.go Outdated
Comment thread internal/printer/json2table/resource2table/dbaas-postgres.go Outdated
@sonarqubecloud

Copy link
Copy Markdown

@avirtopeanu-ionos avirtopeanu-ionos merged commit 4dcf121 into master Apr 14, 2026
12 of 13 checks passed
@avirtopeanu-ionos avirtopeanu-ionos deleted the feat/psql-2 branch April 14, 2026 10:03
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.

4 participants