o-nikolas commented on code in PR #70886:
URL: https://github.com/apache/airflow/pull/70886#discussion_r3755339829


##########
airflow-core/src/airflow/cli/commands/team_command.py:
##########
@@ -69,6 +104,15 @@ def team_create(args, *, session=NEW_SESSION):
     if session.scalar(select(Team).where(Team.name == team_name)):
         raise SystemExit(f"Team with name '{team_name}' already exists")
 
+    collision = _case_collision(team_name, 
Team.get_all_team_names(session=session))
+    if collision:
+        raise SystemExit(
+            f"Team name '{team_name}' differs only in case from the existing 
team "
+            f"'{collision}'. They would share one secrets namespace, so each 
team could read "
+            f"the other's Connections and Variables. Choose a name that 
differs by more than "
+            f"case."
+        )

Review Comment:
   At this point I think it would be easier to just enforce that team names are 
lowercase and only allow a few separator characters (maybe just `_` and `-`). 
Then we don't have to worry about this edge case.
   
   What are your thoughts @vincbeck?



-- 
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]

Reply via email to