potiuk commented on code in PR #77520:
URL: https://github.com/apache/airflow/pull/77520#discussion_r4676829019
##########
task-sdk/docs/concepts.rst:
##########
@@ -54,6 +54,14 @@ Understanding the task lifecycle helps Dag authors write
more effective tasks an
- **XCom Operations**: Upon successful task completion (or when explicitly
invoked during execution), the Supervisor issues API calls to set or clear XCom
entries for inter-task data passing.
- **State Patch**: When the task reaches a terminal (success/failed),
deferred, or rescheduled state, the Supervisor invokes ``PATCH /state`` with
the final task status and metadata.
+Rendered Template Field Order
Review Comment:
**New operator-author knob documented away from the related attribute**
This section sits between the task-lifecycle list and "Supervisor & Task
Runner" in a page about
runtime machinery, where operator authors are unlikely to look.
`template_fields_renderers` is
documented in `airflow-core/docs/howto/custom-operator.rst` (templating
section); documenting
`template_fields_sort_keys` next to it would make the new knob discoverable.
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1418,15 +1418,15 @@ def serialize_object(obj):
# Use inspect.getattr_static to bypass any custom __getattr__ /
metaclass magic
if callable(inspect.getattr_static(obj, "serialize", None)):
- return serialize_object(obj.serialize())
+ return serialize_object(obj.serialize()) # type:
ignore[attr-defined]
Review Comment:
**Unrelated annotation change adds type: ignore comments**
Narrowing `obj` from implicit `Any` to `object` is what forces the two new
`# type: ignore[attr-defined]` comments (here and on the `to_dict()`
branch). That typing
cleanup is unrelated to the sort-keys feature; either keep `Any` for `obj`
or split the
annotation change into its own PR so this one stays focused.
--
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]