kaxil commented on code in PR #53627: URL: https://github.com/apache/airflow/pull/53627#discussion_r2222070204
########## pyproject.toml: ########## @@ -802,6 +802,130 @@ testing = ["dev", "providers.tests", "tests_common", "tests", "system", "unit", # mechanism and whole .pyi is really "type-checking" only "providers/common/sql/src/airflow/providers/common/sql/hooks/sql.pyi" = ["TID253"] +# Allow Task SDK and its tests to import from task SDK +"task-sdk/**" = ["TID251"] + +# devel-common has test utilities, ok to have SDK imports here +"devel-common/**" = ["TID251"] + +# Allow providers to import from Task SDK because they are consumers of the task SDK +"providers/**" = ["TID251"] + +#Ideally, we shouldn't have any imports from airflow-core in the airflow-core tests, but should be OK for now +"airflow-core/tests/**" = ["TID251"] + +# TODO: check usages here, suspicious about these +"scripts/**" = ["TID251"] +"dev/**" = ["TID251"] +"performance/**" = ["TID251"] +"kubernetes-tests/tests/kubernetes_tests/test_kubernetes_pod_operator.py" = ["TID251"] + +# Temporarily allow existing SDK imports in core files while preventing new ones +# TODO: These files need to be refactored to remove SDK coupling +"airflow-core/src/airflow/api/common/mark_tasks.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/datamodels/assets.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/datamodels/hitl.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/datamodels/variables.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/routes/ui/structure.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/services/ui/connections.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/execution_api/routes/hitl.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/logging/decorators.py" = ["TID251"] +"airflow-core/src/airflow/assets/evaluation.py" = ["TID251"] +"airflow-core/src/airflow/assets/manager.py" = ["TID251"] +"airflow-core/src/airflow/cli/commands/connection_command.py" = ["TID251"] +"airflow-core/src/airflow/cli/commands/task_command.py" = ["TID251"] +"airflow-core/src/airflow/configuration.py" = ["TID251"] +"airflow-core/src/airflow/dag_processing/collection.py" = ["TID251"] +"airflow-core/src/airflow/dag_processing/manager.py" = ["TID251"] +"airflow-core/src/airflow/dag_processing/processor.py" = ["TID251"] +"airflow-core/src/airflow/datasets/metadata.py" = ["TID251"] +"airflow-core/src/airflow/decorators/__init__.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_asset_alias.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_asset_alias_with_no_taskflow.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_asset_decorator.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_asset_with_watchers.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_assets.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_branch_labels.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_branch_python_dop_operator_3.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_complex.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_custom_weight.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_dag_decorator.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_display_name.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_dynamic_task_mapping.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_dynamic_task_mapping_with_no_taskflow_operators.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_inlet_event_extra.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_kubernetes_executor.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_latest_only_with_trigger.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_local_kubernetes_executor.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_nested_branch_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_outlet_event_extra.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_params_trigger_ui.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_params_ui_tutorial.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_passing_params_via_test_command.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_setup_teardown.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_setup_teardown_taskflow.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_simplest_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_skip_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_task_group.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_task_group_decorator.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_time_delta_sensor_async.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_trigger_target_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_workday_timetable.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_xcom.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_xcomargs.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/plugins/event_listener.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_objectstorage.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_taskflow_api.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_taskflow_api_virtualenv.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_taskflow_templates.py" = ["TID251"] Review Comment: We should just ignore the entre `example_dags` folder ########## pyproject.toml: ########## @@ -802,6 +802,130 @@ testing = ["dev", "providers.tests", "tests_common", "tests", "system", "unit", # mechanism and whole .pyi is really "type-checking" only "providers/common/sql/src/airflow/providers/common/sql/hooks/sql.pyi" = ["TID253"] +# Allow Task SDK and its tests to import from task SDK +"task-sdk/**" = ["TID251"] + +# devel-common has test utilities, ok to have SDK imports here +"devel-common/**" = ["TID251"] + +# Allow providers to import from Task SDK because they are consumers of the task SDK +"providers/**" = ["TID251"] + +#Ideally, we shouldn't have any imports from airflow-core in the airflow-core tests, but should be OK for now +"airflow-core/tests/**" = ["TID251"] + +# TODO: check usages here, suspicious about these +"scripts/**" = ["TID251"] +"dev/**" = ["TID251"] +"performance/**" = ["TID251"] +"kubernetes-tests/tests/kubernetes_tests/test_kubernetes_pod_operator.py" = ["TID251"] + +# Temporarily allow existing SDK imports in core files while preventing new ones +# TODO: These files need to be refactored to remove SDK coupling +"airflow-core/src/airflow/api/common/mark_tasks.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/datamodels/assets.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/datamodels/hitl.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/datamodels/variables.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/routes/ui/structure.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/services/ui/connections.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/execution_api/routes/hitl.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py" = ["TID251"] +"airflow-core/src/airflow/api_fastapi/logging/decorators.py" = ["TID251"] +"airflow-core/src/airflow/assets/evaluation.py" = ["TID251"] +"airflow-core/src/airflow/assets/manager.py" = ["TID251"] +"airflow-core/src/airflow/cli/commands/connection_command.py" = ["TID251"] +"airflow-core/src/airflow/cli/commands/task_command.py" = ["TID251"] +"airflow-core/src/airflow/configuration.py" = ["TID251"] +"airflow-core/src/airflow/dag_processing/collection.py" = ["TID251"] +"airflow-core/src/airflow/dag_processing/manager.py" = ["TID251"] +"airflow-core/src/airflow/dag_processing/processor.py" = ["TID251"] +"airflow-core/src/airflow/datasets/metadata.py" = ["TID251"] +"airflow-core/src/airflow/decorators/__init__.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_asset_alias.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_asset_alias_with_no_taskflow.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_asset_decorator.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_asset_with_watchers.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_assets.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_branch_labels.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_branch_python_dop_operator_3.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_complex.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_custom_weight.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_dag_decorator.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_display_name.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_dynamic_task_mapping.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_dynamic_task_mapping_with_no_taskflow_operators.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_inlet_event_extra.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_kubernetes_executor.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_latest_only_with_trigger.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_local_kubernetes_executor.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_nested_branch_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_outlet_event_extra.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_params_trigger_ui.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_params_ui_tutorial.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_passing_params_via_test_command.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_setup_teardown.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_setup_teardown_taskflow.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_simplest_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_skip_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_task_group.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_task_group_decorator.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_time_delta_sensor_async.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_trigger_target_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_workday_timetable.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_xcom.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/example_xcomargs.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/plugins/event_listener.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_dag.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_objectstorage.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_taskflow_api.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_taskflow_api_virtualenv.py" = ["TID251"] +"airflow-core/src/airflow/example_dags/tutorial_taskflow_templates.py" = ["TID251"] Review Comment: We should just ignore the entire `example_dags` folder -- 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]
