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 Task Instance details not showing queued_by_job_id and external_executor_id values #17179
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…xecutor_id values.
Jorricks
requested review from
ashb,
kaxil,
ryanahamilton,
turbaszek and
XD-DENG
as code owners
July 22, 2021 21:10
kaxil
approved these changes
Jul 22, 2021
github-actions
bot
added
the
full tests needed
We need to run full set of tests for this PR to merge
label
Jul 22, 2021
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. |
jhtimmins
pushed a commit
that referenced
this pull request
Aug 9, 2021
…_executor_id`` (#17179) **Problem discovery:** I was debugging a bug with the `external_executor_id` Airflow after which this UI bug caught my eye and I got annoyed by it. I figured to fix this one first so my other testing can go a bit smoother :) **Description of the problem:** Currently there is a BUG inside the Task Instance details (/task) view. It loads the TaskInstance by calling `TI(task, execution_date)` and then uses `refresh_from_db()` to refresh many fields that are no filled in yet. However, the assumption is made in that case that it refreshes all values, which it does not. `external_executor_id` and `queued_by_job_id` are not updated at all and `executor_config` is only instantiated by the original `TI(task, execution_date)` call but also not updated in `refresh_from_db()`. This also shows in the UI where these values are always showing None, while the TaskInstance view shows you these values are not None. **The changes in the PR:** 1. Changes to the `update_from_db()` method to include the missing three values. 2. A new test that checks we are really updating ALL values in `update_from_db()` 3. Removal of an incorrect comment as we do need the `execution_date` for that view. (cherry picked from commit 759c76d)
jhtimmins
pushed a commit
that referenced
this pull request
Aug 13, 2021
…_executor_id`` (#17179) **Problem discovery:** I was debugging a bug with the `external_executor_id` Airflow after which this UI bug caught my eye and I got annoyed by it. I figured to fix this one first so my other testing can go a bit smoother :) **Description of the problem:** Currently there is a BUG inside the Task Instance details (/task) view. It loads the TaskInstance by calling `TI(task, execution_date)` and then uses `refresh_from_db()` to refresh many fields that are no filled in yet. However, the assumption is made in that case that it refreshes all values, which it does not. `external_executor_id` and `queued_by_job_id` are not updated at all and `executor_config` is only instantiated by the original `TI(task, execution_date)` call but also not updated in `refresh_from_db()`. This also shows in the UI where these values are always showing None, while the TaskInstance view shows you these values are not None. **The changes in the PR:** 1. Changes to the `update_from_db()` method to include the missing three values. 2. A new test that checks we are really updating ALL values in `update_from_db()` 3. Removal of an incorrect comment as we do need the `execution_date` for that view. (cherry picked from commit 759c76d)
kaxil
pushed a commit
that referenced
this pull request
Aug 17, 2021
…_executor_id`` (#17179) **Problem discovery:** I was debugging a bug with the `external_executor_id` Airflow after which this UI bug caught my eye and I got annoyed by it. I figured to fix this one first so my other testing can go a bit smoother :) **Description of the problem:** Currently there is a BUG inside the Task Instance details (/task) view. It loads the TaskInstance by calling `TI(task, execution_date)` and then uses `refresh_from_db()` to refresh many fields that are no filled in yet. However, the assumption is made in that case that it refreshes all values, which it does not. `external_executor_id` and `queued_by_job_id` are not updated at all and `executor_config` is only instantiated by the original `TI(task, execution_date)` call but also not updated in `refresh_from_db()`. This also shows in the UI where these values are always showing None, while the TaskInstance view shows you these values are not None. **The changes in the PR:** 1. Changes to the `update_from_db()` method to include the missing three values. 2. A new test that checks we are really updating ALL values in `update_from_db()` 3. Removal of an incorrect comment as we do need the `execution_date` for that view. (cherry picked from commit 759c76d)
jhtimmins
pushed a commit
that referenced
this pull request
Aug 17, 2021
…_executor_id`` (#17179) **Problem discovery:** I was debugging a bug with the `external_executor_id` Airflow after which this UI bug caught my eye and I got annoyed by it. I figured to fix this one first so my other testing can go a bit smoother :) **Description of the problem:** Currently there is a BUG inside the Task Instance details (/task) view. It loads the TaskInstance by calling `TI(task, execution_date)` and then uses `refresh_from_db()` to refresh many fields that are no filled in yet. However, the assumption is made in that case that it refreshes all values, which it does not. `external_executor_id` and `queued_by_job_id` are not updated at all and `executor_config` is only instantiated by the original `TI(task, execution_date)` call but also not updated in `refresh_from_db()`. This also shows in the UI where these values are always showing None, while the TaskInstance view shows you these values are not None. **The changes in the PR:** 1. Changes to the `update_from_db()` method to include the missing three values. 2. A new test that checks we are really updating ALL values in `update_from_db()` 3. Removal of an incorrect comment as we do need the `execution_date` for that view. (cherry picked from commit 759c76d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:webserver
Webserver related Issues
full tests needed
We need to run full set of tests for this PR to merge
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem discovery:
I was debugging a bug with the
external_executor_id
Airflow after which this UI bug caught my eye and I got annoyed by it. I figured to fix this one first so my other testing can go a bit smoother :)Description of the problem:
Currently there is a BUG inside the Task Instance details (/task) view.
It loads the TaskInstance by calling
TI(task, execution_date)
and then usesrefresh_from_db()
to refresh many fields that are no filled in yet.However, the assumption is made in that case that it refreshes all values, which it does not.
external_executor_id
andqueued_by_job_id
are not updated at all andexecutor_config
is only instantiated by the originalTI(task, execution_date)
call but also not updated inrefresh_from_db()
.This also shows in the UI where these values are always showing None, while the TaskInstance view shows you these values are not None.
The changes in the PR:
update_from_db()
method to include the missing three values.update_from_db()
execution_date
for that view.