Repository navigation
Add td_format function and apply to Views duration column for better human readability - #20112
Conversation
|
Need to fix many errors in linters and tests |
|
@uranusjr sorry I didn't realize it created PR already. Working on it now! |
|
@uranusjr - I don't know what is going on with my build but these import failures of Union I don't have locally. I've tried a few things but can't get this happening on mine. Mind verifying if you apply this change do you see same thing? |
|
Your local code is different from the code in the PR. The error is pretty straightforward; |
|
@uranusjr oh my God, I am sorry, yes locally I have it imported. But I also merged the code. Let me pull it down. Something is off in my local - |
481fe49 to
c48ba08
Compare
c48ba08 to
c9fb7c3
Compare
…human readability
c9fb7c3 to
859d495
Compare
|
@bbovenzi mind looking? |
bbovenzi
left a comment
There was a problem hiding this comment.
Looking good. I'm wondering if we should do a 01:00:02 format instead. It would be more compact. In the react tree view we even add a day count like 5d01:00:02. That seems readable to me but I'm open to suggestions.
|
@bbovenzi when you recommend that format, I'd like to get this in as soon as possible this week so if you don't mind quickly iterating with me to complete the ask. |
I am fine with either, I don't have a strong opinion on it. |
hmm, maybe a config or a profile setting -- not sure @bbovenzi @ryanahamilton thoughts? |
|
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 main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
|
Good question. Let's go for |
|
Thanks for the discussion. I've just made some updates here, waiting for tests to pass then will burden you with review :) |
This PR came out of the review for: #19921. There was a review for adding an updated view for displaying the duration column in a more readable way.
To be determined if the same application to the TI views are desired as this PR has done so. Otherwise this is just to be a tool to translate some timedelta, or float/int, into the smallest grouped unit of measure to declare how long the duration has been running.
One open question is, is it preferred to make it optionable to apply this change to display the duration as this readable way vs the original timedelta way.
^ 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.