Skip to content

Commit c9a48cc

Browse files
authored
♻️Pydantic V2 upgrade: autoscaling (#6535)
1 parent 5528772 commit c9a48cc

37 files changed

+3302
-2137
lines changed

.env-devel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ AUTOSCALING_EC2_ACCESS=null
3131
AUTOSCALING_EC2_INSTANCES=null
3232
AUTOSCALING_LOGLEVEL=WARNING
3333
AUTOSCALING_NODES_MONITORING=null
34-
AUTOSCALING_POLL_INTERVAL=10
34+
AUTOSCALING_POLL_INTERVAL="00:00:10"
3535
AUTOSCALING_SSM_ACCESS=null
3636

3737
AWS_S3_CLI_S3=null

packages/aws-library/src/aws_library/ec2/_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ class EC2InstanceType:
8888
# quotes []{} were added as it allows to json encode. it seems to be accepted as a value
8989
str,
9090
StringConstraints(
91-
min_length=0,
92-
max_length=256,
91+
min_length=AWS_TAG_VALUE_MIN_LENGTH,
92+
max_length=AWS_TAG_VALUE_MAX_LENGTH,
9393
pattern=r"^[a-zA-Z0-9\s\+\-=\.,_:/@\"\'\[\]\{\}]*$",
9494
),
9595
]

packages/models-library/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ DOCKER_API_VERSION ?= 1.41
6161
docker_rest_api.py: ## auto-generates pydantic models for Docker REST API models
6262
# auto-generates $@ from $<
6363
@$(SCRIPTS_DIR)/openapi-pydantic-models-generator.bash \
64-
--url https://docs.docker.com/engine/api/v$(DOCKER_API_VERSION).yaml \
64+
--url https://docs.docker.com/reference/api/engine/version/v$(DOCKER_API_VERSION).yaml \
6565
--output $@
6666

6767
# formats

packages/models-library/src/models_library/docker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def to_simcore_runtime_docker_labels(self) -> dict[DockerLabelKey, str]:
146146

147147
@classmethod
148148
def from_docker_task(cls, docker_task: Task) -> "StandardSimcoreDockerLabels":
149-
assert docker_task.Spec # nosec
150-
assert docker_task.Spec.ContainerSpec_ # nosec
151-
task_labels = docker_task.Spec.ContainerSpec_.Labels or {}
149+
assert docker_task.spec # nosec
150+
assert docker_task.spec.container_spec # nosec
151+
task_labels = docker_task.spec.container_spec.labels or {}
152152
return cls.model_validate(task_labels)
153153

154154
model_config = ConfigDict(

0 commit comments

Comments
 (0)