You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/05/08 20:48:58 UTC
[GitHub] [airflow] dstandish opened a new pull request, #23574: WIP - Don't rely on current ORM structure for db clean command
dstandish opened a new pull request, #23574:
URL: https://github.com/apache/airflow/pull/23574
For command DB clean, by not relying on the ORM models, we can use db clean from 2.3 pre-upgrade.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish merged pull request #23574: Don't rely on current ORM structure for db clean command
Posted by GitBox <gi...@apache.org>.
dstandish merged PR #23574:
URL: https://github.com/apache/airflow/pull/23574
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish commented on pull request #23574: Don't rely on current ORM structure for db clean command
Posted by GitBox <gi...@apache.org>.
dstandish commented on PR #23574:
URL: https://github.com/apache/airflow/pull/23574#issuecomment-1154254751
> Nice. This will give the option to not access DB directly for the users in order to remove their error rows.
> NIT. I think it's worth mentioning in the warning mesage printed in the UI when there are "erroneous" row, that the user can use the "db cleanup" command to delete them.
well it's just about purging _old_ rows not necessarily _erroneous_ rows... can you clarify which warning message?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on pull request #23574: Don't rely on current ORM structure for db clean command
Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #23574:
URL: https://github.com/apache/airflow/pull/23574#issuecomment-1186108976
This one also fixes error raised in #25063 (bad recency column in "callback_request" table, so it should be cherry-picked to 2.3.4 IMHO.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on a diff in pull request #23574: Don't rely on current ORM structure for db clean command
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23574:
URL: https://github.com/apache/airflow/pull/23574#discussion_r891946340
##########
airflow/utils/db.py:
##########
@@ -854,7 +854,7 @@ def check_conn_id_duplicates(session: Session) -> Iterable[str]:
)
-def reflect_tables(tables: List[Union[Base, str]], session):
+def reflect_tables(tables: Optional[List[Union[Base, str]]], session):
Review Comment:
Why is this `None` case needed? From what I can tell it’s the same as `reflect_tables(tables=[])`. Using `None` is probably more straightforward at the call site, but in that case we should change the condition in this function to `if tables is None` instead.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish commented on a diff in pull request #23574: Don't rely on current ORM structure for db clean command
Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #23574:
URL: https://github.com/apache/airflow/pull/23574#discussion_r892558847
##########
airflow/utils/db.py:
##########
@@ -854,7 +854,7 @@ def check_conn_id_duplicates(session: Session) -> Iterable[str]:
)
-def reflect_tables(tables: List[Union[Base, str]], session):
+def reflect_tables(tables: Optional[List[Union[Base, str]]], session):
Review Comment:
OK I guess i can see the case for `[]` means no tables.
Consistent behavior. e.g. in the dynamic case:
```
metadata = reflect_tables([x[0] for x in models_list], session)
```
well maybe there you don't need to bother reflecting any tables.
updated.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish commented on a diff in pull request #23574: Don't rely on current ORM structure for db clean command
Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #23574:
URL: https://github.com/apache/airflow/pull/23574#discussion_r892554216
##########
airflow/utils/db.py:
##########
@@ -854,7 +854,7 @@ def check_conn_id_duplicates(session: Session) -> Iterable[str]:
)
-def reflect_tables(tables: List[Union[Base, str]], session):
+def reflect_tables(tables: Optional[List[Union[Base, str]]], session):
Review Comment:
Right exactly, calling `reflect_tables(tables=[])` feels just a little bit icky compared to `reflect_tables(tables=None)`.
I guess the idea with `if not tables:` is that whether user gives `[]` or `None` the effect is the same -- we'll reflect all tables. But I guess yeah we could make it so that if you pass empty list it just does _nothing_ -- just seems odd, why you'd want to do that...
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] commented on pull request #23574: Don't rely on current ORM structure for db clean command
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #23574:
URL: https://github.com/apache/airflow/pull/23574#issuecomment-1153117357
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org