Skip to content

Add amlfs expansion module and CRUD scenario tests#9751

Open
Aman-Jain-14 wants to merge 5 commits intoAzure:mainfrom
Aman-Jain-14:dev/amajai/feature-storage-cache-expansion-jobs
Open

Add amlfs expansion module and CRUD scenario tests#9751
Aman-Jain-14 wants to merge 5 commits intoAzure:mainfrom
Aman-Jain-14:dev/amajai/feature-storage-cache-expansion-jobs

Conversation

@Aman-Jain-14
Copy link
Copy Markdown
Member

Summary

Add expansion job commands and tests for Azure Managed Lustre Filesystem (AMLFS) storage capacity expansion.

Changes

  • Expansion module (API version 2026-01-01): create, delete, list, show, update, wait commands for amlfs expansion
  • CRUD scenario test (test_expansion_job.py): Full lifecycle test covering create, show, list, update (tags), delete with proper cleanup
  • NAT gateway setup in test for private subnet policy compliance
  • Test recording (test_expansion_job_crud.yaml)
  • Updated setup.py and HISTORY.rst

Add expansion job commands (create, delete, list, show, update, wait) for
Azure Managed Lustre Filesystem storage capacity expansion using API version
2026-01-01. Include full CRUD scenario test with NAT gateway setup for
private subnet compliance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 1, 2026 16:40
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Apr 1, 2026

⚠️Azure CLI Extensions Breaking Change Test
⚠️amlfs
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd amlfs expansion sub group amlfs expansion added

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for Azure Managed Lustre Filesystem (AMLFS) storage capacity expansion jobs to the CLI extension and introduces a scenario test to validate CRUD operations end-to-end.

Changes:

  • Adds new az amlfs expansion command module (create/show/list/update/delete/wait) targeting API version 2026-01-01
  • Adds CRUD scenario coverage for expansion jobs including required networking (NAT gateway) setup
  • Bumps extension version and updates release history

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/amlfs/setup.py Bumps extension version to 1.3.0 to ship expansion commands
src/amlfs/azext_amlfs/tests/latest/test_expansion_job.py Adds CRUD scenario test for expansion jobs, including network prerequisites and cleanup
src/amlfs/azext_amlfs/aaz/latest/amlfs/expansion/_create.py Implements az amlfs expansion create (PUT) for expansion jobs
src/amlfs/azext_amlfs/aaz/latest/amlfs/expansion/_delete.py Implements az amlfs expansion delete (DELETE) for expansion jobs
src/amlfs/azext_amlfs/aaz/latest/amlfs/expansion/_list.py Implements az amlfs expansion list (GET) for expansion jobs
src/amlfs/azext_amlfs/aaz/latest/amlfs/expansion/_show.py Implements az amlfs expansion show (GET) for a single expansion job
src/amlfs/azext_amlfs/aaz/latest/amlfs/expansion/_update.py Implements az amlfs expansion update (PATCH) for updating tags
src/amlfs/azext_amlfs/aaz/latest/amlfs/expansion/_wait.py Implements az amlfs expansion wait to poll for conditions
src/amlfs/azext_amlfs/aaz/latest/amlfs/expansion/init.py Exposes expansion subcommands in the module
src/amlfs/azext_amlfs/aaz/latest/amlfs/expansion/__cmd_group.py Registers the amlfs expansion command group
src/amlfs/HISTORY.rst Adds release notes entry for expansion job commands

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 1, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

- Add 'az' prefix to helper method self.cmd() calls
- Rewrite wait helpers to assert on failure/timeout with descriptive messages
- Use order-independent JMESPath filter for list assertions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

@yonzhan yonzhan requested a review from necusjz April 2, 2026 00:21
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Apr 2, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@Aman-Jain-14
Copy link
Copy Markdown
Member Author

@necusjz The failures are coming from test recording of previous features (import, autoimport, autoexport) that are not touched in this PR. This PR is regarding ExpansionJob. I have added the tests, and recording for the Expansion feature but I have not touched other files so I am not sure why the errors are coming.

@Aman-Jain-14
Copy link
Copy Markdown
Member Author

@necusjz Also I don't know why its looking for a non-existent API version:
image

@necusjz
Copy link
Copy Markdown
Member

necusjz commented Apr 2, 2026

plz re-record all the failed test cases:
image

Add the same private subnet with NAT gateway configuration used in
expansion job tests to the import, auto-export, and auto-import test
files for policy compliance with default outbound access restrictions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Aman-Jain-14
Copy link
Copy Markdown
Member Author

@necusjz We need to revisit this workflow, if I have not touched that part of the test or code or the SDK, then why is there a need re-record the tests? The SDK work for this PR should only focus on the feature that is being released in this API version and nothing before that. This puts a lot of pressure on Devs to perform extra work which is not contextual.

Aman Jain and others added 2 commits April 2, 2026 13:26
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update VCR recordings for test_amlfs, test_import_job_crud,
test_auto_export_job_crud, and test_auto_import_job_crud to reflect
the NAT gateway subnet configuration changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Aman-Jain-14
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 9751 in repo Azure/azure-cli-extensions

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 2, 2026

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

4 participants