Skip to content
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

Bugfix: Task docs are not shown in the Task Instance Detail View #15191

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

kaxil
Copy link
Member

@kaxil kaxil commented Apr 4, 2021

closes #15178
closes #13761

This feature was added in 2015 in #74 and it was expected to set doc_md (or doc_rst and other doc_*) via task.doc_md instead of passing via arg. However, this did not work with DAG Serialization as we only allowed a selected args to be stored in Serialized version of DAG.

image


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@@ -1247,7 +1247,7 @@ def task(self):
# Color coding the special attributes that are code
special_attrs_rendered = {}
for attr_name in wwwutils.get_attr_renderer():
if hasattr(task, attr_name):
if getattr(task, attr_name, None) is not None:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to not show attributes that are None -- that pollutes the TaskInstance screen.

@@ -338,7 +338,7 @@ def json_render(obj, lexer):
return out


def wrapped_markdown(s, css_class=None):
def wrapped_markdown(s, css_class='rich_doc'):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was always rich_doc in 1.10.x , example:

https://github.com/apache/airflow/blob/1.10.15/airflow/www_rbac/utils.py#L316-L322

However, we pass None at few places, so just making it the default

@kaxil kaxil force-pushed the fix-ti-docmd branch 3 times, most recently from 2e46817 to 1d012c0 Compare April 4, 2021 22:51
@github-actions
Copy link

github-actions bot commented Apr 4, 2021

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Apr 4, 2021
closes apache#15178
closes apache#13761

This feature was added in 2015 in apache#74 and it was expected to set `doc_md` (or `doc_rst` and other `doc_*`) via `task.doc_md` instead of passing via arg. However, this did not work with DAG Serialization as we only allowed a selected args to be stored in Serialized version of DAG.
@kaxil kaxil merged commit e86f5ca into apache:master Apr 5, 2021
@kaxil kaxil deleted the fix-ti-docmd branch April 5, 2021 02:46
kaxil added a commit that referenced this pull request Apr 9, 2021
)

closes #15178
closes #13761

This feature was added in 2015 in #74 and it was expected to set `doc_md` (or `doc_rst` and other `doc_*`) via `task.doc_md` instead of passing via arg. However, this did not work with DAG Serialization as we only allowed a selected args to be stored in Serialized version of DAG.

(cherry picked from commit e86f5ca)
ashb pushed a commit that referenced this pull request Apr 15, 2021
)

closes #15178
closes #13761

This feature was added in 2015 in #74 and it was expected to set `doc_md` (or `doc_rst` and other `doc_*`) via `task.doc_md` instead of passing via arg. However, this did not work with DAG Serialization as we only allowed a selected args to be stored in Serialized version of DAG.

(cherry picked from commit e86f5ca)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:serialization area:webserver Webserver related Issues full tests needed We need to run full set of tests for this PR to merge kind:documentation
Projects
None yet
2 participants