vincbeck commented on code in PR #55003:
URL: https://github.com/apache/airflow/pull/55003#discussion_r2308150781
##########
airflow-core/src/airflow/configuration.py:
##########
@@ -877,12 +877,14 @@ def mask_secrets(self):
mask_secret_core(value)
mask_secret_sdk(value)
- def _env_var_name(self, section: str, key: str) -> str:
- return f"{ENV_VAR_PREFIX}{section.replace('.',
'_').upper()}__{key.upper()}"
-
- def _get_env_var_option(self, section: str, key: str):
- # must have format AIRFLOW__{SECTION}__{KEY} (note double underscore)
- env_var = self._env_var_name(section, key)
+ def _env_var_name(self, section: str, key: str, team_name: str | None =
None) -> str:
+ team_component: str = f"{team_name.upper()}___" if team_name else ""
+ return f"{ENV_VAR_PREFIX}{team_component}{section.replace('.',
'_').upper()}__{key.upper()}"
+
+ def _get_env_var_option(self, section: str, key: str, team_name: str |
None = None):
+ # must have format AIRFLOW__{SECTION}__{KEY} (note double underscore)
OR for team based
+ # configuration must have the format
AIRFLOW___{TEAM_NAME}__{SECTION}__{KEY}
Review Comment:
Where is the triple underscore? Before or after the team. Unless I miss
something, this comment is not consistent with the logic above. In
`_env_var_name`, you set the triple underscore after the team, and in this
comment, this is before
--
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]