azure-cli-extensions icon indicating copy to clipboard operation
azure-cli-extensions copied to clipboard

[HORIZONDB] Add private endpoint CLI commands

Open petarperin-mdcs opened this issue 5 months ago • 6 comments

Related command

az horizondb private-endpoint-connection az horizondb private-link-resource

Summary

  • Add HorizonDB-specific private endpoint connection commands: list, show, approve, reject, and delete.
  • Add HorizonDB-specific private link resource commands: list and show.
  • Update the vendored HorizonDB SDK private endpoint connection update/delete route shape to match the cluster-scoped backend contract.
  • Add help, README, history/version updates, and targeted command/validator tests.
  • Add a replayable scenario test and recording for the HorizonDB private endpoint command surface.

Validation

  • python -m unittest discover -s src\horizondb\azext_horizondb\tests\latest -p test_horizondb_private_endpoint_commands.py
  • azdev test test_horizondb_private_endpoint_command_scenario --discover
  • python -m compileall -q src\horizondb\azext_horizondb
  • azdev style horizondb
  • azdev linter horizondb --min-severity medium
  • git diff --check
  • python scripts\ci\test_index.py -q

General Guidelines

  • [x] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • [x] Have you run python scripts/ci/test_index.py -q locally? (azdev required; see .azure-pipelines/templates/azdev_setup.yml for the install command until azdev==0.2.11b1 is on PyPI)
  • [x] My extension version conforms to the Extension version schema

For new extensions:

petarperin-mdcs avatar Jun 25 '26 13:06 petarperin-mdcs

⚠️Azure CLI Extensions Breaking Change Test
⚠️horizondb
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd horizondb private-endpoint-connection sub group horizondb private-endpoint-connection added
⚠️ 1011 - SubgroupAdd horizondb private-link-resource sub group horizondb private-link-resource added

HORIZONDB

yonzhan avatar Jun 25 '26 22:06 yonzhan

@Pan-Qi Please review and merge this PR. Thank you

nasc17 avatar Jun 30 '26 01:06 nasc17

/azp run

Pan-Qi avatar Jun 30 '26 03:06 Pan-Qi

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Jun 30 '26 03:06 azure-pipelines[bot]

Please check the failed CI tests

Seems like cosmosdb test issues unrelated to this change. @Pan-Qi do you think rebase/merge of master might help with this?

Traceback (most recent call last):
  File "/mnt/vss/_work/1/s/scripts/ci/test_source.py", line 118, in <module>
    test_extension()
  File "/mnt/vss/_work/1/s/scripts/ci/test_source.py", line 84, in test_extension
    run_command(test_args, check_return_code=True)
  File "/mnt/vss/_work/1/s/scripts/ci/test_source.py", line 62, in run_command
    out = run(cmd, check=True, cwd=cwd)
  File "/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/mnt/vss/_work/1/s/env/bin/python', '-m', 'azdev', 'test', '--no-exitfirst', '--discover', '--verbose', 'azext_cosmosdb_preview']' returned non-zero exit status 1.

petarperin-mdcs avatar Jun 30 '26 09:06 petarperin-mdcs

/azp run

Pan-Qi avatar Jul 07 '26 02:07 Pan-Qi

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Jul 07 '26 02:07 azure-pipelines[bot]

Please try to sync with main branch, then I will re-run the test to see if the test pass.

Pan-Qi avatar Jul 10 '26 07:07 Pan-Qi

@Pan-Qi please trigger checks for merging

nasc17 avatar Jul 14 '26 18:07 nasc17

/azp run

yonzhan avatar Jul 14 '26 22:07 yonzhan

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

azure-pipelines[bot] avatar Jul 14 '26 22:07 azure-pipelines[bot]

@petarperin-mdcs kindly ping for resolving the failed tests

Pan-Qi avatar Jul 20 '26 05:07 Pan-Qi

Hi @Pan-Qi failure is coming from verify extension step, can you please advise how to address: https://dev.azure.com/azclitools/public/_build/results?buildId=329744&view=logs&j=b121d099-c3c0-52ad-95f1-31c1567c9ad4&t=ca40adef-e63f-5fd5-f30e-e39a0bf0e914&l=317

FAIL: test_checksums (main.TestIndex.test_checksums)

Traceback (most recent call last): File "/mnt/vss/_work/1/s/./scripts/ci/test_index.py", line 240, in test_checksums self.assertEqual(computed_hash, item['sha256Digest'], ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "Computed {} but found {} in index for {}".format(computed_hash, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ item['sha256Digest'], ^^^^^^^^^^^^^^^^^^^^^ item['filename'])) ^^^^^^^^^^^^^^^^^^ AssertionError: 'ab86a2d1412ba8a23dec0f0e678fc992e4f540b38a6b7eab6193c8b62bb5afdb' != '1ff948c19b1579a0ee650595fb261cf7ac281a3dd60e461a501db942228e6f58'

  • ab86a2d1412ba8a23dec0f0e678fc992e4f540b38a6b7eab6193c8b62bb5afdb
  • 1ff948c19b1579a0ee650595fb261cf7ac281a3dd60e461a501db942228e6f58 : Computed ab86a2d1412ba8a23dec0f0e678fc992e4f540b38a6b7eab6193c8b62bb5afdb but found 1ff948c19b1579a0ee650595fb261cf7ac281a3dd60e461a501db942228e6f58 in index for azure_firewall-2.2.1-py2.py3-none-any.whl

nasc17 avatar Jul 20 '26 13:07 nasc17

@Pan-Qi I investigated the failed run. The only failing job was Verify Extensions Index: test_checksums found that the SHA-256 recorded in src/index.json for azure_firewall-2.2.1-py2.py3-none-any.whl was stale (1ff948...; the downloaded wheel computed as ab86a2...). This was unrelated to the HorizonDB changes; all Python 3.10-3.14 integration jobs, linter/style, scans, and the breaking-change check passed.

The index checksum was corrected upstream by #10110. I have rebased this PR onto the latest main, which includes that fix, and force-pushed commit 627ab8190. I also reran scripts/ci/test_index.py -q and the targeted HorizonDB unit, scenario playback, style, and linter checks successfully. Please rerun the Azure Pipelines checks.

petarperin-mdcs avatar Jul 20 '26 23:07 petarperin-mdcs

/azp run

msarfraz avatar Jul 21 '26 00:07 msarfraz

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

azure-pipelines[bot] avatar Jul 21 '26 00:07 azure-pipelines[bot]

[Release] Update index.json for extension [ horizondb-1.0.0b6 ] : https://dev.azure.com/msazure/One/_build/results?buildId=173403977&view=results

azclibot avatar Jul 23 '26 01:07 azclibot