Skip to content

Commit

Permalink
Revert "Revert "Merge branch 'master' into charliedmcb/addingAutoupgr…
Browse files Browse the repository at this point in the history
…aderToCLI""

This reverts commit 0ef331c.
  • Loading branch information
Charlie McBride authored and Charlie McBride committed Aug 15, 2021
1 parent 0ef331c commit cd47cb0
Show file tree
Hide file tree
Showing 1,487 changed files with 737,072 additions and 838,505 deletions.
7 changes: 6 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
"program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py",
"cwd": "${workspaceRoot}",
"args": [
"--help"
"ts",
"export",
"-s",
"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Gokul-TestRG4/providers/Microsoft.Resources/templateSpecs/testTS/versions/1",
"--output-folder",
"C:\\Users\\daetienn\\Desktop\\ExportBugOutput2"
],
"console": "integratedTerminal",
"debugOptions": [
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ jobs:

- job: TestYumPackage
displayName: Test Yum Package

timeoutInMinutes: 120
dependsOn: BuildYumPackage
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Manual', 'Schedule'))
pool:
Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx/azhelpgen/azhelpgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import argparse
import json
from mock import patch
from unittest.mock import patch
from os.path import expanduser
from docutils import nodes
from docutils.statemachine import ViewList
Expand Down Expand Up @@ -51,7 +51,7 @@ def make_rst(self):
if help_file.deprecate_info:
yield '{}:deprecated: {}'.format(INDENT, help_file.deprecate_info._get_message(help_file.deprecate_info))
if not is_command:
top_group_name = help_file.command.split()[0] if help_file.command else 'az'
top_group_name = help_file.command.split()[0] if help_file.command else 'az'
yield '{}:docsource: {}'.format(INDENT, doc_source_map[top_group_name] if top_group_name in doc_source_map else '')
else:
top_command_name = help_file.command.split()[0] if help_file.command else ''
Expand All @@ -61,7 +61,7 @@ def make_rst(self):

if is_command and help_file.parameters:
group_registry = ArgumentGroupRegistry(
[p.group_name for p in help_file.parameters if p.group_name])
[p.group_name for p in help_file.parameters if p.group_name])

for arg in sorted(help_file.parameters,
key=lambda p: group_registry.get_group_priority(p.group_name)
Expand Down
15 changes: 12 additions & 3 deletions doc/track_2_migration_guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Azure CLI is built on Azure Python SDKs. Recently, Azure Python SDK team announced the next generation product, named Track 2 SDK. The old version of SDK is called Track 1 SDK. It claims that it has some advantages than Track 1 SDK. It is not compatible with Track 1 SDK. A considerable number of work days are required for Azure CLI developers to migrate their modules from Track 1 SDK to Track 2 SDK. Let's see an example of Track 2 SDK. [azure-mgmt-compute 17.0.0b1](https://pypi.org/project/azure-mgmt-compute/17.0.0b1/) introduces important breaking changes and important new features like unified authentication and asynchronous programming.

This document summarizes typical issues and solutions when adopting Track 2 SDK in Azure CLI.
This document summarizes the steps to apply the changes for migration, typical changes when adopting Track 2 SDK in Azure CLI.

Example PRs:
## Example PRs
1. [Compute PR #15750](https://github.com/Azure/azure-cli/pull/15750)
2. [Network PR #16245](https://github.com/Azure/azure-cli/pull/16245)
3. [Network PR #16350](https://github.com/Azure/azure-cli/pull/16350)
Expand All @@ -13,7 +13,16 @@ Example PRs:
6. [AppConfig PR #16376](https://github.com/Azure/azure-cli/pull/16376)
7. [AppService PR #17146](https://github.com/Azure/azure-cli/pull/17146)

Below is a list of typical issues.
## Steps to apply the changes for migration
1. Upgrade the version of your SDK to track 2 SDK in [setup.py](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/setup.py), [requirements.py3.Darwin.txt](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/requirements.py3.Darwin.txt), [requirements.py3.Linux.txt](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/requirements.py3.Linux.txt) and [requirements.py3.windows.txt](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/requirements.py3.windows.txt).
2. Run command `azdev setup` to apply track 2 SDK to your local virtual environment.
3. Run style check with command `azdev style your_module_name` and fix the errors returned from the command.
4. Run linter check with command `azdev linter your_module_name` and fix the errors returned from the command.
5. Run tests with command `azdev test your_module_name --no-exitfirst` and fix the errors returned from the command.
6. Run tests lively with command `azdev test your_module_name --live --no-exitfirst` and fix the errors returned from the command.
7. Create the pull request for migration.

## Typical changes.

1. [Long running operation function name change](#long-running-operation-function-name-change)
2. [Property name change](#property-name-change)
Expand Down
Loading

0 comments on commit cd47cb0

Please sign in to comment.