You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2026/01/07 07:58:23 UTC
(airflow) branch v3-1-test updated (7cd1abd95af -> 8209d737b1e)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a change to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
from 7cd1abd95af [v3-1-test] Update french translation for 3.1.6 (#60157) (#60167)
new e20c1570a5c Add toggle functionality to Dags state filters (#59089)
new cbc1f72bc0b Revert "docs: Improve unit-testing docs with runnable pytest examples for Operators (#58969)" (#60035)
new 8209d737b1e Fix text overflow issue (#60080)
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
airflow-core/docs/best-practices.rst | 98 ----------------------
.../ui/src/components/ui/InputWithAddon.tsx | 3 +-
.../src/pages/DagsList/DagsFilters/DagsFilters.tsx | 14 +++-
3 files changed, 13 insertions(+), 102 deletions(-)
(airflow) 01/03: Add toggle functionality to Dags state filters (#59089)
Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit e20c1570a5cb5573328136bc18e2d0459542135b
Author: Yeonguk Choo <ch...@gmail.com>
AuthorDate: Mon Dec 8 23:45:02 2025 +0900
Add toggle functionality to Dags state filters (#59089)
(cherry picked from commit 92d2f87572a244c083254648af535b365f9d6e92)
---
.../ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx b/airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx
index 334f467b77b..5b413ab012c 100644
--- a/airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx
@@ -116,9 +116,17 @@ export const DagsFilters = () => {
searchParams.delete(LAST_DAG_RUN_STATE_PARAM);
searchParams.delete(NEEDS_REVIEW_PARAM);
} else if (value === "needs_review") {
- searchParams.set(NEEDS_REVIEW_PARAM, "true");
+ if (needsReview === "true") {
+ searchParams.delete(NEEDS_REVIEW_PARAM);
+ } else {
+ searchParams.set(NEEDS_REVIEW_PARAM, "true");
+ }
} else {
- searchParams.set(LAST_DAG_RUN_STATE_PARAM, value);
+ if (state === value) {
+ searchParams.delete(LAST_DAG_RUN_STATE_PARAM);
+ } else {
+ searchParams.set(LAST_DAG_RUN_STATE_PARAM, value);
+ }
}
setTableURLState({
pagination: { ...pagination, pageIndex: 0 },
@@ -127,7 +135,7 @@ export const DagsFilters = () => {
searchParams.delete(OFFSET_PARAM);
setSearchParams(searchParams);
},
- [pagination, searchParams, setSearchParams, setTableURLState, sorting],
+ [pagination, searchParams, setSearchParams, setTableURLState, sorting, needsReview, state],
);
const handleSelectTagsChange = useCallback(
(airflow) 03/03: Fix text overflow issue (#60080)
Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 8209d737b1e2316d51825e1ffd04fa10f9d71ce9
Author: Harsh Thakur <73...@users.noreply.github.com>
AuthorDate: Sat Jan 3 20:24:31 2026 +0530
Fix text overflow issue (#60080)
(cherry picked from commit e3345fdf79a50bb3e6009f776f2151b47c1ec8c6)
---
airflow-core/src/airflow/ui/src/components/ui/InputWithAddon.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/airflow-core/src/airflow/ui/src/components/ui/InputWithAddon.tsx b/airflow-core/src/airflow/ui/src/components/ui/InputWithAddon.tsx
index b5a49e6cdf8..52e88ce757d 100644
--- a/airflow-core/src/airflow/ui/src/components/ui/InputWithAddon.tsx
+++ b/airflow-core/src/airflow/ui/src/components/ui/InputWithAddon.tsx
@@ -36,7 +36,8 @@ export const InputWithAddon = React.forwardRef<HTMLInputElement, InputWithAddonP
borderColor="border"
borderRadius="full"
display="flex"
- width={width}
+ minWidth={width}
+ width="auto"
>
<Text
bg="gray.muted"
(airflow) 02/03: Revert "docs: Improve unit-testing docs with runnable pytest examples for Operators (#58969)" (#60035)
Posted by ep...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit cbc1f72bc0bbb74624b1d3d6f6a8079354473e71
Author: Tzu-ping Chung <ur...@gmail.com>
AuthorDate: Fri Jan 2 15:40:13 2026 +0800
Revert "docs: Improve unit-testing docs with runnable pytest examples for Operators (#58969)" (#60035)
This reverts commit 652d4ee983ff0cb0007c054f1ead43f329e12905.
(cherry picked from commit 31b698fe381cb782fb65edea800c77baa9572fd7)
---
airflow-core/docs/best-practices.rst | 98 ------------------------------------
1 file changed, 98 deletions(-)
diff --git a/airflow-core/docs/best-practices.rst b/airflow-core/docs/best-practices.rst
index b7f2b69f3c1..b818e174f32 100644
--- a/airflow-core/docs/best-practices.rst
+++ b/airflow-core/docs/best-practices.rst
@@ -650,104 +650,6 @@ want to optimize your Dags there are the following actions you can take:
Testing a Dag
^^^^^^^^^^^^^
-Testing Operators with pytest
------------------------------
-
-Below are two recommended, runnable patterns for unit-testing custom operators
-with pytest. Both examples work with Airflow 3.x.
-
-1. Using ``TaskInstance.run()``
-2. Using ``dag.create_dagrun()``
-
-Example: Using ``EmptyOperator``
-
- from airflow.operators.empty import EmptyOperator
-
- task = EmptyOperator(task_id="empty_task")
-
-
-Example 1: Testing using ``TaskInstance.run()``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This pattern constructs a Dag, creates a ``TaskInstance`` manually,
-and runs it directly.
-
-.. code-block:: python
-
- import pendulum
-
- from airflow.models.dag import DAG
- from airflow.models.taskinstance import TaskInstance
- from airflow.utils.state import TaskInstanceState
- from airflow.operators.empty import EmptyOperator
-
-
- def test_empty_operator_with_ti_run():
- with DAG(
- dag_id="test_empty_operator_ti_run",
- start_date=pendulum.datetime(2024, 1, 1, tz="UTC"),
- schedule=None,
- ) as dag:
- task = EmptyOperator(task_id="empty_task")
-
- ti = TaskInstance(task=task, run_id="test_run")
- ti.run(ignore_ti_state=True)
-
- assert ti.state == TaskInstanceState.SUCCESS
-
-
-Example 2: Testing using ``dag.create_dagrun()``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This pattern creates a full Dag run and then runs the TaskInstance
-associated with that Dag run.
-
-.. code-block:: python
-
- import pendulum
-
- from airflow.models.dag import DAG
- from airflow.utils.state import TaskInstanceState
- from airflow.operators.empty import EmptyOperator
-
-
- def test_empty_operator_with_dagrun():
- with DAG(
- dag_id="test_empty_operator_dagrun",
- start_date=pendulum.datetime(2024, 1, 1, tz="UTC"),
- schedule=None,
- ) as dag:
- task = EmptyOperator(task_id="empty_task")
-
- dagrun = dag.create_dagrun(
- run_id="test_run",
- state="success",
- execution_date=pendulum.datetime(2024, 1, 1, tz="UTC"),
- start_date=pendulum.datetime(2024, 1, 1, tz="UTC"),
- data_interval=(
- pendulum.datetime(2024, 1, 1, tz="UTC"),
- pendulum.datetime(2024, 1, 1, tz="UTC"),
- ),
- logical_date=pendulum.datetime(2024, 1, 1, tz="UTC"),
- )
-
- ti = dagrun.get_task_instance("empty_task")
- ti.run(ignore_ti_state=True)
-
- assert ti.state == TaskInstanceState.SUCCESS
-
-
-Notes
-~~~~~
-
-* ``dag.test()`` should not be used inside pytest for Airflow 3.x because Dag
- serialization is inactive.
-* Both examples above run completely inside pytest without requiring
- any Dag serialization or scheduler.
-* Use mocking for external services when needed.
-
-
-
Airflow users should treat Dags as production level code, and Dags should have various associated tests to
ensure that they produce expected results. You can write a wide variety of tests for a Dag.
Let's take a look at some of them.