Skip to content

Drop provider dependency from airflow-core secrets backend tests - #71677

Draft
rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:core-tests-fake-secrets-backend
Draft

Drop provider dependency from airflow-core secrets backend tests#71677
rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:core-tests-fake-secrets-backend

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The secrets tests in test_secrets.py and test_configuration.py reach for the amazon systems-manager and hashicorp Vault backends purely as stand-ins for "a custom secrets backend". Nothing there asserts anything about either one — the subject is core's own plumbing: how a backend is discovered, how backend_kwargs and the per-key BACKEND_KWARG__ env vars reach its constructor, and what happens when it returns nothing or fails.

That stand-in is what puts these tests out of reach of a core-only environment, and why most of them sat behind skip_if_force_lowest_dependencies_marker and never ran in the lowest-dependency job. The two Vault tests were worse off still: hashicorp is not in airflow-core's dev group, so a scoped sync already failed them.

Coverage is unchanged, down to an explicit JSON null reaching the instance; the connection-error path now raises on purpose rather than relying on a mis-shaped hvac mock to fail somewhere inside Vault.

First slice of #71641 — cncf.kubernetes, celery, git, fab and pandas follow, and the dev-group entries in airflow-core/pyproject.toml come out once nothing needs them.

Tests

Both files pass in a full workspace. In an environment built with uv sync --project airflow-core minus the six dev-group providers, the amazon and hashicorp failures are gone; the eight that remain are the celery provider-config tests a later slice covers.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

These tests cover how core loads and configures a custom secrets backend,
not how any particular backend behaves. Pinning them to the amazon and
hashicorp providers made a core-only environment unable to run them, and
kept them skipped whenever the full provider set is not installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant