potiuk commented on code in PR #51322:
URL: https://github.com/apache/airflow/pull/51322#discussion_r2135818383
##########
airflow-core/src/airflow/configuration.py:
##########
@@ -873,12 +874,14 @@ def mask_secrets(self):
continue
mask_secret(value)
- def _env_var_name(self, section: str, key: str) -> str:
- return f"{ENV_VAR_PREFIX}{section.replace('.',
'_').upper()}__{key.upper()}"
+ def _env_var_name(self, section: str, key: str, team_id: str | None =
None) -> str:
+ team_component = f"{team_id.upper()}__" if team_id else ""
+ return f"{ENV_VAR_PREFIX}{team_component}{section.replace('.',
'_').upper()}__{key.upper()}"
Review Comment:
Suggestion: maybe a better approach for env var will be to make sure that
the team settings are having a separate namespace:
``AIRFLOW_TEAM__TEAM_ID__SECTION__CONFIG``
There is a non-zero chance someone names their team "core" for example.
--
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]