The GitHub Actions job "Tests (AMD)" on airflow.git/backport-1baee0b-v3-3-test 
has succeeded.
Run started by GitHub user potiuk (triggered by potiuk).

Head commit for run:
d2df5cd2fcf88da2a0ccf43d3788c39d9881af3d / Jarek Potiuk <[email protected]>
[v3-3-test] Do not import the stored path when rebuilding a Callback from 
serialized data (#70704)

* Do not import the stored path when rebuilding a Callback from serialized data

Callback.get_callback_path imports the module named by a dotted-path string in
order to check that it resolves to a callable. That check is best effort: the
ImportError is logged and swallowed, and the path is returned either way,
because the callable may only exist on the host that will run it.

Rebuilding a Callback from its serialized form went through the same path, so
deserializing one imported the module named in the stored data. The path was
already checked when the Callback was first created, and reconstruction happens
in components that never call the callback themselves, so importing there is
neither needed nor wanted.

Carry a path read back from serialized data in a private str subclass, and
return it unchanged instead of resolving it a second time. Construction from a
Dag author's callable or dotted path is unaffected, including the dot-path
shape check, which still applies to stored paths as well.

Generated-by: Claude Opus 5 (1M context) following the guidelines at
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions

* Keep the reason for skipping resolution at one site

The class docstring, the branch and deserialize all narrated the same decision.
(cherry picked from commit 1baee0bf987eb220f15398e43572e1ed819a0130)

Co-authored-by: Jarek Potiuk <[email protected]>

Report URL: https://github.com/apache/airflow/actions/runs/30868345913

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to