Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import yaml
from aws_library.ec2 import EC2InstanceBootSpecific, EC2InstanceData, EC2Tags
from aws_library.ec2._models import CommandStr
from common_library.json_serialization import json_dumps
from common_library.serialization import model_dump_with_secrets
from fastapi.encoders import jsonable_encoder
from models_library.api_schemas_clusters_keeper.clusters import (
Expand Down Expand Up @@ -106,7 +105,7 @@ def _convert_to_env_dict(entries: dict[str, Any]) -> str:
f"WORKERS_EC2_INSTANCES_SUBNET_ID={app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_SUBNET_ID}",
f"WORKERS_EC2_INSTANCES_TIME_BEFORE_DRAINING={app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_TIME_BEFORE_DRAINING}",
f"WORKERS_EC2_INSTANCES_TIME_BEFORE_TERMINATION={app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_TIME_BEFORE_TERMINATION}",
f"AUTOSCALING_RABBITMQ={json_dumps(model_dump_with_secrets(app_settings.CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES.PRIMARY_EC2_INSTANCES_RABBIT, show_secrets=True)) if app_settings.CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES.PRIMARY_EC2_INSTANCES_RABBIT else 'null'}",
f"AUTOSCALING_RABBITMQ={_convert_to_env_dict(model_dump_with_secrets(app_settings.CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES.PRIMARY_EC2_INSTANCES_RABBIT, show_secrets=True)) if app_settings.CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES.PRIMARY_EC2_INSTANCES_RABBIT else 'null'}",
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def test_rabbitmq_settings_are_passed_with_pasword_clear(
)
assert isinstance(deploy_script, str)

match = re.search(r"AUTOSCALING_RABBITMQ=({.*?})", deploy_script)
match = re.search(r"AUTOSCALING_RABBITMQ=\'({.*?})\'", deploy_script)
assert match, "AUTOSCALING_RABBITMQ is not present in the deploy script!"
autoscaling_rabbitmq = match.group(1)
passed_settings = RabbitSettings.model_validate_json(autoscaling_rabbitmq)
Expand Down
Loading