Copilot commented on code in PR #64472:
URL: https://github.com/apache/airflow/pull/64472#discussion_r3025326533


##########
airflow/www/utils.py:
##########
@@ -285,6 +286,7 @@ def generate_pages(
     :param sorting_key: the sorting key selected for dags, None indicates that 
sorting is not needed/provided
     :param sorting_direction: direction of sorting, 'asc' or 'desc',
     None indicates that sorting is not needed/provided
+    :param lastrun: the lastrun filter, 'running', 'failed', or None
     :return: the HTML string of the paging component
     """

Review Comment:
   The docstring mentions the pager maintaining state for "search, status, and 
tags" but this function now also preserves the `lastrun` filter. Update the 
descriptive text in the docstring so it stays consistent with the new behavior.



##########
airflow/www/views.py:
##########
@@ -1123,6 +1123,7 @@ def _iter_parsed_moved_data_table_names():
                 tags=arg_tags_filter or None,
                 sorting_key=arg_sorting_key or None,
                 sorting_direction=arg_sorting_direction or None,
+                lastrun=arg_lastrun_filter or None,
             ),

Review Comment:
   The PR title/description references fixing #55017 (and cites PR #55846 for 
that issue), but this PR is marked `closes: #53712`. If this change is intended 
for #55017, the `closes:` reference should be updated; if it’s intended for 
#53712, consider updating the title/description to avoid confusion for release 
notes and issue tracking.



##########
airflow/www/utils.py:
##########
@@ -262,6 +262,7 @@ def generate_pages(
     window=7,
     sorting_key=None,
     sorting_direction=None,
+    lastrun=None,
 ):

Review Comment:
   Consider adding/adjusting unit tests to cover the new `lastrun` parameter 
propagation in pagination links (e.g. ensure `generate_pages(..., 
lastrun="failed")` includes `lastrun=failed` in the generated query strings). 
The existing `tests/www/test_utils.py` assertions cover `search`/sorting but do 
not exercise this new filter parameter, so a regression test would help prevent 
this from breaking again.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to