Skip to content

Commit d648609

Browse files
committed
Fix test failures after conf import migration
- Add AWS_CONN_ID to lambda executor test fixture - Use CONFIG_DEFAULTS as fallback in ECS executor config to match old behavior
1 parent a62b0be commit d648609

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor_config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from json import JSONDecodeError
3434

3535
from airflow.providers.amazon.aws.executors.ecs.utils import (
36+
CONFIG_DEFAULTS,
3637
CONFIG_GROUP_NAME,
3738
ECS_LAUNCH_TYPE_EC2,
3839
ECS_LAUNCH_TYPE_FARGATE,
@@ -56,7 +57,10 @@ def _fetch_templated_kwargs(conf) -> dict[str, str]:
5657

5758
def _fetch_config_values(conf) -> dict[str, str]:
5859
return prune_dict(
59-
{key: conf.get(CONFIG_GROUP_NAME, key, fallback=None) for key in RunTaskKwargsConfigKeys()}
60+
{
61+
key: conf.get(CONFIG_GROUP_NAME, key, fallback=CONFIG_DEFAULTS.get(key, None))
62+
for key in RunTaskKwargsConfigKeys()
63+
}
6064
)
6165

6266

providers/amazon/tests/unit/amazon/aws/executors/aws_lambda/test_lambda_executor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
@pytest.fixture
5353
def set_env_vars():
5454
overrides: dict[tuple[str, str], str] = {
55+
(CONFIG_GROUP_NAME, AllLambdaConfigKeys.AWS_CONN_ID): "aws_default",
5556
(CONFIG_GROUP_NAME, AllLambdaConfigKeys.REGION_NAME): "us-west-1",
5657
(CONFIG_GROUP_NAME, AllLambdaConfigKeys.FUNCTION_NAME): DEFAULT_FUNCTION_NAME,
5758
(CONFIG_GROUP_NAME, AllLambdaConfigKeys.QUEUE_URL): DEFAULT_QUEUE_URL,

0 commit comments

Comments
 (0)