github-actions[bot] opened a new pull request, #71042:
URL: https://github.com/apache/airflow/pull/71042

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


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