Skip to content

[HorizonDB] Add parameter-group commands#10046

Open
alxhghs wants to merge 4 commits into
Azure:mainfrom
alxhghs:alexfen-horizondb-parameter-group-commands
Open

[HorizonDB] Add parameter-group commands#10046
alxhghs wants to merge 4 commits into
Azure:mainfrom
alxhghs:alexfen-horizondb-parameter-group-commands

Conversation

@alxhghs

@alxhghs alxhghs commented Jun 26, 2026

Copy link
Copy Markdown
Member

Description

Adds az horizondb parameter-group commands to manage HorizonDB parameter groups:

  • parameter-group create — create a parameter group. The service requires at least one custom name=value parameter (--parameters); any parameters you do not specify inherit the PostgreSQL defaults for the group.
  • parameter-group show — show a parameter group
  • parameter-group list — list parameter groups in a resource group
  • parameter-group delete — delete a parameter group

Parameter groups are immutable once created (the service rejects updates), so no update command is provided; to change parameters, create a new group and assign it to the cluster via az horizondb update --parameter-group.

Bumps the extension version to 1.0.0b4 and documents the change in HISTORY.rst.

Testing

  • azdev style horizondb — PASSED
  • azdev linter horizondb — PASSED
  • HorizonDBParameterGroupCrudScenarioTest recorded live and verified in playback — PASSED

History Notes

  • Add az horizondb parameter-group commands to create, delete, list, and show HorizonDB parameter groups.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 26, 2026

Copy link
Copy Markdown
❌Azure CLI Extensions Breaking Change Test
❌cosmosdb-preview
rule cmd_name rule_message suggest_message
1007 - ParaRemove cosmosdb create cmd cosmosdb create removed parameter disable_local_auth please add back parameter disable_local_auth for cmd cosmosdb create
1012 - SubgroupRemove cosmosdb keys sub group cosmosdb keys removed please confirm sub group cosmosdb keys removed
1007 - ParaRemove cosmosdb restore cmd cosmosdb restore removed parameter disable_local_auth please add back parameter disable_local_auth for cmd cosmosdb restore
1012 - SubgroupRemove cosmosdb softdeleted-account sub group cosmosdb softdeleted-account removed please confirm sub group cosmosdb softdeleted-account removed
1012 - SubgroupRemove cosmosdb sql softdeleted-container sub group cosmosdb sql softdeleted-container removed please confirm sub group cosmosdb sql softdeleted-container removed
1012 - SubgroupRemove cosmosdb sql softdeleted-database sub group cosmosdb sql softdeleted-database removed please confirm sub group cosmosdb sql softdeleted-database removed
1007 - ParaRemove cosmosdb update cmd cosmosdb update removed parameter soft_delete_configuration please add back parameter soft_delete_configuration for cmd cosmosdb update
⚠️ 1010 - ParaPropUpdate cosmosdb create cmd cosmosdb create update parameter continuous_tier: updated property choices from ['Continuous30Days', 'Continuous35Days', 'Continuous7Days'] to ['Continuous30Days', 'Continuous7Days']
⚠️ 1010 - ParaPropUpdate cosmosdb update cmd cosmosdb update update parameter continuous_tier: updated property choices from ['Continuous30Days', 'Continuous35Days', 'Continuous7Days'] to ['Continuous30Days', 'Continuous7Days']
⚠️horizondb
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd horizondb parameter-group sub group horizondb parameter-group added

@alxhghs alxhghs force-pushed the alexfen-horizondb-parameter-group-commands branch 2 times, most recently from 6614ae0 to dbf90a9 Compare June 26, 2026 21:34
Add 'az horizondb parameter-group' command group over the Microsoft.HorizonDb/parameterGroups resource with create, delete, list, and show commands. Parameter groups are immutable once created (service returns ParameterGroupUpdateNotSupported), so no update command is provided. Bump version to 1.0.0b4. Includes live-recorded test cassette and test run log.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alxhghs alxhghs force-pushed the alexfen-horizondb-parameter-group-commands branch from dbf90a9 to a86d6de Compare June 26, 2026 21:46
@alxhghs alxhghs requested a review from nasc17 June 26, 2026 22:05
@yonzhan yonzhan requested a review from jsntcy June 26, 2026 23:39
@yonzhan

yonzhan commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

HorizonDB

Comment thread src/horizondb/azext_horizondb/commands/custom_commands.py Outdated
Comment thread src/horizondb/azext_horizondb/tests/latest/test_horizondb_results.log Outdated
Comment thread src/horizondb/azext_horizondb/_help.py Outdated
Comment thread src/horizondb/azext_horizondb/_params.py Outdated
- Move parameter-group commands into commands/parameter_group_commands.py
- Reword parameter-group create help for unspecified parameters
- Clarify --version help as the PostgreSQL major version
- Remove committed test_horizondb_results.log

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alxhghs alxhghs marked this pull request as ready for review June 29, 2026 19:27
@alxhghs alxhghs requested review from Copilot and nasc17 June 29, 2026 19:27

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

Adds HorizonDB parameter-group management support to the horizondb extension, including new CLI commands, argument wiring/validation, help text, and scenario coverage, along with a version bump and history entry.

Changes:

  • Introduces az horizondb parameter-group {create,show,list,delete} command group wired to the vendored SDK plus custom create/delete/list handlers.
  • Adds --parameters parsing/validation and new help entries for the parameter-group commands.
  • Adds/extends scenario tests for parameter-group CRUD and bumps extension version + HISTORY.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/horizondb/setup.py Bumps extension version to 1.0.0b4.
src/horizondb/HISTORY.rst Documents the new parameter-group command set in release notes.
src/horizondb/azext_horizondb/tests/latest/test_horizondb_parameter_group.py Adds CRUD scenario coverage for parameter groups and extends existing scenario flows.
src/horizondb/azext_horizondb/tests/latest/constants.py Adds naming constants for parameter-group test resources.
src/horizondb/azext_horizondb/commands/parameter_group_commands.py Implements custom handlers for create/delete/list (with no-wait support).
src/horizondb/azext_horizondb/cluster_commands.py Registers the new horizondb parameter-group command group and its commands.
src/horizondb/azext_horizondb/_validators.py Adds a validator to parse --parameters name=value pairs into SDK model objects.
src/horizondb/azext_horizondb/_params.py Adds CLI argument definitions for parameter-group commands (name, parameters, pg-version, etc.).
src/horizondb/azext_horizondb/_help.py Adds CLI help entries and examples for the new parameter-group commands.
src/horizondb/azext_horizondb/_client_factory.py Adds a client factory for parameter-group operations.

Comment thread src/horizondb/azext_horizondb/_params.py
Comment thread src/horizondb/azext_horizondb/_params.py Outdated
Comment thread src/horizondb/azext_horizondb/_params.py Outdated
@yonzhan yonzhan requested a review from Pan-Qi June 30, 2026 01:55
@Pan-Qi

Pan-Qi commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

Remove the redundant pg_version_arg_type and reuse version_arg_type
(--version/-v) for the parameter group create command, per review
feedback. Update help examples and tests accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@nasc17 nasc17 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, address merge conflict

…arameter-group-commands

# Conflicts:
#	src/horizondb/HISTORY.rst
#	src/horizondb/azext_horizondb/_params.py

@nachoalonsoportillo nachoalonsoportillo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm missing one command through which we can list connections (https://learn.microsoft.com/en-us/rest/api/horizondb/parameter-groups/list-connections?view=rest-horizondb-2026-01-20-preview&tabs=HTTP)

`az horizondb parameter-group list-connections'

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.

7 participants