-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong template field types for AWS operators #16808
Comments
It might be not just for AWS operators, but these are the ones i use and i could test |
Hi! Would you be interested in submitting a PR to fix this? |
@uranusjr i can make pr but only for the operators i use |
That’s perfectly fine! If some other operators also have this issue, people who use them can submit fixes for them. |
As mentioned previously, this is not specific to AWS operators. This issue also happens with @task decorated (TaskFlow API) operators, where the op_kwargs is a dict and is setup to be rendered as py. Possible solution is to update the "get_python_source" in utils/code_utils.py to handle list and dict. Possibly something like:
The converting values to strings seems necessary in order to avoid errors when this is passed to the pygments lexer. |
Closed by #16820 |
Apache Airflow version: 2.1.1
Environment:
What happened:
After migrating from Airflow 2.0.1 to 2.1.1, the Rendered Template tab stopped working for dictionaries. I checked it for Sagemaker and ECS operators, the code is not shown.
However for some operators where i have customized list of
template_fields
, it partly works (only for extra fields).So then i checked a release notes and it looks like it's related to #15130 and for some AWS operators the type of the fields should be not
py
, butjson
since all those fields mostly simply propagated to boto3 as json.The text was updated successfully, but these errors were encountered: