nikolauspschuetz commented on code in PR #69087:
URL: https://github.com/apache/airflow/pull/69087#discussion_r3487380605


##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -701,22 +701,24 @@ def prepare_callback_bundle(self, request: 
CallbackRequest) -> BaseDagBundle | N
         Return the bundle to run the callback against, or ``None`` to skip the 
callback.
 
         Default implementation looks the bundle up via 
:class:`DagBundlesManager` and, for
-        versioned requests on bundles that support versioning, calls 
``bundle.initialize()``.
-        Override to source the bundle from an API.
+        bundles that support versioning, calls ``bundle.initialize()`` so 
``bundle.path`` is
+        resolved before the caller reads it. This happens even when 
``request.bundle_version``
+        is ``None`` (e.g. ``disable_bundle_versioning=True``), in which case 
the bundle resolves
+        its current effective version. Override to source the bundle from an 
API.
         """
         try:
             bundle = DagBundlesManager().get_bundle(name=request.bundle_name, 
version=request.bundle_version)
         except ValueError:
             self.log.error("Bundle %s no longer configured, skipping 
callback", request.bundle_name)
             return None
-        if bundle.supports_versioning and request.bundle_version:
+        if bundle.supports_versioning:
             try:
                 bundle.initialize()
             except Exception:
                 self.log.exception(
                     "Error initializing bundle %s version %s for callback, 
skipping",
                     request.bundle_name,
-                    request.bundle_version,
+                    request.bundle_version or "latest",
                 )

Review Comment:
   Good catch — fixed in the latest push. Switched the log argument from 
`request.bundle_version or "latest"` to `request.bundle_version if 
request.bundle_version is not None else "latest"`, so a valid empty-string 
version is no longer misreported as `latest`. `None` is the sentinel for 
"current effective version" on this path, so the explicit `is None` check is 
the correct distinction. Only the error-log message changed; control flow and 
bundle resolution are unaffected.
   
   ---
   Drafted-by: Claude Code (Opus 4.8) (no human review before posting)



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