Copilot commented on code in PR #60772:
URL: https://github.com/apache/airflow/pull/60772#discussion_r2704125336
##########
airflow-core/src/airflow/ui/src/pages/DagRuns.tsx:
##########
@@ -199,8 +201,10 @@ export const DagRuns = () => {
const filteredTriggeringUserNamePattern =
searchParams.get(TRIGGERING_USER_NAME_PATTERN_PARAM);
const filteredDagIdPattern = searchParams.get(DAG_ID_PATTERN_PARAM);
const filteredDagVersion = searchParams.get(DAG_VERSION_PARAM);
- const startDate = searchParams.get(START_DATE_PARAM);
- const endDate = searchParams.get(END_DATE_PARAM);
+ const startDateGte = searchParams.get(START_DATE_GTE_PARAM);
Review Comment:
The change from START_DATE to START_DATE_GTE/START_DATE_LTE will break
existing links from the Dashboard HistoricalMetrics components. The
DagRunMetrics.tsx and MetricSection.tsx components use
SearchParamsKeys.START_DATE to create links to the DAG Runs page. With this
change, those links will no longer function as expected because DagRuns.tsx now
only reads START_DATE_GTE_PARAM and START_DATE_LTE_PARAM. Consider maintaining
backward compatibility by supporting both the old START_DATE parameter (mapping
it to START_DATE_GTE) and the new START_DATE_GTE/LTE parameters, or update the
Dashboard components to use the new parameter names.
```suggestion
const startDateGte =
searchParams.get(START_DATE_GTE_PARAM) ??
searchParams.get(SearchParamsKeys.START_DATE_PARAM);
```
##########
airflow-core/src/airflow/ui/src/pages/DagRuns.tsx:
##########
@@ -218,15 +222,17 @@ export const DagRuns = () => {
filteredDagVersion !== null && filteredDagVersion !== "" ?
[Number(filteredDagVersion)] : undefined,
durationGte: durationGte !== null && durationGte !== "" ?
Number(durationGte) : undefined,
durationLte: durationLte !== null && durationLte !== "" ?
Number(durationLte) : undefined,
- endDateLte: endDate ?? undefined,
+ endDateGte: endDateGte ?? undefined,
+ endDateLte: endDateLte ?? undefined,
Review Comment:
The change from END_DATE to END_DATE_GTE/END_DATE_LTE will break existing
links from the Dashboard HistoricalMetrics components. The DagRunMetrics.tsx,
TaskInstanceMetrics.tsx, and MetricSection.tsx components use
SearchParamsKeys.END_DATE to create links to the DAG Runs page. With this
change, those links will no longer function as expected because DagRuns.tsx now
only reads END_DATE_GTE_PARAM and END_DATE_LTE_PARAM. Consider maintaining
backward compatibility by supporting both the old END_DATE parameter (mapping
it to END_DATE_LTE) and the new END_DATE_GTE/LTE parameters, or update the
Dashboard components to use the new parameter names.
```suggestion
endDateLte: (endDateLte ?? searchParams.get("end_date")) ?? undefined,
```
--
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]