jedcunningham commented on code in PR #44924:
URL: https://github.com/apache/airflow/pull/44924#discussion_r1884666454
##########
airflow/config_templates/config.yml:
##########
@@ -2654,3 +2654,16 @@ usage_data_collection:
example: ~
default: "True"
see_also: ":ref:`Usage data collection FAQ <usage-data-collection>`"
+dag_bundles:
+ description: |
+ Configuration for the DAG bundles. This allows Airflow to load DAGs from
different sources.
Review Comment:
@dstandish updated
##########
airflow/models/dagbundle.py:
##########
@@ -16,58 +16,20 @@
# under the License.
from __future__ import annotations
-from typing import TYPE_CHECKING
-
-import uuid6
-from sqlalchemy import Column, Integer, String
-from sqlalchemy_utils import UUIDType
+from sqlalchemy import Boolean, Column, String
from airflow.models.base import Base, StringID
-from airflow.utils.module_loading import import_string
-from airflow.utils.session import NEW_SESSION, provide_session
-from airflow.utils.sqlalchemy import ExtendedJSON, UtcDateTime
-
-if TYPE_CHECKING:
- from sqlalchemy.orm import Session
-
- from airflow.dag_processing.bundles.base import BaseDagBundle
+from airflow.utils.sqlalchemy import UtcDateTime
class DagBundleModel(Base):
- """A table for DAG Bundle config."""
+ """A table for DAG Bundle information."""
Review Comment:
maybe add a few reasons why we have this in the first place:
- place for cli/api commands to know what the latest version Airflow knows
about is, when it was last refreshed
- gives us a entity to FK against, and have some info about
no-longer-configured bundles
##########
airflow/config_templates/config.yml:
##########
@@ -2654,3 +2654,16 @@ usage_data_collection:
example: ~
default: "True"
see_also: ":ref:`Usage data collection FAQ <usage-data-collection>`"
+dag_bundles:
+ description: |
+ Configuration for the DAG bundles. This allows Airflow to load DAGs from
different sources.
Review Comment:
describe that the section is important, and airflow will consume any new
option you add.
add examples on how to define them
##########
airflow/models/dagbundle.py:
##########
@@ -16,58 +16,20 @@
# under the License.
from __future__ import annotations
-from typing import TYPE_CHECKING
-
-import uuid6
-from sqlalchemy import Column, Integer, String
-from sqlalchemy_utils import UUIDType
+from sqlalchemy import Boolean, Column, String
from airflow.models.base import Base, StringID
-from airflow.utils.module_loading import import_string
-from airflow.utils.session import NEW_SESSION, provide_session
-from airflow.utils.sqlalchemy import ExtendedJSON, UtcDateTime
-
-if TYPE_CHECKING:
- from sqlalchemy.orm import Session
-
- from airflow.dag_processing.bundles.base import BaseDagBundle
+from airflow.utils.sqlalchemy import UtcDateTime
class DagBundleModel(Base):
- """A table for DAG Bundle config."""
+ """A table for DAG Bundle information."""
Review Comment:
@dstandish same here :)
--
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]