Skip to content

Commit

Permalink
Merge branch 'Azure:main' into feature-informatica
Browse files Browse the repository at this point in the history
  • Loading branch information
almasak committed Jul 9, 2024
2 parents 03d49ab + 0d38d75 commit a203b0b
Show file tree
Hide file tree
Showing 523 changed files with 65,314 additions and 33,016 deletions.
24 changes: 24 additions & 0 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,16 @@ databox job mark-devices-shipped:
deliver_package_details:
rule_exclusions:
- option_length_too_long
databricks access-connector create:
parameters:
user_assigned_identities:
rule_exclusions:
- option_length_too_long
databricks access-connector update:
parameters:
user_assigned_identities:
rule_exclusions:
- option_length_too_long
databricks workspace create:
parameters:
managed_resource_group:
Expand All @@ -446,6 +456,20 @@ databricks workspace create:
require_infrastructure_encryption:
rule_exclusions:
- option_length_too_long
default_storage_firewall:
rule_exclusions:
- option_length_too_long
enhanced_security_compliance:
rule_exclusions:
- option_length_too_long
databricks workspace update:
parameters:
default_storage_firewall:
rule_exclusions:
- option_length_too_long
enhanced_security_compliance:
rule_exclusions:
- option_length_too_long
databricks workspace vnet-peering create:
parameters:
allow_forwarded_traffic:
Expand Down
5 changes: 5 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ To release a new version, please select a new version number (usually plus 1 to

Pending
+++++++
* Add validation to `az aks create` and `az aks update` while modifying the `--ephemeral-disk-volume-type` and `--ephemeral-disk-nvme-perf-tier` values.

5.0.0b4
++++++++
* Add additional unit test cases for mutable fips flags in agentpool update.

5.0.0b3
++++++++
Expand Down
4 changes: 2 additions & 2 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -2909,8 +2909,8 @@

helps['aks draft up'] = """
type: command
short-summary: Set up GitHub OIDC and generate a GitHub workflow for automatic build and deploy to AKS
long-summary: This command combines `az aks draft setup-gh` and `az aks draft generate-workflow`.
short-summary: Run `az aks draft setup-gh` then `az aks draft generate-workflow`.
long-summary: This command combines `az aks draft setup-gh` and `az aks draft generate-workflow` to set up GitHub OIDC and generate a GitHub workflow for automatic build and deploy to AKS.
Before running this command, create a resource group, a container registry and a Kubernetes cluster on Azure and
link the three resources using `az aks update -n <cluster-name> -g <resource-group-name> --attach-acr <acr-name>`.
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,20 +303,37 @@ def validate_enable_azure_container_storage_params( # pylint: disable=too-many-
f'already enabled for storage pool option {enabled_options}.'
)
else:
if ephemeral_disk_volume_type is not None and ephemeral_disk_nvme_perf_tier is None and \
if required_type_installed_for_disk_vol_type and \
ephemeral_disk_volume_type is not None and \
ephemeral_disk_nvme_perf_tier is None and \
existing_ephemeral_disk_volume_type.lower() == ephemeral_disk_volume_type.lower():
raise InvalidArgumentValueError(
'Azure Container Storage is already configured with --ephemeral-disk-volume-type '
f'value set to {existing_ephemeral_disk_volume_type}.'
)

if ephemeral_disk_nvme_perf_tier is not None and ephemeral_disk_volume_type is None and \
if required_type_installed_for_nvme_perf_tier and \
ephemeral_disk_nvme_perf_tier is not None and \
ephemeral_disk_volume_type is None and \
existing_ephemeral_disk_nvme_perf_tier.lower() == ephemeral_disk_nvme_perf_tier.lower():
raise InvalidArgumentValueError(
'Azure Container Storage is already configured with --ephemeral-disk-nvme-perf-tier '
f'value set to {existing_ephemeral_disk_nvme_perf_tier}.'
)

# pylint: disable=too-many-boolean-expressions
if required_type_installed_for_disk_vol_type and \
ephemeral_disk_volume_type is not None and \
existing_ephemeral_disk_volume_type.lower() == ephemeral_disk_volume_type.lower() and \
required_type_installed_for_nvme_perf_tier and \
ephemeral_disk_nvme_perf_tier is not None and \
existing_ephemeral_disk_nvme_perf_tier.lower() == ephemeral_disk_nvme_perf_tier.lower():
raise InvalidArgumentValueError(
'Azure Container Storage is already configured with --ephemeral-disk-volume-type '
f'value set to {existing_ephemeral_disk_volume_type} and --ephemeral-disk-nvme-perf-tier '
f'value set to {existing_ephemeral_disk_nvme_perf_tier}.'
)

if storage_pool_option == CONST_ACSTOR_ALL:
raise InvalidArgumentValueError(
f'Cannot set --storage-pool-option value as {CONST_ACSTOR_ALL} '
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,276 changes: 454 additions & 822 deletions ...iew/tests/latest/recordings/test_aks_create_with_pod_ip_allocation_mode_static_block.yaml
100644 → 100755

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4684,6 +4684,16 @@ def test_aks_create_update_fips_flow(self, resource_group, resource_group_locati
],
)

# verify no flag no change
self.cmd(
"aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={node_pool_name} "
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/MutableFipsPreview',
checks=[
self.check("provisioningState", "Succeeded"),
self.check("enableFips", True),
],
)

# verify same update no change
self.cmd(
"aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={node_pool_name} "
Expand Down Expand Up @@ -4720,6 +4730,16 @@ def test_aks_create_update_fips_flow(self, resource_group, resource_group_locati
],
)

# verify no flag no change
self.cmd(
"aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={node_pool_name_second} "
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/MutableFipsPreview',
checks=[
self.check("provisioningState", "Succeeded"),
self.check("enableFips", False),
],
)

# verify same update no change
self.cmd(
"aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={node_pool_name_second} "
Expand Down
41 changes: 41 additions & 0 deletions src/aks-preview/azext_aks_preview/tests/latest/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,47 @@ def test_enable_with_ephemeral_disk_nvme_perf_tier_and_ephemeral_temp_disk_pool(
)
self.assertEqual(str(cm.exception), err)

def test_enable_with_same_ephemeral_disk_nvme_perf_tier_already_set(self):
perf_tier = acstor_consts.CONST_EPHEMERAL_NVME_PERF_TIER_PREMIUM
storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK
err = (
"Azure Container Storage is already configured with --ephemeral-disk-nvme-perf-tier "
f"value set to {perf_tier}."
)
with self.assertRaises(InvalidArgumentValueError) as cm:
acstor_validator.validate_enable_azure_container_storage_params(
storage_pool_type, None, None, None, None, None, None, True, False, False, False, True, None, perf_tier, acstor_consts.CONST_DISK_TYPE_PV_WITH_ANNOTATION, acstor_consts.CONST_EPHEMERAL_NVME_PERF_TIER_PREMIUM
)
self.assertEqual(str(cm.exception), err)

def test_enable_with_same_ephemeral_disk_volume_type_already_set(self):
disk_vol_type = acstor_consts.CONST_DISK_TYPE_PV_WITH_ANNOTATION
storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK
err = (
"Azure Container Storage is already configured with --ephemeral-disk-volume-type "
f"value set to {disk_vol_type}."
)
with self.assertRaises(InvalidArgumentValueError) as cm:
acstor_validator.validate_enable_azure_container_storage_params(
storage_pool_type, None, None, None, None, None, None, True, False, False, False, True, disk_vol_type, None, acstor_consts.CONST_DISK_TYPE_PV_WITH_ANNOTATION, acstor_consts.CONST_EPHEMERAL_NVME_PERF_TIER_PREMIUM
)
self.assertEqual(str(cm.exception), err)

def test_enable_with_same_ephemeral_disk_nvme_perf_tier_and_ephemeral_temp_disk_pool_already_set(self):
perf_tier = acstor_consts.CONST_EPHEMERAL_NVME_PERF_TIER_STANDARD
disk_vol_type = acstor_consts.CONST_DISK_TYPE_PV_WITH_ANNOTATION
storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK
err = (
"Azure Container Storage is already configured with --ephemeral-disk-volume-type "
f"value set to {disk_vol_type} and --ephemeral-disk-nvme-perf-tier "
f"value set to {perf_tier}."
)
with self.assertRaises(InvalidArgumentValueError) as cm:
acstor_validator.validate_enable_azure_container_storage_params(
storage_pool_type, None, None, None, None, None, None, True, False, False, False, True, disk_vol_type, perf_tier, acstor_consts.CONST_DISK_TYPE_PV_WITH_ANNOTATION, acstor_consts.CONST_EPHEMERAL_NVME_PERF_TIER_STANDARD
)
self.assertEqual(str(cm.exception), err)

def test_enable_with_option_all_and_ephemeral_disk_pool(self):
storage_pool_name = "valid-name"
storage_pool_option = acstor_consts.CONST_ACSTOR_ALL
Expand Down
2 changes: 1 addition & 1 deletion src/aks-preview/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from setuptools import setup, find_packages

VERSION = "5.0.0b3"
VERSION = "5.0.0b4"

CLASSIFIERS = [
"Development Status :: 4 - Beta",
Expand Down
38 changes: 32 additions & 6 deletions src/apic-extension/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,34 @@
Release History
===============

1.0.0
++++++++++++++++++
Potential Impact: The changes in this release, including the renaming of commands and parameters, may require changes to existing scripts and integrations. Please review the changes carefully and update your code accordingly.

**Updates:**

* Redesigned ``az apic service import-from-apim`` command for an easier specification of APIM instances.
* [BREAKING CHANGE] Renamed ``az apic service *`` commands to ``az apic *`` commands.
* [BREAKING CHANGE] Renamed ``--name/--service/--service-name/-s`` parameters in ``az apic *`` commands to ``--name/-n``.
* [BREAKING CHANGE] Renamed ``--service/--service-name/-s`` parameters in subcommands to ``--service-name/-n``.
* [BREAKING CHANGE] Renamed ``--metadata-schema/--metadata-schema-name/--name`` parameters in ``az apic metadata *`` commands to ``--metadata-name``.
* [BREAKING CHANGE] Renamed ``--environment-name`` parameter in ``az apic api register`` command to ``--environment-id``.

**Fixes:**

* Ensured API title created by ``register`` command matches the provided specification.
* Addressed the non-throwing of errors when importing specifications with files larger than 3MB.
* Resolved errors occurring when registering APIs with long descriptions in the specification.
* [BREAKING CHANGE] Made ``--definition-id``, ``--environment-id``, ``--server``, ``--title`` parameters mandatory in ``az apic api deployment create`` command.
* [BREAKING CHANGE] Made ``--format``, ``--specification``, ``--value`` parameters mandatory in ``az apic api definition import-specification`` command.

**Removals:**

* Removed ``--state`` parameter from ``az apic api deployment`` commands.
* [BREAKING CHANGE] Eliminated ``--file-name`` parameter for ``az apic api definition import-specification``, ``az apic metadata create``, and ``az apic metadata update`` commands. Introduced usage of the ``@filename`` syntax for reading parameter values from a file directly in Azure CLI.

1.0.0b5
+++++
++++++++++++++++++
* Add: Support yaml file for `az apic api register` command.
* Update: Command names, parameter names, and command descriptions for better understanding. Please leverage `-h` option or refer Azure CLI reference doc to see full list of commands and parameters.
* Update: Introduction to parameter constraints to ensure that valid values are provided.
Expand All @@ -15,17 +41,17 @@ Release History
* Remove: `head` commands in each command group are removed.

1.0.0b4
+++++
++++++++++++++++++
* Add: Support for Default Portal configuration and default hostname provisoning deprovisioning commands

1.0.0b3
+++++
++++++++++++++++++
* Add: Support for Import from apim command along with add examples for create service

1.0.0b2
++++++
++++++++++++++++++
* Remove: All workspace cli commands as it should not be exposed to customers just yet.

1.0.0b1
++++++
* Initial release.
++++++++++++++++++
* Initial release.
Loading

0 comments on commit a203b0b

Please sign in to comment.