Eason09053360 opened a new pull request, #72346:
URL: https://github.com/apache/airflow/pull/72346
`ProvidersManager` is a process-wide singleton, and its `providers` property
hands
out the live `_provider_dict` without copying — so `ProviderInfo.data` is
the cached
dict itself, not a copy.
`airflow providers get <name> --full` was assigning its de-RST'd description
straight
back into that dict, so a command whose only job is to format data for
display
permanently rewrote global provider metadata as a side effect. It now builds
a copy
to render instead.
### How reachable is it?
Latent rather than user-visible, and worth being explicit about:
- the `airflow` CLI is a one-shot process — nothing reads the description
again
before it exits
- the API server reads the same cache, but runs in a different process
- the two other in-tree readers (`providers_list` and the public API's
provider
service) re-sanitize the description themselves, and `_remove_rst_syntax`
is
idempotent for every description shipped today
Where it *is* reachable is a pytest process: the singleton persists across
tests and
`cleanup_providers_manager` is opt-in rather than autouse, so a test
exercising the
unmocked command would leak a sanitized description into the rest of the
session. No
test does that today, which is why nothing has caught it.
### Test
`provider_command` was the only module under `airflow/cli/commands/` without
a
matching test file, so the regression test starts one. It asserts both that
the
rendered payload still has the RST stripped and that the source dict is
untouched —
the second assertion is the one that fails without this change.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 5)
Generated-by: Claude Code (Opus 5) following [the
guidelines](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]