o-nikolas commented on code in PR #55279:
URL: https://github.com/apache/airflow/pull/55279#discussion_r2325619726


##########
providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor_config.py:
##########
@@ -81,9 +81,12 @@ def build_task_kwargs() -> dict:
         if not cluster.get("defaultCapacityProviderStrategy"):
             task_kwargs[all_config_keys.LAUNCH_TYPE] = ECS_LAUNCH_TYPE_FARGATE
 
-    # If you're using the EC2 launch type, you should not/can not provide the 
platform_version. In this
-    # case we'll drop it on the floor on behalf of the user, instead of 
throwing an exception.
-    if is_launch_type_ec2:
+    # The platform_version should be provided for FARGATE launch type only. In 
other
+    # cases we'll drop it on the floor on behalf of the user, instead of 
throwing an exception.
+    is_launch_type_fargate: bool = (
+        task_kwargs.get(all_config_keys.LAUNCH_TYPE, None) == 
ECS_LAUNCH_TYPE_FARGATE
+    )
+    if not is_launch_type_fargate:

Review Comment:
   I'm curious to hear from @vincbeck and @ferruzzi for more points of view.
   But note that if we go forward with this it is a behaviour change so we'll 
need to do a deprecation process.
    



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to