Skip to content

[HorizonDB] Add parameter-group commands#10046

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

[HorizonDB] Add parameter-group commands#10046
alxhghs wants to merge 11 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-group list-connections - list clusters to which the parameter group is connected to

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
⚠️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'

@Pan-Qi

Pan-Qi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

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

@Pan-Qi Pan-Qi 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 try to sync with main branch, then I will re-run the test to see if the test pass.

nachoalonsoportillo and others added 2 commits July 10, 2026 12:55
…arameter-group-commands

# Conflicts:
#	src/horizondb/HISTORY.rst
#	src/horizondb/azext_horizondb/_client_factory.py
#	src/horizondb/azext_horizondb/_help.py
#	src/horizondb/azext_horizondb/_params.py
#	src/horizondb/azext_horizondb/cluster_commands.py
#	src/horizondb/azext_horizondb/utils/validators.py
@alxhghs
alxhghs requested a review from Pan-Qi July 10, 2026 15:24
@alxhghs

alxhghs commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 10046 in repo Azure/azure-cli-extensions

@alxhghs

alxhghs commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Hi @Pan-Qi, I merged main if you don't mind running the tests again

nachoalonsoportillo and others added 2 commits July 10, 2026 17:36
…horizondb-parameter-group-list-connections-command
…ter-group-list-connections-command

[HorizonDB] Add list-connections command to the parameter-group group
@yonzhan

yonzhan commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

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

Should also update VERSION in setup.py.

Comment thread src/horizondb/HISTORY.rst

1.0.0b5
+++++++
* Add `az horizondb parameter-group` commands to create, delete, list, and show HorizonDB parameter groups.

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 saw that on the PR which adds support for restore commands you bumped version to 1.0.0b6. Will this one go after with version 1.0.0b7?

@Pan-Qi

Pan-Qi commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

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

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