-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix:
TaskInstance
does not show queued_by_job_id
& ``external…
…_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)
- Loading branch information
Showing
3 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
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
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
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