Skip to content

feat: mariadbv2 - #694

Open
avirtopeanu-ionos wants to merge 19 commits into
masterfrom
feat/mariadbv2
Open

feat: mariadbv2#694
avirtopeanu-ionos wants to merge 19 commits into
masterfrom
feat/mariadbv2

Conversation

@avirtopeanu-ionos

Copy link
Copy Markdown
Contributor

Adds support for dbaas mariadb-v2

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.

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-v2 CLI commands (cluster/backup/version) with docs and tab-completion helpers.
  • Vendor and wire up github.com/ionos-cloud/sdk-go-bundle/products/dbaas/mariadb/v3 as the backing SDK client.
  • Fix global --wait URL derivation to prefer the transport-captured request URL when href is 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.

Comment thread internal/globalwait/globalwait.go Outdated
Comment thread internal/globalwait/globalwait_test.go
Comment thread internal/client/types.go
Comment thread commands/dbaas/mariadb-v2/cluster/update.go Outdated
The suite existence check ran in the Validate inputs step before any
checkout, so test/suites did not exist yet and every /test dispatch
failed with 'Suite not found'. Move the file/dir check into a new step
after Checkout PR; keep regex/PR-number validation pre-checkout.
PR CI ran 'make test' which included the BATS suites (test/run.sh).
Switch to 'make itest' so pull requests run only unit and go-based
integration tests; BATS suites are triggered per-PR via a /test <suite>
comment (e2e.yml + pr-comment-trigger.yml). Drop the bats-core and FTPS
install steps, which only served the BATS suites.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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