You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2025/02/20 11:19:09 UTC
[I] Remove airflow.models reference in asset decorator [airflow]
uranusjr opened a new issue, #46927:
URL: https://github.com/apache/airflow/issues/46927
### Body
https://github.com/apache/airflow/blob/b95990b3267ab2bbd8f6751f89c61ae7e7c33974/task_sdk/src/airflow/sdk/definitions/asset/decorators.py#L167-L181
Currently I get an error if this is switched to use DAG from SDK
```
airflow/dag_processing/collection.py:337: in update_dag_parsing_results_in_db
DAG.bulk_write_to_db(bundle_name, bundle_version, dags, session=session)
airflow/utils/session.py:98: in wrapper
return func(*args, **kwargs)
airflow/models/dag.py:1879: in bulk_write_to_db
dag_op.update_dags(orm_dags, session=session)
airflow/dag_processing/collection.py:430: in update_dags
dm.default_view = dag.default_view or conf.get("webserver", "dag_default_view").lower()
AttributeError: 'DAG' object has no attribute 'default_view'
```
The `default_view` concept should go away at some point (since the old UI itself is out the way out), but I’m not sure why using the SDK DAG directly does not result in an error. Need to investigate and find a solution.
### Committer
- [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
--
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Remove airflow.models reference in asset decorator [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on issue #46927:
URL: https://github.com/apache/airflow/issues/46927#issuecomment-2792076783
closed by https://github.com/apache/airflow/pull/47602
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Remove airflow.models reference in asset decorator [airflow]
Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on issue #46927:
URL: https://github.com/apache/airflow/issues/46927#issuecomment-2673816417
Turns out core tests cannot correctly load SDK DAGs yet. Let’s wait a bit…
https://github.com/apache/airflow/blob/a54d1d9a2eb2517f4ba6501a06972ac9a5fe4c38/tests_common/test_utils/db.py#L60-L80
DagBag needs to be able to correctly handle DAG from SDK.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Remove airflow.models reference in asset decorator [airflow]
Posted by "phanikumv (via GitHub)" <gi...@apache.org>.
phanikumv commented on issue #46927:
URL: https://github.com/apache/airflow/issues/46927#issuecomment-2703578612
Have we made any progress yet on this? @uranusjr
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Remove airflow.models reference in asset decorator [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed issue #46927: Remove airflow.models reference in asset decorator
URL: https://github.com/apache/airflow/issues/46927
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Remove airflow.models reference in asset decorator [airflow]
Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on issue #46927:
URL: https://github.com/apache/airflow/issues/46927#issuecomment-2720310550
Moving to https://github.com/apache/airflow/pull/47602 instead.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Remove airflow.models reference in asset decorator [airflow]
Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on issue #46927:
URL: https://github.com/apache/airflow/issues/46927#issuecomment-2705588262
This is being worked on in #46956 but there are a lot of things to do (turns out this is a lot more involved than just changing the reference since task sdk is not entirely completed)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org