Conversation
️✔️AzureCLI-FullTest
|
|
Hi @xuexu6666, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks nodepool delete-machines | cmd aks nodepool delete-machines added |
|
AKS |
az aks nodepool delete-machines
| def aks_machine_list_table_format(results): | ||
| return [aks_machine_show_table_format(r) for r in results] | ||
|
|
||
| def aks_machine_show_table_format(result): |
There was a problem hiding this comment.
Can you add some unit tests for this?
There was a problem hiding this comment.
I finally decide to use kubectl to get machine name instead of use machine api. Machine api is not GA yet.
| @AKSCustomResourceGroupPreparer( | ||
| random_name_length=17, name_prefix="clitest", location="westus2" | ||
| ) | ||
| def test_aks_nodepool_delete_machines(self, resource_group, resource_group_location): |
There was a problem hiding this comment.
Queued live test for this, you'll need to commit the recording file (would be generated by running the test case in live mode, find it from pipeline artifact) to pass CI.
There was a problem hiding this comment.
https://dev.azure.com/msazure/CloudNativeCompute/_build/results?buildId=103633419&view=results
This is the passed test I ran. Wondering which recording file do I need? btw, I uploaded the test_aks_nodepool_delete_machines.yaml already.
There was a problem hiding this comment.
Take another look, it seems that you performed some data plane operations in the test case, which cannot be properly replayed. Please mark the case as @live_only() (and left a comment, remove the corresponding recording file) to bypass the check.
FumingZhang
left a comment
There was a problem hiding this comment.
Please fix failed CI checks
/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/acs/_params.py:924:1: E302 expected 2 blank lines, found 1
/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/acs/custom.py:2651:1: E302 expected 2 blank lines, found 1
| g.custom_command('start', 'aks_agentpool_start', supports_no_wait=True) | ||
| g.wait_command('wait') | ||
| g.custom_command('operation-abort', 'aks_agentpool_operation_abort', supports_no_wait=True) | ||
| g.custom_command("delete-machines", "aks_agentpool_delete_machines", supports_no_wait=True) |
There was a problem hiding this comment.
- FAIL - HIGH severity: missing_command_test_coverage
Repo: ./, Src Branch: HEAD, Target Branch: origin/dev - Failed.
Missing command test coverage:aks nodepool "delete-machines"
Please add some scenario tests for the new command
Or add the command with missing_command_test_coverage rule in linter_exclusions.yml
Rules in CI might be a bit rigid, I guess changing "delete-machines" to 'delete-machines' would fix the issue.
| @AKSCustomResourceGroupPreparer( | ||
| random_name_length=17, name_prefix="clitest", location="westus2" | ||
| ) | ||
| def test_aks_nodepool_delete_machines(self, resource_group, resource_group_location): |
There was a problem hiding this comment.
Take another look, it seems that you performed some data plane operations in the test case, which cannot be properly replayed. Please mark the case as @live_only() (and left a comment, remove the corresponding recording file) to bypass the check.
|
It is recommended to modify the PR title to |
az aks nodepool delete-machinesaz aks nodepool delete-machines: Add support to delete specific machines in an agent pool
Related command
az aks nodepool delete-machines
delete machines API was added to 2024-07-01
Description
We want to add the new feature delete-machines in GA cli.
Testing Guide
Use the command
az aks nodepool delete-machinesto send the request to aks. Use the commandaz aks machine listto verify the results.This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.