Skip to content

[vm-repair] Add regression coverage for repair-button FrameLocalsProxy compatibility - #9972

Draft
Aditya Pujara (a0x1ab) with Copilot wants to merge 2 commits into
mainfrom
copilot/issue-32408-fix-repair-button-command
Draft

[vm-repair] Add regression coverage for repair-button FrameLocalsProxy compatibility#9972
Aditya Pujara (a0x1ab) with Copilot wants to merge 2 commits into
mainfrom
copilot/issue-32408-fix-repair-button-command

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az vm repair repair-button

This issue tracks repair-button failures in CLI >= 2.77.0 caused by frame locals behavior changes (FrameLocalsProxy).
This PR adds focused regression coverage to lock in compatibility behavior in vm-repair parameter capture.

  • Regression coverage: FrameLocalsProxy-safe parameter extraction
    • Added src/vm-repair/azext_vm_repair/tests/latest/test_repair_utils.py.
    • Verifies _get_function_param_dict(...):
      • materializes locals into a real dict
      • removes cmd
      • masks repair_password, repair_username, and encrypt_recovery_key
    • Simulates proxy-style locals via MappingProxyType + patched inspect.getargvalues.
proxy_locals = MappingProxyType({
    'cmd': object(),
    'vm_name': 'vm1',
    'repair_password': 'password',
})
with patch('inspect.getargvalues', return_value=ArgInfo([], None, None, proxy_locals)):
    values = _get_function_param_dict(frame=object())

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • 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)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

@azure-client-tools-bot-prd

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

Copy link
Copy Markdown
️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Copilot,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

Copilot AI changed the title [WIP] Fix repair-button command fails with FrameLocalsProxy error [vm-repair] Add regression coverage for repair-button FrameLocalsProxy compatibility Jun 22, 2026
@yonzhan

Copy link
Copy Markdown
Collaborator

vm-repair

@a0x1ab Aditya Pujara (a0x1ab) added azure-client-tools-agent Pull request commented on or reviewed by Azure Client Tools Agent and removed azure-client-tools-agent Pull request commented on or reviewed by Azure Client Tools Agent labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Compute

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants