Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Release History
===============
upcoming
++++++
* 'az containerapp session code-interpreter execute': Extend maximum supported value of `--timeout-in-seconds` from 60 to 180.
* 'az containerapp session code-interpreter execute': Extend maximum supported value of `--timeout-in-seconds` from 60 to 240.

1.2.0b1
++++++
Expand Down
4 changes: 2 additions & 2 deletions src/containerapp/azext_containerapp/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from .action import AddCustomizedKeys
from ._validators import (validate_env_name_or_id, validate_build_env_vars,
validate_custom_location_name_or_id, validate_env_name_or_id_for_up,
validate_otlp_headers, validate_target_port_range, validate_timeout_in_seconds)
validate_otlp_headers, validate_target_port_range, validate_session_timeout_in_seconds)
from ._constants import (MAXIMUM_CONTAINER_APP_NAME_LENGTH, MAXIMUM_APP_RESILIENCY_NAME_LENGTH, MAXIMUM_COMPONENT_RESILIENCY_NAME_LENGTH,
AKS_AZURE_LOCAL_DISTRO)

Expand Down Expand Up @@ -483,7 +483,7 @@ def load_arguments(self, _):

with self.argument_context('containerapp session code-interpreter', arg_group='execute') as c:
c.argument('code', help="The code to execute in the code interpreter session")
c.argument('timeout_in_seconds', type=int, validator=validate_timeout_in_seconds, default=60, help="Duration in seconds code in session can run prior to timing out 0 - 180 secs, e.g. 30")
c.argument('timeout_in_seconds', type=int, validator=validate_session_timeout_in_seconds, default=60, help="Duration in seconds code in session can run prior to timing out 1 - 240 secs, e.g. 30")

with self.argument_context('containerapp java logger') as c:
c.argument('logger_name', help="The logger name.")
Expand Down
6 changes: 3 additions & 3 deletions src/containerapp/azext_containerapp/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ def validate_target_port_range(cmd, namespace):
raise ValidationError("Port must be in range [1, 65535].")


def validate_timeout_in_seconds(cmd, namespace):
def validate_session_timeout_in_seconds(cmd, namespace):
timeout_in_seconds = namespace.timeout_in_seconds
if timeout_in_seconds is not None:
if timeout_in_seconds < 0 or timeout_in_seconds > 180:
raise ValidationError("timeout in seconds must be in range [0, 180].")
if timeout_in_seconds <= 0 or timeout_in_seconds > 240:
raise ValidationError("timeout in seconds must be in range [1, 240].")


def validate_debug(cmd, namespace):
Expand Down
Loading