-
Notifications
You must be signed in to change notification settings - Fork 344
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
Fix templates for safe rendering of comments, pipeline & property descriptions #2467
Conversation
Thanks for making a pull request to Elyra! To try out this branch on binder, follow this link: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following comment cannot be handled by the proposed solution. This comment
line feeds
line feeds
can you handle """
yes you can!
yields
Cannot parse: 59:0: op_b12bffe0_8734_4719_bed5_a4e11668f50e.image_pull_policy = 'IfNotPresent'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Could you make the title string to fit the commit title guidelines |
Fixes #2461
This also fixes a recent bug (no corresponding issue currently open) where certain Airflow operators were causing an error popup with JsonDecodeError due to unescaped characters in property descriptions.
What changes were proposed in this pull request?
"""
) using the jinjareplace
filter and escapes any other existing instances of"""
to avoidblack
formatting errors after DAG render.DAG:
Airflow GUI:
tojson|safe
filter. This allows un-escaped characters to be caught before descriptions are converted to JSON in the properties API request.Python operator file (source):
Properties panel:
How was this pull request tested?
A case has been added to an existing test for each scenario above.
This PR will remain in draft form until more manual testing occurs.
Developer's Certificate of Origin 1.1