Skip to content

Commit

Permalink
Merge branch 'Azure:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
am-lim committed Nov 5, 2023
2 parents 2d2cd53 + e788c66 commit 518c40e
Show file tree
Hide file tree
Showing 1,439 changed files with 717,974 additions and 454,983 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ignore =
C901 # code flow is too complex, too many violations, to be removed in the future
W503 # line break before binary operator effect on readability is subjective
W504 # line break after binary operator effect on readability is subjective

exclude =
*/vendored_sdks
docs
Expand Down
8 changes: 6 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@

/src/containerapp/ @ruslany @sanchitmehta @ebencarek @JennyLawrance @howang-ms @vinisoto @chinadragon0515 @vturecek @torosent @pagariyaalok @Juliehzl @jijohn14

/src/scvmm/ @nascarsayan
/src/scvmm/ @nascarsayan @hsurana06

/src/spring/ @yuwzho

Expand All @@ -252,7 +252,7 @@

/src/fluid-relay/ @kairu-ms @necusjz @ZengTaoxu

/src/fleet/ @pdaru
/src/fleet/ @pdaru @ealianis

/src/staticwebapp/ @strawnsc

Expand Down Expand Up @@ -292,6 +292,8 @@

/src/alb/ @jaishals

/src/aosm/ @sunnycarter

/src/managedccfs/ @msftsettiy

/src/acrquery/ @CarolineNB
Expand All @@ -309,3 +311,5 @@
/src/graphservices/ @amatukmolina

/src/site-recovery/ @calvinhzy

/src/network-analytics/ @pikanghosh1
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This checklist is used to make sure that common guidelines for a pull request ar
### 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?
- [ ] Have you run `python scripts/ci/test_index.py -q` locally? (`pip install wheel==0.30.0` required)

For new extensions:

