Skip to content

Commit b8c3eca

Browse files
authored
[Session Code Execute] Extend maximum supported value of --timeout-in-seconds from 180 to 220 (#8853)
1 parent 9bb1259 commit b8c3eca

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/containerapp/HISTORY.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Release History
44
===============
55
upcoming
66
++++++
7-
* 'az containerapp session code-interpreter execute': Extend maximum supported value of `--timeout-in-seconds` from 60 to 180.
7+
* 'az containerapp session code-interpreter execute': Extend maximum supported value of `--timeout-in-seconds` from 60 to 220.
88

99
1.2.0b1
1010
++++++

src/containerapp/azext_containerapp/_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from .action import AddCustomizedKeys
1919
from ._validators import (validate_env_name_or_id, validate_build_env_vars,
2020
validate_custom_location_name_or_id, validate_env_name_or_id_for_up,
21-
validate_otlp_headers, validate_target_port_range, validate_timeout_in_seconds)
21+
validate_otlp_headers, validate_target_port_range, validate_session_timeout_in_seconds)
2222
from ._constants import (MAXIMUM_CONTAINER_APP_NAME_LENGTH, MAXIMUM_APP_RESILIENCY_NAME_LENGTH, MAXIMUM_COMPONENT_RESILIENCY_NAME_LENGTH,
2323
AKS_AZURE_LOCAL_DISTRO)
2424

@@ -483,7 +483,7 @@ def load_arguments(self, _):
483483

484484
with self.argument_context('containerapp session code-interpreter', arg_group='execute') as c:
485485
c.argument('code', help="The code to execute in the code interpreter session")
486-
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")
486+
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 - 220 secs, e.g. 30")
487487

488488
with self.argument_context('containerapp java logger') as c:
489489
c.argument('logger_name', help="The logger name.")

src/containerapp/azext_containerapp/_validators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ def validate_target_port_range(cmd, namespace):
216216
raise ValidationError("Port must be in range [1, 65535].")
217217

218218

219-
def validate_timeout_in_seconds(cmd, namespace):
219+
def validate_session_timeout_in_seconds(cmd, namespace):
220220
timeout_in_seconds = namespace.timeout_in_seconds
221221
if timeout_in_seconds is not None:
222-
if timeout_in_seconds < 0 or timeout_in_seconds > 180:
223-
raise ValidationError("timeout in seconds must be in range [0, 180].")
222+
if timeout_in_seconds <= 0 or timeout_in_seconds > 220:
223+
raise ValidationError("Timeout in seconds must be in range [1, 220].")
224224

225225

226226
def validate_debug(cmd, namespace):

0 commit comments

Comments
 (0)