{Site} Add quickstart command and ARM template for Site + Config depl…#9594
{Site} Add quickstart command and ARM template for Site + Config depl…#9594akanksha020901 wants to merge 12 commits intoAzure:mainfrom
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| site quickstart | cmd site quickstart added |
|
Hi @akanksha020901, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank 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 |
Release SuggestionsModule: site
Notes
|
There was a problem hiding this comment.
Pull request overview
Adds a site quickstart command to the site Azure CLI extension that deploys an internal ARM template to create a Site + Configuration + ConfigurationReference, and attempts to package the template with the extension.
Changes:
- Add an internal ARM template (
templates/infra/main.json) for Site + Config + ConfigRef deployment. - Add
az site quickstartAAZ command that invokesaz deployment group createwith the internal template. - Add help entry for the new command and attempt to include templates as package data.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/site/setup.cfg |
Adds package-data config intended to include JSON templates in the wheel. |
src/site/azext_site/templates/infra/main.json |
New ARM template used by quickstart deployment. |
src/site/azext_site/aaz/latest/site/_quickstart.py |
Implements site quickstart command invoking group deployment with template parameters. |
src/site/azext_site/aaz/latest/site/__init__.py |
Exposes the new quickstart command module. |
src/site/azext_site/_help.py |
Adds CLI help and examples for site quickstart. |
|
|
||
| [options.package_data] | ||
| azext_site = | ||
| templates\**\*.json No newline at end of file |
There was a problem hiding this comment.
setup.cfg adds [options.package_data] for the ARM template, but setup.py already passes an explicit package_data={...} to setup(), which will override/ignore this config in practice. As a result, templates/infra/main.json is still unlikely to be packaged into the wheel. Include the templates in setup.py's package_data (and/or include_package_data=True with an appropriate manifest) so the quickstart can find the file at runtime; also prefer forward slashes in globs for cross-platform builds.
| templates\**\*.json | |
| templates/**/*.json |
| @register_command("site quickstart") | ||
| class Quickstart(AAZCommand): | ||
| """Quickstart: deploy internal ARM template to create Site + Config + ConfigRef.""" | ||
|
|
||
| _args_schema = None |
There was a problem hiding this comment.
A new user-facing command (site quickstart) and an embedded deployment template are introduced, but there is no scenario test covering it. Since this extension already has ScenarioTest coverage (e.g., test_site.py), add a test that runs az site quickstart ... and asserts the deployment succeeded / expected outputs are returned.
|
@akanksha020901 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
propagate the underlying error from az deployment group create Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
removing unused params Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
adding -g property in this Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…om/akanksha020901/azure-cli-extensions into developer/akanksha/site-config-cli
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
…oyment
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)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.jsonautomatically.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.