Expand Down
46 changes: 46 additions & 0 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,11 @@ networkfabric acl create:
dynamic_match_configurations:
rule_exclusions:
- option_length_too_long
networkfabric acl update:
parameters:
dynamic_match_configurations:
rule_exclusions:
- option_length_too_long
networkfabric controller create:
parameters:
workload_er_connections:
Expand Down Expand Up @@ -2290,6 +2295,11 @@ networkfabric ipextendedcommunity create:
ip_extended_community_rules:
rule_exclusions:
- option_length_too_long
networkfabric ipextendedcommunity update:
parameters:
ip_extended_community_rules:
rule_exclusions:
- option_length_too_long
networkfabric tap update:
rule_exclusions:
- missing_command_test_coverage
Expand Down Expand Up @@ -3035,3 +3045,39 @@ scenario guide:
search_keyword:
rule_exclusions:
- no_positional_parameters
eventgrid namespace client create:
parameters:
client_certificate_authentication:
rule_exclusions:
- option_length_too_long
eventgrid namespace client update:
parameters:
client_certificate_authentication:
rule_exclusions:
- option_length_too_long
eventgrid namespace create:
parameters:
minimum_tls_version_allowed:
rule_exclusions:
- option_length_too_long
private_endpoint_connections:
rule_exclusions:
- option_length_too_long
topic_spaces_configuration:
rule_exclusions:
- option_length_too_long
eventgrid namespace update:
parameters:
topic_spaces_configuration:
rule_exclusions:
- option_length_too_long
eventgrid namespace topic create:
parameters:
event_retention_in_days:
rule_exclusions:
- option_length_too_long
eventgrid namespace topic update:
parameters:
event_retention_in_days:
rule_exclusions:
- option_length_too_long
1 change: 1 addition & 0 deletions projects
Submodule projects added at 650f20
2 changes: 2 additions & 0 deletions scripts/ci/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def test_extension_filenames(self):
"Extension name mismatch in extensions['{}']. "
"Found an extension in the list with name "
"{}".format(ext_name, item['metadata']['name']))
# Due to https://github.com/pypa/wheel/issues/235 we prevent whls built with 0.31.0 or greater.
# 0.29.0, 0.30.0 are the two previous versions before that release.
parsed_filename = WHEEL_INFO_RE(item['filename'])
p = parsed_filename.groupdict()
self.assertTrue(p.get('name'), "Can't get name for {}".format(item['filename']))
Expand Down
3 changes: 2 additions & 1 deletion scripts/ci/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def test_extension():
logger.info(f'installing extension: {ext_name}')
cmd = ['azdev', 'extension', 'add', ext_name]
run_command(cmd, check_return_code=True)
test_args = [sys.executable, '-m', 'azdev', 'test', '--no-exitfirst', '--discover', '--verbose', ext_name]
# python -m azdev test --no-exitfirst --discover --verbose azext_containerapp
test_args = [sys.executable, '-m', 'azdev', 'test', '--no-exitfirst', '--discover', '--verbose', tname]
logger.warning(f'test_args: {test_args}')
run_command(test_args, check_return_code=True)
logger.info(f'uninstalling extension: {ext_name}')
Expand Down
41 changes: 39 additions & 2 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,43 @@ To release a new version, please select a new version number (usually plus 1 to

Pending
+++++++
* Vendor new SDK and bump API version to 2023-09-02-preview.

0.5.168
+++++++
* Add `--enable-image-integrity` to the `az aks update` command.

0.5.167
+++++++
* Fix the default storagepool name value created for Azure Container Storage.
* Ensure the correct nodepool name is picked and labelled by Azure Container Storage while installing with `az aks create`.

0.5.166
+++++++
* Add `--network-policy` to the `az aks update` command.

0.5.165
+++++++
* Rearrange the storagepool SKU related helm values set for Azure Container Storage.

0.5.164
+++++++
* Add option `--enable-azure-container-storage` and supporting options `--storage-pool-name`, `--storage-pool-type`, `--storage-pool-sku`, `--storage-pool-size` for `az aks create` and `az aks update`. `az aks update` also supports `--azure-container-storage-nodepools` option.
* Add option `--disable-azure-container-storage` to `az aks create` and `az aks update`.

0.5.163
+++++++
* Add `get-upgrades` and `get-revisions` to the `az aks mesh` command.
* Add `az aks mesh upgrade` commands to manage upgrades for Azure Service Mesh.

0.5.162
+++++++
* Replace Image Cleaner related functions with stable version.
* Vendor new SDK and bump API version to 2023-08-02-preview.
* Update the operation/method used in following commands as the put/delete operations have been changed to long running operations
* `az aks trustedaccess rolebinding create`
* `az aks trustedaccess rolebinding update`
* `az aks trustedaccess rolebinding delete`

0.5.161
+++++++
Expand Down Expand Up @@ -56,7 +93,7 @@ Pending

0.5.152
++++++
* move loadbalancer/natgateway util functions to azure-cli and update reference in aks-preview project.
* move loadbalancer/natgateway util functions to azure-cli and update reference in aks-preview project.
* Update the minimum required cli core version to `2.49.0`.
* Add plugin CA support for `az aks mesh enable` commands for Azure Service Mesh.

Expand Down Expand Up @@ -1353,4 +1390,4 @@ Pending
+++++

* new feature `enable-cluster-autoscaler`
* default agentType is VMSS
* default agentType is VMSS
4 changes: 3 additions & 1 deletion src/aks-preview/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,7 @@ Released version and adopted API version
- 2023-05-02-preview
* - 0.5.150 ~ 0.5.153
- 2023-06-02-preview
* - 0.5.154 ~ latest
* - 0.5.154 ~ 0.5.161
- 2023-07-02-preview
* - 0.5.162 ~ latest
- 2023-08-02-preview
2 changes: 1 addition & 1 deletion src/aks-preview/azext_aks_preview/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def register_aks_preview_resource_type():
register_resource_type(
"latest",
CUSTOM_MGMT_AKS_PREVIEW,
SDKProfile("2023-07-02-preview", {"container_services": "2017-07-01"}),
SDKProfile("2023-09-02-preview", {"container_services": "2017-07-01"}),
)


Expand Down
4 changes: 4 additions & 0 deletions src/aks-preview/azext_aks_preview/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,7 @@ def get_resource_by_name(cli_ctx, resource_name, resource_type):
def get_msi_client(cli_ctx, subscription_id=None):
return get_mgmt_service_client(cli_ctx, ManagedServiceIdentityClient,
subscription_id=subscription_id)


def get_providers_client_factory(cli_ctx, subscription_id=None):
return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, subscription_id=subscription_id).providers
9 changes: 9 additions & 0 deletions src/aks-preview/azext_aks_preview/_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
CONST_NETWORK_DATAPLANE_AZURE = "azure"
CONST_NETWORK_DATAPLANE_CILIUM = "cilium"

