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

add dag parsed time in DAG view #27573

Merged
merged 3 commits into from
Nov 11, 2022

Conversation

leehuwuj
Copy link
Contributor

@leehuwuj leehuwuj commented Nov 9, 2022

At our company, user have to change their dag definition in their own git repository which is going to be pulled by git-sync service into our Airflow instance. Users have to wait a moment then checking the DAG code to see is their updates are refreshed in Airflow.
It'd be easier if we show the last parsed time in DAG view that user can easily compare the parsed time with current time.

This update will add a new label called Parsed at next to the Next Run tooltip of the DAG UI.

image


^ 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.

Add the DAG last parsed time in DAG view which help users easier know their dag is refreshed after update the dag file
@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Nov 9, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Nov 9, 2022

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@bbovenzi
Copy link
Contributor

bbovenzi commented Nov 9, 2022

Nice! I'm just not sure if that's the best place for that info. I think it may be better in the /detail page

@jedcunningham
Copy link
Member

Turns out it's already on the details page. What about if we added it to /code?

@leehuwuj
Copy link
Contributor Author

leehuwuj commented Nov 9, 2022

Turns out it's already on the details page. What about if we added it to /code?

Good idea @jedcunningham , It'll be more friendly with users who checking their updates in the code without look closer into their code.
Should I keep the label there then add a condition to show in /code page only or put it inside the dag_code block?
I'll keep commit if our decision is simple because i'm not a front-end developer myself.

@jedcunningham
Copy link
Member

Lets put it in the page body instead, above the code block? That work for you @bbovenzi?

@bbovenzi
Copy link
Contributor

bbovenzi commented Nov 9, 2022

Lets put it in the page body instead, above the code block? That work for you @bbovenzi?

Yeah, let's put it in code.html inbetween subtitle and code

@leehuwuj
Copy link
Contributor Author

leehuwuj commented Nov 9, 2022

Yeah, let's put it in code.html inbetween subtitle and code

I'm a bit confused, I think it's dag_code.html and it seems that the code.html has not be used for a long time!

@bbovenzi
Copy link
Contributor

bbovenzi commented Nov 9, 2022

Yeah, let's put it in code.html inbetween subtitle and code

I'm a bit confused, I think it's dag_code.html and it seems that the code.html has not be used for a long time!

Yes, my bad.

@leehuwuj
Copy link
Contributor Author

Just moved to dag_code.html:
image

@bbovenzi bbovenzi added this to the Airflow 2.5.0 milestone Nov 11, 2022
@bbovenzi bbovenzi merged commit e4bba54 into apache:main Nov 11, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Nov 11, 2022

Awesome work, congrats on your first merged pull request!

@jedcunningham
Copy link
Member

Thanks @leehuwuj! Congrats on your first commit 🎉

Adityamalik123 pushed a commit to Adityamalik123/airflow that referenced this pull request Nov 12, 2022
* add dag parsed time in DAG view

Add the DAG last parsed time in DAG view which help users easier know their dag is refreshed after update the dag file

* move dag parsed time to code page
@ephraimbuddy ephraimbuddy added the type:new-feature Changelog: New Features label Nov 16, 2022
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:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants