Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
changed container field description
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanluciano committed Apr 11, 2024
1 parent 07c3d77 commit 682fedc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions prefect_aws/workers/ecs_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,10 @@ class ECSVariables(BaseVariables):
title="CPU",
default=None,
description=(
"The amount of CPU to provide to the Prefect container. Valid amounts are "
"specified in the AWS documentation. If not provided, a default value of "
f"{ECS_DEFAULT_CPU} will be used unless present on the task definition."
"The amount of CPU to provide to the Prefect container. Valid amounts are"
" specified in the AWS documentation. If not provided, the value supplied"
" to `cpu` for the task will be used. If neither are provided,"
f" {ECS_DEFAULT_CPU} will be used unless present on the task definition."
),
)
container_memory: int = Field(
Expand All @@ -467,17 +468,22 @@ class ECSVariables(BaseVariables):
"The amount of memory to provide to the Prefect container. Valid amounts"
" are specified in the AWS documentation. If not provided, a default value"
f" of {ECS_DEFAULT_MEMORY} will be used unless present on the task"
" definition."
" definition. Only use these variables when your ECS tasks have multiple"
" containers. The total CPU and memory for all of a task's containers"
" cannot exceed the CPU and memory set for the task."
),
)

container_name: str = Field(
default=None,
description=(
"The name of the container flow run orchestration will occur in. If not "
f"specified, a default value of {ECS_DEFAULT_CONTAINER_NAME} will be used "
"and if that is not found in the task definition the first container will "
"be used."
"The amount of memory to provide to the Prefect container. Valid amounts"
" are specified in the AWS documentation. If not provided, the value"
" supplied to `cpu` for the task will be used. If neither are provided,"
f" {ECS_DEFAULT_CPU} will be used unless present on the task definition."
" Only use these variables when your ECS tasks have multiple containers."
" The total CPU and memory for all of a task's containers cannot exceed"
" the CPU and memory set for the task."
),
)
task_role_arn: str = Field(
Expand Down
2 changes: 1 addition & 1 deletion tests/workers/test_ecs_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ async def test_launch_types(
@pytest.mark.parametrize(
"cpu,memory", [(None, None), (1024, None), (None, 2048), (2048, 4096)]
)
@pytest.mark.parametrize("container_cpu,container_memory", [(1024, 2048)])
@pytest.mark.parametrize("container_cpu,container_memory", [(None, None), (1024, 2048)])
async def test_cpu_and_memory(
aws_credentials: AwsCredentials,
launch_type: str,
Expand Down

0 comments on commit 682fedc

Please sign in to comment.