Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Release History
===============
upcoming
++++++
* Fix invalid API version used in managed environment client: use valid preview API version consistently

1.3.0b4
++++++
Expand Down
1 change: 1 addition & 0 deletions src/containerapp/azext_containerapp/_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

logger = get_logger(__name__)

CURRENT_API_VERSION = "2025-07-01"
PREVIEW_API_VERSION = "2025-10-02-preview"
POLLING_TIMEOUT = 1500 # how many seconds before exiting
POLLING_SECONDS = 2 # how many seconds between requests
Expand Down
8 changes: 4 additions & 4 deletions src/containerapp/azext_containerapp/_dev_service_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from azure.cli.core.azclierror import CLIError, ResourceNotFoundError
from ._client_factory import handle_raw_exception
from ._clients import ManagedEnvironmentClient, ContainerAppClient
from ._clients import ManagedEnvironmentPreviewClient, ContainerAppPreviewClient
from ._constants import (
CONTAINER_APPS_RP
)
Expand All @@ -25,7 +25,7 @@ def create_service(cmd, service_name, environment_name, resource_group_name, no_
env_info = None

try:
env_info = ManagedEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name,
env_info = ManagedEnvironmentPreviewClient.show(cmd=cmd, resource_group_name=resource_group_name,
name=environment_name)
except Exception: # pylint: disable=broad-except
pass
Expand All @@ -46,7 +46,7 @@ def delete_service(cmd, service_name, resource_group_name, no_wait, service_type
containerapp_def = None

try:
containerapp_def = ContainerAppClient.show(cmd=cmd, resource_group_name=resource_group_name,
containerapp_def = ContainerAppPreviewClient.show(cmd=cmd, resource_group_name=resource_group_name,
name=service_name)
except Exception: # pylint: disable=broad-except
pass
Expand All @@ -59,7 +59,7 @@ def delete_service(cmd, service_name, resource_group_name, no_wait, service_type
raise ResourceNotFoundError("The service '{}' of type {} does not exist".format(service_name, service_type))

try:
return ContainerAppClient.delete(cmd=cmd, name=service_name, resource_group_name=resource_group_name,
return ContainerAppPreviewClient.delete(cmd=cmd, name=service_name, resource_group_name=resource_group_name,
no_wait=no_wait)
except CLIError as e:
handle_raw_exception(e)
2 changes: 1 addition & 1 deletion src/containerapp/azext_containerapp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from azure.cli.command_modules.acr.custom import acr_show
from azure.cli.command_modules.containerapp._utils import safe_get, _ensure_location_allowed, \
_generate_log_analytics_if_not_provided
from azure.cli.command_modules.containerapp._clients import ContainerAppClient
from ._clients import ContainerAppPreviewClient as ContainerAppClient
from azure.cli.command_modules.containerapp._client_factory import handle_raw_exception
from azure.cli.core._profile import Profile
from azure.cli.core.azclierror import (ValidationError, ResourceNotFoundError, CLIError, InvalidArgumentValueError)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

from msrest.exceptions import DeserializationError

from ._clients import ManagedEnvironmentClient, ConnectedEnvironmentClient, ManagedEnvironmentPreviewClient
from ._clients import ConnectedEnvironmentClient, ManagedEnvironmentPreviewClient
from ._client_factory import handle_raw_exception, handle_non_404_status_code_exception, get_linker_client
from ._models import (
RegistryCredentials as RegistryCredentialsModel,
Expand Down Expand Up @@ -1255,7 +1255,7 @@ def get_environment_client(self):

environment_type = self.get_argument_environment_type()
if not env and not environment_type:
return ManagedEnvironmentClient
return ManagedEnvironmentPreviewClient

parsed_env = parse_resource_id(env)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from ._client_factory import handle_raw_exception, handle_non_404_status_code_exception
from ._constants import CONNECTED_ENVIRONMENT_RESOURCE_TYPE, \
MANAGED_ENVIRONMENT_TYPE, CONNECTED_ENVIRONMENT_TYPE, ACR_IMAGE_SUFFIX
from ._clients import ManagedEnvironmentClient, ConnectedEnvironmentClient, ManagedEnvironmentPreviewClient
from ._clients import ConnectedEnvironmentClient, ManagedEnvironmentPreviewClient
from ._decorator_utils import (create_deserializer,
process_loaded_yaml,
load_yaml_file)
Expand Down Expand Up @@ -768,7 +768,7 @@ def get_environment_client(self):

environment_type = self.get_argument_environment_type()
if not env and not environment_type:
return ManagedEnvironmentClient
return ManagedEnvironmentPreviewClient

parsed_env = parse_resource_id(env)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
_ensure_location_allowed, CONTAINER_APPS_RP,
validate_container_app_name,
safe_set, safe_get, _ensure_identity_resource_id)
from azure.cli.command_modules.containerapp._clients import ManagedEnvironmentClient
from ._clients import ManagedEnvironmentPreviewClient
from azure.cli.command_modules.containerapp._client_factory import handle_non_404_status_code_exception
from azure.cli.command_modules.containerapp._decorator_utils import load_yaml_file
from azure.cli.command_modules.containerapp._utils import is_registry_msi_system
Expand Down Expand Up @@ -162,7 +162,7 @@ def get_argument_probe_yaml(self):

# pylint: disable=no-self-use
def get_environment_client(self):
return ManagedEnvironmentClient
return ManagedEnvironmentPreviewClient

def set_up_probes(self):
probes_def = load_yaml_file(self.get_argument_probe_yaml())
Expand Down
Loading