RabahAmrouche05 commented on code in PR #68544:
URL: https://github.com/apache/airflow/pull/68544#discussion_r3501908510


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dags.py:
##########
@@ -418,3 +418,92 @@ def test_is_favorite_field_user_specific(self, 
test_client, session):
         # Verify that DAG1 is not marked as favorite for the test user
         dag1_data = next(dag for dag in body["dags"] if dag["dag_id"] == 
DAG1_ID)
         assert dag1_data["is_favorite"] is False
+
+
+# Maps dag_id -> relative_fileloc. ``team_alpha`` exists to prove that a folder
+# name is never matched as a prefix of another (``team_a`` must not catch it),
+# and ``root_dag.py`` lives at the bundle root (no folder).
+FOLDER_DAGS = {
+    "folder_dag_a_etl_extract": "team_a/etl/extract.py",
+    "folder_dag_a_etl_load": "team_a/etl/load.py",
+    "folder_dag_a_report": "team_a/report.py",
+    "folder_dag_b_ml_train": "team_b/ml/train.py",
+    "folder_dag_alpha": "team_alpha/x.py",
+    "folder_dag_root": "root_dag.py",
+}
+
+
+class TestDagFolders(TestPublicDagEndpoint):

Review Comment:
   Added `test_get_dag_folders_query_count_does_not_scale_with_dags`: it 
captures the query count, adds 50 more Dags across new folders, then asserts 
the count is unchanged — locking in that the endpoint stays at a finite number 
of queries and never scales with the number of Dags.



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