sunank200 commented on code in PR #52196:
URL: https://github.com/apache/airflow/pull/52196#discussion_r2182261728


##########
task-sdk/docs/concepts.rst:
##########
@@ -0,0 +1,62 @@
+.. 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.
+
+Concepts
+========
+
+This section covers the fundamental concepts that DAG authors need to 
understand when working with the Task SDK.
+
+.. note::
+
+    For information about Airflow 3.x architectural changes and database 
access restrictions, see the "Upgrading to Airflow 3" guide in the main Airflow 
documentation.
+
+Terminology
+-----------
+- **Task**: a Python function (decorated with ``@task``) or Operator 
invocation representing a unit of work in a DAG.
+- **Task Execution**: the runtime machinery that executes user tasks in 
isolated subprocesses, managed via the Supervisor and Execution API.
+
+Task Lifecycle
+--------------
+
+Understanding the task lifecycle helps DAG authors write more effective tasks 
and debug issues:
+
+- **Scheduled**: The Airflow scheduler enqueues the task instance. The 
Executor assigns a workload token used for subsequent API authentication and 
validation.
+- **Queued**: Workers poll the queue to retrieve and reserve queued task 
instances.
+- **Subprocess Launch**: The worker's Supervisor process spawns a dedicated 
subprocess (Task Runner) for the task instance, isolating its execution.
+- **Run API Call**: The Supervisor sends a ``POST /run`` call to the Execution 
API to mark the task as running; the API server responds with a 
``TIRunContext`` (including retry limits, fail-fast flags, etc.).

Review Comment:
   Sure



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to