# network policy
CONST_NETWORK_POLICY_AZURE = "azure"
CONST_NETWORK_POLICY_CALICO = "calico"
CONST_NETWORK_POLICY_CILIUM = "cilium"
CONST_NETWORK_POLICY_NONE = "none"

# disk driver versions
CONST_DISK_DRIVER_V1 = "v1"
CONST_DISK_DRIVER_V2 = "v2"
Expand Down Expand Up @@ -253,3 +259,6 @@
CONST_AZURE_SERVICE_MESH_MODE_ISTIO = "Istio"
CONST_AZURE_SERVICE_MESH_INGRESS_MODE_EXTERNAL = "External"
CONST_AZURE_SERVICE_MESH_INGRESS_MODE_INTERNAL = "Internal"
CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START = "Start"
CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE = "Complete"
CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK = "Rollback"
56 changes: 56 additions & 0 deletions src/aks-preview/azext_aks_preview/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,59 @@ def _aks_snapshot_table_format(result):
}""")
# use ordered dicts so headers are predictable
return parsed.search(result, Options(dict_cls=OrderedDict))


def aks_mesh_revisions_table_format(result):
"""Format a list of mesh revisions as summary results for display with "-o table". """
revision_table = flatten_mesh_revision_table(result[0]['properties']['meshRevisions'])
parsed = compile_jmes("""[].{
revision: revision,
upgrades: upgrades || [`None available`] | sort_versions(@) | join(`, `, @),
compatibleWith: compatibleWith_name,
compatibleVersions: compatibleVersions || [`None available`] | sort_versions(@) | join(`, `, @)
}""")
# Use ordered dicts so headers are predictable
results = parsed.search(revision_table, Options(
dict_cls=OrderedDict, custom_functions=_custom_functions({})))

return results


# Helper function used by aks_mesh_revisions_table_format
def flatten_mesh_revision_table(revision_info):
"""Flattens revision information"""
flattened = []
for revision_data in revision_info:
flattened.extend(_format_mesh_revision_entry(revision_data))
return flattened


def aks_mesh_upgrades_table_format(result):
"""Format a list of mesh upgrades as summary results for display with "-o table". """
upgrades_table = _format_mesh_revision_entry(result[0]['properties'])
parsed = compile_jmes("""[].{
revision: revision,
upgrades: upgrades || [`None available`] | sort_versions(@) | join(`, `, @),
compatibleWith: compatibleWith_name,
compatibleVersions: compatibleVersions || [`None available`] | sort_versions(@) | join(`, `, @)
}""")
# Use ordered dicts so headers are predictable
results = parsed.search(upgrades_table, Options(
dict_cls=OrderedDict, custom_functions=_custom_functions({})))
return results


def _format_mesh_revision_entry(revision):
flattened = []
revision_entry = revision['revision']
upgrades = revision['upgrades']
compatible_with_list = revision['compatibleWith']
for compatible_with in compatible_with_list:
item = {
'revision': revision_entry,
'upgrades': upgrades,
'compatibleWith_name': compatible_with['name'],
'compatibleVersions': compatible_with['versions']
}
flattened.append(item)
return flattened
Loading

0 comments on commit 518c40e

Please sign in to comment.