uranusjr commented on code in PR #74084: URL: https://github.com/apache/airflow/pull/74084#discussion_r4203616700
########## task-sdk/src/airflow/sdk/importers/yaml_importer/versions/__init__.py: ########## @@ -14,32 +14,25 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +""" +Cadwyn `VersionBundle` for the YAML DAG format, keyed by `$schema` version (a dated URL). + +The `cadwyn` import is deferred so importing this package does not pull in +FastAPI/Starlette. Versions are newest-first. +""" + from __future__ import annotations -from uuid import uuid4 +import functools +from typing import TYPE_CHECKING -import pytest +if TYPE_CHECKING: + from cadwyn import VersionBundle [email protected] -def task_identity_workloads(): - from airflow.executors.workloads import BundleInfo, ExecuteTask, TaskInstanceDTO [email protected] +def get_bundle() -> VersionBundle: + """Build the format's `VersionBundle` lazily (newest-to-oldest).""" + from cadwyn import HeadVersion, Version, VersionBundle Review Comment: Cadwyn is already used implicitly before this PR (coordinators), but I guess adding it now makes sense. -- 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]
