xBis7 commented on PR #56187:
URL: https://github.com/apache/airflow/pull/56187#issuecomment-3536546474

   @potiuk Green CI! I removed the dependency to `airflow-core` but I added a 
dependency to `apache-airflow`. There is no way around it because we need 
access to the airflow configuration, a few models and some other files.
   
   The tests are executed only from the shared directory therefore all imports 
starts as `airflow_shared.observability...`.
   
   For the actual files, I adjusted the imports to follow the format
   
   ```
   try:
     airflow_shared.observability...
   except ModuleNotFound:
       airflow._shared.observability...
   ```
   
   When the code is called from the shared dir, then it's `airflow_shared` but 
when it's called from the `core` or the `task-sdk`, then it's `airflow._shared`.
   
   I'm curious why that's not the case with the other shared modules where we 
can access the code from anywhere with `airflow._shared`. I suspect that it has 
to do with this line that you added under the `observability/pyproject.toml`.
   
   ```diff
   [dependency-groups]
   dev = [
       "apache-airflow-devel-common",
   +    "apache-airflow-shared-observability[all]",
   ]
   ```


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