potiuk opened a new pull request, #70899:
URL: https://github.com/apache/airflow/pull/70899
Follow-up to #70876.
The ambiguous-id check used to live in `_get_secret`, which all three getters
share. Moving it up into `get_conn_value` and `get_variable` left
`get_config`
reaching `_get_secret` unguarded, so `_names_a_team_namespace`'s claim that
such
an id is refused for *every* lookup stopped being true the moment it was
written —
two getters and the docstring disagreed with the third.
**Not a cross-team read.** `get_config` never receives a `team_name`, so no
team
namespace is reachable through it. The defect is the inconsistency and the
false
docstring, not an exposure.
@shahar1 found this while reviewing the Amazon sibling (#70878), where it is
already fixed. Azure had the same shape and had merged by then, so this is
the
other half.
`_names_a_team_namespace` stays an **instance** method here, unlike Amazon's,
because it builds the candidate path with `self.build_path` and `self.sep`.
### Test plan
- [x] `test_refusing_an_ambiguous_id_is_logged` extended to `get_config`;
verified
it fails without the guard
- [x] Assertion reworked off the rendered sentence — Airflow logs through
structlog, which renders format args into `msg` before the stdlib
record
exists, so `record.args` is empty and there is no structured payload to
assert on; it now asserts level, logger and the refused id
- [x] `test_key_vault.py` — 20 passed
- [x] `ruff check` / `ruff format` clean
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Opus 5 (1M context)
Generated-by: Claude Opus 5 (1M context) following the guidelines at
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
--
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]