samuel-geraldo opened a new pull request, #77517: URL: https://github.com/apache/airflow/pull/77517
`GET /api/v2/connections` and `GET /api/v2/variables` only list rows from the metadata database, but connections and variables can also be defined through `AIRFLOW_CONN_*`/`AIRFLOW_VAR_*` environment variables or a configured secrets backend. Those sources take precedence over a database row with the same ID, yet nothing in the response told API clients that the list may be incomplete. This sets an `X-Airflow-List-Incomplete: true` response header when either source is in use. It uses the same detection as the CLI warning from #72484, now moved to `airflow.utils.hidden_entries` so the API does not depend on the CLI package. The CLI warning text is unchanged. Notes: - The response body is unchanged, so no OpenAPI or generated-client update is needed. The header is not described in the OpenAPI spec; happy to add that if reviewers prefer. - The header name is a proposal, as discussed in the issue. Open to a different name. - Like the CLI, the check only looks at whether a secrets backend is *configured*; it never instantiates one. - Scope is the REST API only. Surfacing this in the Web UI would be a separate frontend change, so this PR uses `related:` rather than `closes:`. Tests: added cases to `test_connections.py` and `test_variables.py` (no extra source, env var, configured secrets backend). Ran `uv run --project airflow-core pytest` on the two route test files, `cli/test_utils.py` and the connection/variable CLI command tests (421 passed), plus `ruff format` and `ruff check`. related: #10867 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Sonnet 5.5) Generated-by: Claude Code (Sonnet 5.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]
