o-nikolas commented on code in PR #61646:
URL: https://github.com/apache/airflow/pull/61646#discussion_r2862055596
##########
providers/edge3/src/airflow/providers/edge3/models/edge_worker.py:
##########
@@ -357,12 +392,17 @@ def request_shutdown(worker_name: str, session: Session =
NEW_SESSION) -> None:
@provide_session
-def add_worker_queues(worker_name: str, queues: list[str], session: Session =
NEW_SESSION) -> None:
+def add_worker_queues(
+ worker_name: str, team_name: str | None, queues: list[str], session:
Session = NEW_SESSION
+) -> None:
"""Add queues to an edge worker."""
- query = select(EdgeWorkerModel).where(EdgeWorkerModel.worker_name ==
worker_name)
+ query = get_query_filter_by_team_and_worker_name(worker_name, team_name)
Review Comment:
Agreed with @jscheffl here. As long as this isn't something done by teams
then we don't need to be too paranoid. It is assumed that administrators will
have access to all teams (someone needs to be at the top setting these things
up). However, explicit can be nice, I don't feel strongly either way
:slightly_smiling_face:
--
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]