Skip to content

Conversation

@bbovenzi
Copy link
Contributor

@bbovenzi bbovenzi commented Jan 19, 2023

Fixing an issue reported in #28973
Closes: #29105

Skipped dynamic tasks put us in a position where a task was mapped but it had not mapped states and updating the graph labels would fail.

Also, handling mapped tasks vs mapped task groups were confusing. This PR aims to simplify that.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Jan 19, 2023
@bbovenzi bbovenzi added this to the Airflow 2.5.2 milestone Jan 20, 2023
@talnagar
Copy link
Contributor

talnagar commented Feb 6, 2023

hi
Is there a way we can patch this fix in the airflow docker image we are using?
we would really like to patch it till the next version is released since it really bothers some of our users.
the js files go through some build process, can we simulate it somehow?
thanks

@potiuk
Copy link
Member

potiuk commented Feb 20, 2023

Sure. You can build your own airflow package and install it. Look at the INSTALL and https://github.com/apache/airflow/blob/main/INSTALL#L114 . You can also use breeze CLI https://github.com/apache/airflow/blob/main/BREEZE.rst#preparing-airflow-packages to build packages in consistent way.

@talnagar
Copy link
Contributor

thanks @potiuk

@KarthikRajashekaran
Copy link

I have cherry-picked the commit and applied it to the docker image, still I don't see the graph
Below is sample of the DockerFile

# Global Docker Build arguments
ARG AIRFLOW_VERSION=2.5.1
ARG PYTHON_RUNTIME_VERSION=3.8
FROM apache/airflow:${AIRFLOW_VERSION}-python${PYTHON_RUNTIME_VERSION}
SHELL ["/bin/bash", "-o", "pipefail", "-e", "-u", "-x", "-c"]
# Cherry pick the changes into the Dockerfile
RUN curl -o /home/airflow/.local/lib/python3.8/site-packages/airflow/www/static/js/graph.js https://raw.githubusercontent.com/apache/airflow/main/airflow/www/static/js/graph.js
......
......

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Feb 23, 2023

Hello @KarthikRajashekaran,

Front end assets are built/bundled using webpack. So you would need to rebuild this part in your image for it to work. (python setup.py compile_assets command pointed by Jarek or directly using yarn)

As Jarek mentioned, you can also use breeze to build docker images and python packages in a consistent way. Here you could rebuild your own version of the airflow package with this patch, then extend your docker image to use this patched airflow version.

I believe you could also directly build the docker image from the patched source by customising your image. But keeping a version of the patched package is preferable I think.

Hope this helps.

@pierrejeambrun pierrejeambrun added the type:misc/internal Changelog: Misc changes that should appear in change log label Feb 27, 2023
pierrejeambrun pushed a commit that referenced this pull request Mar 7, 2023
@josh-fell josh-fell mentioned this pull request Mar 8, 2023
2 tasks
pierrejeambrun pushed a commit that referenced this pull request Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues type:misc/internal Changelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

graph disappears during run time when using branch_task and a dynamic classic operator

6 participants