-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-6195] Fixed TaskInstance attrs not correct on UI #6758
Conversation
Update with apache/airflow
Rebasing with upstream
Thanks @baolsen! It looks reasonable, however I have not much experience with those parts of the UI so maybe others might want to take a look (@ashb @feluelle - I think you are a bit more familiar with it ;). BTW. @baolsen answering your question from slack -> you cannot add reviewers if you are not maintainer/committer. But you can still add people in comments :). |
Thanks @potiuk . FYI my build is failing due to a flaky test (since it ran fine in my repo), if you could rerun for me that would be great. |
Restarted! |
Ready to merge :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further down in scheduler_job in _change_state_for_tasks_failed_to_execute
we set TIs that were Queued but that didn't get picked up by the executor back to Scheduled -- I think it probably makes sense to set the queued_dttm to None there too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good otherwise
Side comment @baolsen FYI. We usually use rebase workflow during review rather than merge (https://www.atlassian.com/git/tutorials/merging-vs-rebasing). While this is not as intuitive initially as merge (if you are used to it), it is pretty well supported by Github (you can see snippets of old commits even if they are gone). This means that you have to often rebase on-top of master rather than have merge commits and get used to This has great benefit of being able to keep even multiple commits separated in ine PR and continuously rebased on top of latest master - which (if you do it often and change is small) is rather easy. Thenn when we review the code we can also review them commit-by-commit even if eventually they will get squashed as single commit. Having merge commits in between your commits makes it rather difficult to review it commit-by-commit - you have no option but review all of it. Also if you add I switched to it few years ago and never looked back since. |
@baolsen If you rebase (or merge, which ever you are most comfortable with) the static check error should be fixed - it was a bug in master. And ping me after it's done :) |
Thanks guys, I have just recently learned about rebase, thanks to this project. Once-off, set up my fork and configure upstream as follows To keep my local master up to date: To keep my feature branch up to date: Here is where I think I'm going wrong. Is that roughly correct? For someone new to re-basing (and contributing in general) I did followe the contrib guide but it was a little unclear to me (also I once force pushed and lost changes to one of my first PRs :) . Anyway I was planning to clarify and add these detailed steps to the contrib guide to make it clearer for others, so really appreciate your feedback here :) |
Codecov Report
@@ Coverage Diff @@
## master #6758 +/- ##
==========================================
- Coverage 84.53% 84.24% -0.29%
==========================================
Files 672 672
Lines 38153 38162 +9
==========================================
- Hits 32252 32150 -102
- Misses 5901 6012 +111
Continue to review full report at Codecov.
|
Some comments (this is the workflow I use).
I very rarely keep local master sync-only when I need to create a new branch locally. If you need it, it should be enough to just do
What I usually do to keep my feature branch is I rebase 'onto' the upstream/master branch. It needs a bit more consciousness to know where your commit started. I look at git log and see the last commit before those that I want to rebase and I do
During the review 1 commit is not needed - especially if you work incrementally and add fixups after review. This makes it easier to review as you apply fixes. So what I usually do is:
Correct. Or even better you can rebase + squash just before merge - which is a good practice as there might be for example new pre-commit checks added independently.
I think we do not have a "standard" workflow - we leave people quite a bit of freedom how they work. But maybe we should. Mine is just an example and is a bit involved and 'geeky'. Regarding losing changes - it's really hard to lose anything in git. Even if you force-push there is always |
(cherry picked from commit d4a8afb)
(cherry picked from commit d4a8afb)
(cherry picked from commit d4a8afb)
Make sure you have checked all steps below.
Jira
Description
Fixed calculation of queued_dttm - was using the first/previous value from prior attempts, and not updating when tasks are re-queued or retried for some other reason. This is unexpected behavior, and although it was implemented specifically in that way it is not referenced elsewhere in the application so it seems this behavior is actually not needed. (queued_dttm is only referenced in the UI under Task Instance details - but even then it was not being displayed at all anyway due to below bug). Changed it to always be updated when a task is queued / re-queued which is more intuitive.
Fixed various fields not displaying correctly on the UI for "Task Instance Details".
Before (just displays None instead of value from DB):
After (displays value from DB):
Tests
Tested manually by looking at the UI and comparing to the DB backend
Commits
Documentation