Lee-W commented on code in PR #62442:
URL: https://github.com/apache/airflow/pull/62442#discussion_r2850475390


##########
.github/instructions/code-review.instructions.md:
##########
@@ -0,0 +1,69 @@
+---
+applyTo: "**"
+excludeAgent: "coding-agent"
+---
+
+# Airflow Code Review Instructions
+
+Use these rules when reviewing pull requests to the Apache Airflow repository.
+
+## Architecture Boundaries
+
+- **Scheduler must never run user code.** It only processes serialized DAGs. 
Flag any scheduler-path code that deserializes or executes DAG/task code.
+- **Workers must not access the metadata DB directly.** Task execution 
communicates with the API server through the Execution API (`/execution` 
endpoints) only.
+- **DAG Processor and Triggerer run user code in isolated processes.** Code in 
these components should maintain that isolation.
+- **Providers must not import core internals** like `SUPERVISOR_COMMS` or 
task-runner plumbing. Providers interact through the public SDK and execution 
API only.
+
+## Database and Query Correctness
+
+- **N+1 queries**: Flag SQLAlchemy queries that access relationships inside 
loops without `joinedload()` or `selectinload()`.
+- **`run_id` is only unique per DAG.** Queries that group, partition, or join 
on `run_id` alone (without `dag_id`) will collide across DAGs. Always require 
`(dag_id, run_id)` together.

Review Comment:
   ```suggestion
   - **`run_id` is only unique per Dag.** Queries that group, partition, or 
join on `run_id` alone (without `dag_id`) will collide across Dags. Always 
require `(dag_id, run_id)` together.
   ```



##########
.github/instructions/code-review.instructions.md:
##########
@@ -0,0 +1,69 @@
+---
+applyTo: "**"
+excludeAgent: "coding-agent"
+---
+
+# Airflow Code Review Instructions
+
+Use these rules when reviewing pull requests to the Apache Airflow repository.
+
+## Architecture Boundaries
+
+- **Scheduler must never run user code.** It only processes serialized DAGs. 
Flag any scheduler-path code that deserializes or executes DAG/task code.
+- **Workers must not access the metadata DB directly.** Task execution 
communicates with the API server through the Execution API (`/execution` 
endpoints) only.
+- **DAG Processor and Triggerer run user code in isolated processes.** Code in 
these components should maintain that isolation.

Review Comment:
   ```suggestion
   - **Dag Processor and Triggerer run user code in isolated processes.** Code 
in these components should maintain that isolation.
   ```



##########
.github/instructions/code-review.instructions.md:
##########
@@ -0,0 +1,69 @@
+---
+applyTo: "**"
+excludeAgent: "coding-agent"
+---
+
+# Airflow Code Review Instructions
+
+Use these rules when reviewing pull requests to the Apache Airflow repository.
+
+## Architecture Boundaries
+
+- **Scheduler must never run user code.** It only processes serialized DAGs. 
Flag any scheduler-path code that deserializes or executes DAG/task code.

Review Comment:
   ```suggestion
   - **Scheduler must never run user code.** It only processes serialized Dags. 
Flag any scheduler-path code that deserializes or executes Dag/task code.
   ```



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