Repository navigation
feat: mariadbv2 - #694
feat: mariadbv2#694
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new ionosctl dbaas mariadb-v2 command tree backed by the sdk-go-bundle MariaDB v3 module (API v2), and adjusts global --wait handling to avoid hangs when APIs return relative href values that don’t include version path segments.
Changes:
- Add
dbaas mariadb-v2CLI commands (cluster/backup/version) with docs and tab-completion helpers. - Vendor and wire up
github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3as the backing SDK client. - Fix global
--waitURL derivation to prefer the transport-captured request URL whenhrefis missing or relative.
Reviewed changes
Copilot reviewed 40 out of 89 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vendor/modules.txt | Adds vendored module entry for MariaDB SDK v3. |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_pagination.go | Vendored generated SDK model types (pagination). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_mariadb_version_read.go | Vendored generated SDK model types (version read). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_mariadb_version_read_list_all_of.go | Vendored generated SDK model types (version list). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_mariadb_user.go | Vendored generated SDK model types (credentials). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_mariadb_restore_cluster_from_backup.go | Vendored generated SDK model types (restore request). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_mariadb_cluster_states.go | Vendored generated SDK model types (state enum). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_mariadb_cluster_connection.go | Vendored generated SDK model types (connection). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_maintenance_window.go | Vendored generated SDK model types (maintenance window). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_links.go | Vendored generated SDK model types (pagination links). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_instance_configuration.go | Vendored generated SDK model types (instance sizing). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_error.go | Vendored generated SDK model types (error wrapper). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_error_messages.go | Vendored generated SDK model types (error messages). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_day_of_the_week.go | Vendored generated SDK model types (weekday enum). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_cluster_read.go | Vendored generated SDK model types (cluster read). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_cluster_read_list_all_of.go | Vendored generated SDK model types (cluster list). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_cluster_metadata_all_of.go | Vendored generated SDK model types (cluster metadata). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_cluster_metadata_all_of_1.go | Vendored generated SDK model types (cluster metadata extension). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_cluster_ensure.go | Vendored generated SDK model types (ensure/update). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_cluster_create.go | Vendored generated SDK model types (create). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_cluster_backup.go | Vendored generated SDK model types (backup config). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_backup_read.go | Vendored generated SDK model types (backup read). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_backup_read_list_all_of.go | Vendored generated SDK model types (backup list). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_backup_location.go | Vendored generated SDK model types (backup location). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_backup_location_read.go | Vendored generated SDK model types (backup location read). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_backup_location_read_list_all_of.go | Vendored generated SDK model types (backup location list). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_backup_ensure.go | Vendored generated SDK model types (backup ensure). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/model_backup_create.go | Vendored generated SDK model types (backup create). |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/.travis.yml | Vendored upstream CI metadata. |
| vendor/github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3/.gitignore | Vendored upstream ignore metadata. |
| internal/globalwait/globalwait.go | Enhances --wait href handling for missing/relative href values. |
| internal/globalwait/globalwait_test.go | Adds regression tests for relative-vs-absolute href behavior in --wait. |
| internal/client/types.go | Adds MariaClientV2 client field backed by MariaDB SDK v3. |
| internal/client/builder.go | Instantiates and wraps transport for the new MariaDB v2 client. |
| go.mod | Adds dependency on MariaDB SDK v3. |
| go.sum | Adds checksums for MariaDB SDK v3. |
| commands/dbaas/dbaas.go | Registers the new mariadb-v2 root command under dbaas. |
| commands/dbaas/mariadb-v2/root.go | Defines the dbaas mariadb-v2 root command and regional overrides. |
| commands/dbaas/mariadb-v2/completer/completer.go | Adds completion helpers for versions/clusters/backups/locations. |
| commands/dbaas/mariadb-v2/version/version.go | Adds version subcommand group and column selection. |
| commands/dbaas/mariadb-v2/version/list.go | Implements version list. |
| commands/dbaas/mariadb-v2/version/get.go | Implements version get. |
| commands/dbaas/mariadb-v2/backup/backup.go | Adds backup subcommand group and columns. |
| commands/dbaas/mariadb-v2/backup/list.go | Implements backup list with cross-location listing. |
| commands/dbaas/mariadb-v2/backup/get.go | Implements backup get. |
| commands/dbaas/mariadb-v2/backup/location/location.go | Adds backup location subcommand group and columns. |
| commands/dbaas/mariadb-v2/backup/location/list.go | Implements backup location list. |
| commands/dbaas/mariadb-v2/backup/location/get.go | Implements backup location get. |
| commands/dbaas/mariadb-v2/cluster/cluster.go | Defines cluster columns and shared helpers (credentials/retention validation). |
| commands/dbaas/mariadb-v2/cluster/list.go | Implements cluster list with cross-location listing. |
| commands/dbaas/mariadb-v2/cluster/get.go | Implements cluster get. |
| commands/dbaas/mariadb-v2/cluster/create.go | Implements cluster create (empty or from backup, with PITR support). |
| commands/dbaas/mariadb-v2/cluster/update.go | Implements cluster update via GET+PUT (“ensure”) including version warning. |
| commands/dbaas/mariadb-v2/cluster/restore.go | Implements in-place PITR restore with friendly --recovery-time parsing. |
| commands/dbaas/mariadb-v2/cluster/delete.go | Implements cluster delete and delete --all cross-location flow. |
| commands/dbaas/mariadb-v2/cluster/cluster_test.go | Adds unit tests for recovery-time parsing and sizing conversions. |
| docs/summary.md | Adds the new mariadb v2 subtree to the generated docs index. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/version/list.md | Documents version list. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/version/get.md | Documents version get. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/cluster/create.md | Documents cluster create. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/cluster/delete.md | Documents cluster delete. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/cluster/get.md | Documents cluster get. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/cluster/list.md | Documents cluster list. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/cluster/restore.md | Documents cluster restore. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/cluster/update.md | Documents cluster update. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/backup/get.md | Documents backup get. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/backup/list.md | Documents backup list. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/backup/location/get.md | Documents backup location get. |
| docs/subcommands/Database-as-a-Service/mariadb/v2/backup/location/list.md | Documents backup location list. |
| CHANGELOG.md | Notes new mariadb-v2 support and the --wait relative-href fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
62ff591 to
addcd33
Compare
…he version-less href
…e client reference
addcd33 to
5c356f3
Compare
|
/test dbaas/mariadb-v2 |
|
/test dbaas/mariadb-v2 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 40 out of 89 changed files in this pull request and generated no new comments.
Suppressed comments (1)
commands/dbaas/mariadb-v2/cluster/create.go:32
seed/7is converted tointbefore applying% len(workingDaysOfWeek). On 32-bit architectures this can overflow (UnixNano is ~1e18), producing a negative index and a panic when indexingworkingDaysOfWeek.
To keep this deterministic across architectures, compute the modulus in a wide unsigned type and only convert to int after the value is bounded.
workingDaysOfWeek := []string{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"}
seed := time.Now().UnixNano()
hour := 10 + int(seed%7)
defaultMaintenanceDay := workingDaysOfWeek[int(seed/7)%len(workingDaysOfWeek)]
defaultMaintenanceTime := fmt.Sprintf("%02d:00:00", hour)
|



Adds support for
dbaas mariadb-v2Improves manually triggered e2e workflow (
/testcomments) by applying SKIPPED instead of FAILED status on wrong provided test suite paths (cannot remove failed CI once "FAILED" status is applied, would block PR)