kgskgs commented on PR #68947: URL: https://github.com/apache/airflow/pull/68947#issuecomment-7309853149
> Approving with nits: > > [`sd_by_dag_id`](https://github.com/apache/airflow/blob/f7b07d390a3fec48fe4e0b448247c64a08dbe0e8/airflow-core/src/airflow/models/serialized_dag.py#L588) can hold `(None, None)` since the outer join, so the annotation should be `dict[str, tuple[datetime | None, str | None]]`. Not sure `sd_subq` needs to be a `.subquery()` at all, the outer select adds no filter. > > In the tests, the [docstring](https://github.com/apache/airflow/blob/f7b07d390a3fec48fe4e0b448247c64a08dbe0e8/airflow-core/tests/unit/models/test_serialized_dag.py#L917) on `test_new_dag_version_is_created_when_version_exists_but_serialized_dag_row_missing` still says "dynamic DAG update" (leftover from my earlier comment, "gracefully handles" went and this stayed). An `assert latest_version.id != dag_version.id` in there would pin the "new version is created" part of the name. `DAG` is already imported from `airflow.sdk` at the top of the file so the in-function `SdkDAG` imports at [L1008](https://github.com/apache/airflow/blob/f7b07d390a3fec48fe4e0b448247c64a08dbe0e8/airflow-core/tests/unit/models/test_serialized_dag.py#L1008) and [L1054](https://github.com/apache/airflow/blob/f7b07d390a3fec48fe4e0b448247c64a08dbe0e8/airflow-core/tests/unit/models/test_serialized_dag.py#L1054) can go, and `schedule=None` is the default anyway. The `_heals` docstrings ([L1031](https://github.co m/apache/airflow/blob/f7b07d390a3fec48fe4e0b448247c64a08dbe0e8/airflow-core/tests/unit/models/test_serialized_dag.py#L1031), [L1087](https://github.com/apache/airflow/blob/f7b07d390a3fec48fe4e0b448247c64a08dbe0e8/airflow-core/tests/unit/models/test_serialized_dag.py#L1087)) say v2 gets serialized when the row actually lands on v3 (the comment a few lines down has it right). Those two are the same setup apart from the incoming Dag, could they be one parametrized test? updated all of these -- 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]
