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

UI: Task duration view always shows local time #26110

Closed
1 of 2 tasks
cccs-seb opened this issue Sep 1, 2022 · 5 comments
Closed
1 of 2 tasks

UI: Task duration view always shows local time #26110

cccs-seb opened this issue Sep 1, 2022 · 5 comments
Assignees
Labels
affected_version:2.3 Issues Reported for 2.3 area:UI Related to UI/UX. For Frontend Developers. good first issue kind:bug This is a clearly a bug

Comments

@cccs-seb
Copy link
Contributor

cccs-seb commented Sep 1, 2022

Apache Airflow version

Other Airflow 2 version

What happened

Task duration view always shows local time and doesn't represent the selected timezone (e.g. Graph still shows EDT if I choose UTC in the timezone picker)

What you think should happen instead

The times displayed in the graph should match the timezone selected.

How to reproduce

Steps:

  • Go to the Task duration screen for any DAG;
  • Select UTC timezone
  • Look at the graph, it will be local (EDT in my case)

Operating System

Debian GNU/Linux 11 (bullseye) (we use the official docker image as base)

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else

Airflow version 2.3.3

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@cccs-seb cccs-seb added area:core kind:bug This is a clearly a bug labels Sep 1, 2022
@cccs-seb cccs-seb changed the title Task duration view always shows local time UI: Task duration view always shows local time Sep 1, 2022
@uranusjr uranusjr added area:UI Related to UI/UX. For Frontend Developers. and removed area:core labels Sep 8, 2022
@hungtsetse
Copy link

can I work on this since it still occurs in version 2.5

@potiuk
Copy link
Member

potiuk commented Apr 15, 2023

Sure. Assigned you.

@hungtsetse
Copy link

I just had an overview of this issue, and would like to get some suggestions for addressing properly.

The chart of Task Duration is generating at server side as html and pass to Falsk for further rendering, so it can't get the selected timezone on browser.

Epoch time was literally converted by time.mktime which is based off server local time.

date_time = wwwutils.epoch(first_ti.execution_date)

Additionally, it's also happending on "Task Tries" and "Landing Times" tabs which generate charts with the similar approach.

@potiuk
Copy link
Member

potiuk commented Apr 22, 2023

Part of the issue is really to figure out what to do - it's best to discuss your doubts when you have a PR and would like to get feedback. If you do not have an idea how to fix it, enough to raise a PR and start discussing it, I think it's best to find a taks where you will be able to get to the point on your own.

@tirkarthi
Copy link
Contributor

Task duration page is now implemented in react in #35863. It shows the timestamp with selected timezone on hovering the bar in chart. Same for dagrun duration chart as well. I guess this can be closed.

cc: @bbovenzi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.3 Issues Reported for 2.3 area:UI Related to UI/UX. For Frontend Developers. good first issue kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

7 participants