obarisk commented on issue #53637: URL: https://github.com/apache/airflow/issues/53637#issuecomment-3538835732
@Srabasti please take a look of the closed PR. This issue is not only because of `there's no queued_at` the issue is during runtime, the type of `dag_run` in the execution context is `airflow.sdk.api.datamodels._generated.DagRun` instead of `airflow.models.dagrun.DagRun`. `queued_at` is an attribute of `airflow.models.dagrun.DagRun` but it's no longer available (airflow >= 3). at the same time, it's not **correct** that we use `airflow.sdk.api.datamodels._generated.DagRun` for type hinting (it's not a public api). the propery way is waiting for this suggestion https://github.com/apache/airflow/pull/54693#discussion_r2314763686 > We should probably expose some types (maybe in airflow.sdk.types) for users to import for type annotations like here. It is recommended too; since we expose Context as a public type, things in Context (and things in those things) should also be exposed somehow. If someday we can have the type, we can have the correct example. Note, the example can't be successfully executed on airflow >= 3 So. this is an issue. But we can't solve this with only fixing the example in the document -- 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]
