You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "janrito (via GitHub)" <gi...@apache.org> on 2023/02/20 13:03:57 UTC

[GitHub] [airflow] janrito opened a new issue, #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated

janrito opened a new issue, #29637:
URL: https://github.com/apache/airflow/issues/29637

   ### Apache Airflow Provider(s)
   
   amazon
   
   ### Versions of Apache Airflow Providers
   
   https://raw.githubusercontent.com/apache/airflow/constraints-2.4.3/constraints-3.10.txt
   
   ### Apache Airflow version
   
   2.4.3
   
   ### Operating System
   
   https://github.com/aws/aws-mwaa-local-runner / on macos 12.6
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   [local ](https://github.com/aws/aws-mwaa-local-runner)
   
   ### What happened
   
   ECS task definition cpu and memory params are incorrectly invalidated
   
   ### What you think should happen instead
   
   parameters are correct, it should register a task. I can run the same bit of code using boto3.client.ecs.register_task_definition`
   
   ### How to reproduce
   
   Try and define a task using:
   
   ```python 
   EcsRegisterTaskDefinitionOperator(
           task_id="register_task",
           family=TASK_FAMILY_NAME,
           container_definitions=[
               {
                   "name": CONTAINER_NAME,
                   "image": "ubuntu",
                   "workingDirectory": "/usr/bin",
                   "entryPoint": ["sh", "-c"],
                   "command": ["ls"],
               }
           ],
           register_task_kwargs={
               "requiresCompatibilities": ["FARGATE"],
               "cpu": "256",
               "memory": "512",
               "networkMode": "awsvpc",
           },
       )
   ```
   
   ```logs
   botocore.exceptions.ParamValidationError: Parameter validation failed:
   Invalid type for parameter cpu, value: 256, type: <class 'int'>, valid types: <class 'str'>
   Invalid type for parameter memory, value: 512, type: <class 'int'>, valid types: <class 'str'>
   ```
   
   Could this error have something to do with JSON serialising/deserialising where the parameters are autodetected as `int`s, rather than deserialised into strings
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis closed issue #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis closed issue #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated
URL: https://github.com/apache/airflow/issues/29637


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] janrito commented on issue #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated

Posted by "janrito (via GitHub)" <gi...@apache.org>.
janrito commented on issue #29637:
URL: https://github.com/apache/airflow/issues/29637#issuecomment-1437152518

   Ah! yes. I did. Why is that clashing?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] EcsRegisterTaskDefinitionOperator params are incorrectly invalidated [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated
URL: https://github.com/apache/airflow/issues/29637


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on issue #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #29637:
URL: https://github.com/apache/airflow/issues/29637#issuecomment-1436994044

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on issue #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #29637:
URL: https://github.com/apache/airflow/issues/29637#issuecomment-1437361722

   `register_task_kwargs` it is templated field which evaluate thought jinja and I with this settings `NativeEnvironment` transform `"512"` to `512` even if it not not contain jinja blocks


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on issue #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #29637:
URL: https://github.com/apache/airflow/issues/29637#issuecomment-1437093004

   Nevermind, I have a look on wrong parameters initially.
   Did you use specific values such as `render_template_as_native_obj=True` in DAG?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on issue #29637: EcsRegisterTaskDefinitionOperator params are incorrectly invalidated

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #29637:
URL: https://github.com/apache/airflow/issues/29637#issuecomment-1437078616

   Not a bug Airflow provider, the validation happen inside [`botocore`](https://github.com/boto/botocore) / [`boto3`](https://github.com/boto/boto3), see available options and types in [ECS.Client.register_task_definition](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html#ECS.Client.register_task_definition) 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] EcsRegisterTaskDefinitionOperator params are incorrectly invalidated [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #29637:
URL: https://github.com/apache/airflow/issues/29637#issuecomment-1956011694

   This issue has been automatically marked as stale because it has been open for 365 days without any activity. There has been several Airflow releases since last activity on this issue. Kindly asking to recheck the report against latest Airflow version and let us know if the issue is reproducible. The issue will be closed in next 30 days if no further activity occurs from the issue author.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] EcsRegisterTaskDefinitionOperator params are incorrectly invalidated [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #29637:
URL: https://github.com/apache/airflow/issues/29637#issuecomment-2016383226

   This issue has been closed because it has not received response from the issue author.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org