XD-DENG commented on issue #14459: URL: https://github.com/apache/airflow/issues/14459#issuecomment-792263822
I'm preparing a PR for this issue (rename `is_active` into `is_present` in `dag` table). I have encountering again the same issue that I met in https://github.com/apache/airflow/pull/14581#discussion_r588459592: migration `2c6edca13270, Resource based permissions` is querying the DB using the column that we intend to rename, and this results in exception. I'm not sure if any change should be made to `2c6edca13270, Resource based permissions`. Especially given it's already rolled out in `2.0.0` and `2.0.1`, it may be straightforward to refactor this migration. But maybe someone can kindly make some good suggestions? In https://github.com/apache/airflow/pull/14581 (rename `last_scheduler_run` into `last_parsed_time`), we managed to fix the issue by limiting the columns needed, so the renamed column is not needed and we can work around the problem. But this time, the column we intend to rename IS needed (chain: `2c6edca13270, Resource based permissions` -> `create_app` -> `sync_appbuilder_roles` -> `sync_roles` -> `create_dag_specific_permissions`, in which `is_active` is used in `filter`, and we now rename it into `is_present`). If we want to use the same trick again to fix this problem, we need to refactor `create_dag_specific_permissions`. For example, I don't understand why `create_dag_specific_permissions` only applied to "**all active and paused DAGs**". Why not all DAGs? If it can be simplified to `all DAGs`, we can apply the same trick again to fix this migration issue. @kaxil @ashb @turbaszek Kindly let me know your suggestions? Happy to clarify and have further discussion. Many thanks! ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
