You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Hajbo (via GitHub)" <gi...@apache.org> on 2023/05/22 00:10:14 UTC

[GitHub] [airflow] Hajbo opened a new pull request, #31455: Enable search in note column in DagRun and TaskInstance

Hajbo opened a new pull request, #31455:
URL: https://github.com/apache/airflow/pull/31455

   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 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Hajbo commented on a diff in pull request #31455: Enable search in note column in DagRun and TaskInstance

Posted by "Hajbo (via GitHub)" <gi...@apache.org>.
Hajbo commented on code in PR #31455:
URL: https://github.com/apache/airflow/pull/31455#discussion_r1200096476


##########
airflow/www/views.py:
##########
@@ -5177,6 +5177,7 @@ class DagRunModelView(AirflowPrivilegeVerifierModelView):
         "queued_at",
         "start_date",
         "end_date",
+        # Ordering is not supported on association proxies
         # "note", # todo: maybe figure out how to re-enable this

Review Comment:
   Thank you! Removed it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on pull request #31455: Enable search in note column in DagRun and TaskInstance

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #31455:
URL: https://github.com/apache/airflow/pull/31455#issuecomment-1563319003

   Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #31455: Enable search in note column in DagRun and TaskInstance

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on code in PR #31455:
URL: https://github.com/apache/airflow/pull/31455#discussion_r1199992634


##########
airflow/www/views.py:
##########
@@ -5177,6 +5177,7 @@ class DagRunModelView(AirflowPrivilegeVerifierModelView):
         "queued_at",
         "start_date",
         "end_date",
+        # Ordering is not supported on association proxies
         # "note", # todo: maybe figure out how to re-enable this

Review Comment:
   The new comment is arguably unrelated and should be removed from this PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #31455: Enable search in note column in DagRun and TaskInstance

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on code in PR #31455:
URL: https://github.com/apache/airflow/pull/31455#discussion_r1200108675


##########
airflow/www/views.py:
##########
@@ -5531,7 +5531,15 @@ class TaskInstanceModelView(AirflowPrivilegeVerifierModelView):
     ]
 
     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
+        ]
     ]

Review Comment:
   Instead of doing this dance I’d recommend simply listing the columns.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on pull request #31455: Enable search in note column in DagRun and TaskInstance

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #31455:
URL: https://github.com/apache/airflow/pull/31455#issuecomment-1556338836

   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)
   Here are some useful points:
   - Pay attention to the quality of your code (ruff, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
   Apache Airflow is a community-driven project and together we are making it better šŸš€.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] pierrejeambrun merged pull request #31455: Enable search in note column in DagRun and TaskInstance

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #31455:
URL: https://github.com/apache/airflow/pull/31455


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org