You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "AryanK1511 (via GitHub)" <gi...@apache.org> on 2025/08/01 00:32:51 UTC

[PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   
   This PR closes #53739 and adds support for filtering by DAG bundle name and version in both the public and UI API routes. Tests are included.
   
   ---
   


-- 
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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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


-- 
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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -82,6 +82,10 @@ def setup_dag_runs(self, session=None) -> None:
             # Search
             ({"dag_id_pattern": "1"}, [DAG1_ID], 6),
             ({"dag_display_name_pattern": "test_dag2"}, [DAG2_ID], 5),
+            # Bundle filters
+            ({"bundle_name": "dag_maker"}, [DAG1_ID, DAG2_ID], 11),
+            ({"bundle_name": "wrong_bundle"}, [], 0),
+            ({"bundle_version": "1.0.0"}, [], 0),

Review Comment:
   Updating the bundle_version in the parent setup `TestDagEndpoint`



-- 
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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -82,6 +82,10 @@ def setup_dag_runs(self, session=None) -> None:
             # Search
             ({"dag_id_pattern": "1"}, [DAG1_ID], 6),
             ({"dag_display_name_pattern": "test_dag2"}, [DAG2_ID], 5),
+            # Bundle filters
+            ({"bundle_name": "dag_maker"}, [DAG1_ID, DAG2_ID], 11),
+            ({"bundle_name": "wrong_bundle"}, [], 0),
+            ({"bundle_version": "1.0.0"}, [], 0),

Review Comment:
   Oh it seems that I messed up something while writing the tests. It's all fixed now and ready to review. 



-- 
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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

Posted by "AryanK1511 (via GitHub)" <gi...@apache.org>.
AryanK1511 commented on PR #54004:
URL: https://github.com/apache/airflow/pull/54004#issuecomment-3150311458

   Everything should be fixed now. I added some tests for bundle filters as well. 
   


-- 
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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -82,6 +82,10 @@ def setup_dag_runs(self, session=None) -> None:
             # Search
             ({"dag_id_pattern": "1"}, [DAG1_ID], 6),
             ({"dag_display_name_pattern": "test_dag2"}, [DAG2_ID], 5),
+            # Bundle filters
+            ({"bundle_name": "dag_maker"}, [DAG1_ID, DAG2_ID], 11),
+            ({"bundle_name": "wrong_bundle"}, [], 0),
+            ({"bundle_version": "1.0.0"}, [], 0),

Review Comment:
   There were some issues when I tried to add this test. Lemme take this back and test the version functionality manually 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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -82,6 +82,10 @@ def setup_dag_runs(self, session=None) -> None:
             # Search
             ({"dag_id_pattern": "1"}, [DAG1_ID], 6),
             ({"dag_display_name_pattern": "test_dag2"}, [DAG2_ID], 5),
+            # Bundle filters
+            ({"bundle_name": "dag_maker"}, [DAG1_ID, DAG2_ID], 11),
+            ({"bundle_name": "wrong_bundle"}, [], 0),
+            ({"bundle_version": "1.0.0"}, [], 0),

Review Comment:
   Oh it seems that I messed up something while writing the tests. It's all fixed now and ready to review. 



-- 
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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -82,6 +82,10 @@ def setup_dag_runs(self, session=None) -> None:
             # Search
             ({"dag_id_pattern": "1"}, [DAG1_ID], 6),
             ({"dag_display_name_pattern": "test_dag2"}, [DAG2_ID], 5),
+            # Bundle filters
+            ({"bundle_name": "dag_maker"}, [DAG1_ID, DAG2_ID], 11),
+            ({"bundle_name": "wrong_bundle"}, [], 0),
+            ({"bundle_version": "1.0.0"}, [], 0),

Review Comment:
   Can we also add a test case where filtering by "bundle_version" return some results? 



-- 
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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -82,6 +82,10 @@ def setup_dag_runs(self, session=None) -> None:
             # Search
             ({"dag_id_pattern": "1"}, [DAG1_ID], 6),
             ({"dag_display_name_pattern": "test_dag2"}, [DAG2_ID], 5),
+            # Bundle filters
+            ({"bundle_name": "dag_maker"}, [DAG1_ID, DAG2_ID], 11),
+            ({"bundle_name": "wrong_bundle"}, [], 0),
+            ({"bundle_version": "1.0.0"}, [], 0),

Review Comment:
   Sounds good! Will do right now



-- 
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


Re: [PR] Add Filtering by DAG Bundle Name and Version to Public and UI API Routes [airflow]

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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -82,6 +82,10 @@ def setup_dag_runs(self, session=None) -> None:
             # Search
             ({"dag_id_pattern": "1"}, [DAG1_ID], 6),
             ({"dag_display_name_pattern": "test_dag2"}, [DAG2_ID], 5),
+            # Bundle filters
+            ({"bundle_name": "dag_maker"}, [DAG1_ID, DAG2_ID], 11),
+            ({"bundle_name": "wrong_bundle"}, [], 0),
+            ({"bundle_version": "1.0.0"}, [], 0),

Review Comment:
   Oh I think it's because we never specify the `bundle_version` in the dag maker.



##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -82,6 +82,10 @@ def setup_dag_runs(self, session=None) -> None:
             # Search
             ({"dag_id_pattern": "1"}, [DAG1_ID], 6),
             ({"dag_display_name_pattern": "test_dag2"}, [DAG2_ID], 5),
+            # Bundle filters
+            ({"bundle_name": "dag_maker"}, [DAG1_ID, DAG2_ID], 11),
+            ({"bundle_name": "wrong_bundle"}, [], 0),
+            ({"bundle_version": "1.0.0"}, [], 0),

Review Comment:
   Oh I think it's because we never specify the `bundle_version` in the dag maker, maybe we should for one test.



-- 
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