Enable search in note column in DagRun and TaskInstance#31455
Merged
Conversation
Hajbo
requested review from
ashb,
bbovenzi,
pierrejeambrun and
ryanahamilton
as code owners
May 22, 2023 00:10
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
uranusjr
reviewed
May 22, 2023
uranusjr
reviewed
May 22, 2023
Comment on lines
5533
to
5543
| order_columns = [ | ||
| item for item in list_columns if item not in ["try_number", "log_url", "external_executor_id"] | ||
| item | ||
| for item in list_columns | ||
| if item | ||
| not in [ | ||
| "try_number", | ||
| "log_url", | ||
| "external_executor_id", | ||
| "note", # todo: maybe figure out how to re-enable this | ||
| ] | ||
| ] |
Member
There was a problem hiding this comment.
Instead of doing this dance I’d recommend simply listing the columns.
uranusjr
approved these changes
May 22, 2023
pierrejeambrun
approved these changes
May 25, 2023
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change re-enables search in notes for the DagRun and TaskInstance views (under the Browse dropdown menu).
Turns out desc.value_attr is the column name in the remote table. This means that this only worked if the attribute with the association proxy had the same name as the associated column, otherwise the wrong column name was used as the key (e.g. content instead of note). The only instance this caused an issue was for the notes, the names were matching in all other cases that are shown in the UI.
I took the liberty to fix the note search for the TaskInstance view as well, at the expense of disabling ordering by note. Unfortunately sorting by an association proxy isn't supported, and mixing it with the actual field reference (table_name.column_name format) didn't solve the issue either.
closes: #30042