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

Fix timezone display for logs on UI #23075

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

MaksYermak
Copy link
Contributor

@MaksYermak MaksYermak commented Apr 19, 2022

In this PR I have fixed the bug with logs display in UI. The problem is that our time conversion doesn't work correctly. I will try to describe it below. On server side we create a logs in UTC time. After that on UI JavaScript takes this logs and for each timestamps changes UTC flag to flag which is indicated like serverTimezone. But without time conversion, for example for PDT timezone: 2022-04-13 12:15:00,117+00:00 time in log file, on UI will be changed to 2022-04-13 12:15:00,117−07:00 time. Then another JS code using a correct convert function converts this timestamp to a time with a serverTimezone and in result we will see 2022-04-13, 12:15:00 PDT. How you see now we have UTC time with PDT label and each next conversion will create an incorrect time view.

Co-authored-by: Wojciech Januszek [email protected]
Co-authored-by: Lukasz Wyszomirski [email protected]
Co-authored-by: Maksim Yermakou [email protected]


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

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Apr 19, 2022
Copy link

@rbiegacz rbiegacz left a comment

Choose a reason for hiding this comment

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

the changes look good to me

Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

Related: #19342

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Apr 21, 2022
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@bbovenzi bbovenzi merged commit e57c7ae into apache:main Apr 21, 2022
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Apr 25, 2022
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 4, 2022
Cherry-pick of apache/airflow#23075
Fix timezone display for logs on UI Internal bug

RELNOTES=BUGFIX

Change-Id: Id1a20a676eb7dcebe3617f7a63120f3fc71b2131
GitOrigin-RevId: 548b75ea219cd879a0c52101b5c189ae1a84523c
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 6, 2022
Cherry-pick of apache/airflow#23075
Fix timezone display for logs on UI Internal bug

RELNOTES=BUGFIX

Change-Id: I1e7d48bb0f5e2b0d12e86dd90f59453c9a7766f4
GitOrigin-RevId: c97c1c6503b71f5cd2401e84b113f77f266e6dd3
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 okay to merge It's ok to merge this PR as it does not require more tests type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants