pierrejeambrun commented on code in PR #55735:
URL: https://github.com/apache/airflow/pull/55735#discussion_r2376297803
##########
airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx:
##########
@@ -61,6 +79,31 @@ export const useFilterConfigs = () => {
label: translate("common:dagId"),
type: FilterTypes.TEXT,
},
+ [SearchParamsKeys.DAG_ID_PATTERN]: {
+ hotkeyDisabled: true,
+ icon: <DagIcon />,
+ label: translate("common:dagId"),
+ type: FilterTypes.TEXT,
+ },
+ [SearchParamsKeys.DAG_VERSION]: {
+ hotkeyDisabled: true,
+ icon: <MdHistory />,
+ label: translate("common:dagRun.dagVersions"),
+ min: 1,
+ type: FilterTypes.NUMBER,
+ },
+ [SearchParamsKeys.DURATION_GTE]: {
+ icon: <MdHourglassEmpty />,
+ label: translate("common:filters.durationFrom", "Duration From"), // To
do: add translation key and remove default value
Review Comment:
Did we miss these two 'todos' ?
Looks like we can do it now, I just marked the PR for `3.1.1` to no break
the translation freeze and you can go ahead and do that change.
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dag_run.py:
##########
@@ -178,23 +194,45 @@ def get_dag_versions_dict(dag_versions: list[DagVersion])
-> list[dict]:
]
+def format_datetime_like_api(dt: datetime | None) -> str | None:
+ """
+ Format datetime to match API output behavior.
+
+ The API serializes datetimes with microseconds only when they are non-zero:
+ - 2024-01-15T00:00:00Z (for times with zero microseconds)
+ - 2024-01-15T00:01:40.500000Z (for times with non-zero microseconds)
+
+ This function ensures test expectations match the actual API behavior.
+ If API datetime serialization changes in the future, only this function
needs updating.
+
Review Comment:
I never realized that.
IT's super weird.
--
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]