Skip to content

Drop the celery provider dependency from airflow-core tests - #72249

Closed
rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:core-tests-drop-celery
Closed

rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:core-tests-drop-celery

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

unit/cli/conftest.py imports the Celery executor at module level. As a result, when the provider is uninstalled, nothing under unit/cli can be collected. This was the first Celery blocker to running the core suite in a scoped uv sync --project airflow-core.

The remaining Celery dependencies are replaced with stand-ins:

  • CeleryExecutor is used wherever a test needs a non-local executor.
  • [celery] is used wherever a test needs an option contributed by a provider.

Where core already has an equivalent, the Celery-specific dependency is replaced rather than skipped. This keeps the test running in a Celery-free environment.

The provider-config toggle test is moved to [standard] venv_install_method. Its subject is the context manager itself. The one behavior that Celery provided but standard does not — metadata taking precedence over provider_config_fallback_defaults.cfg — is covered separately by test_provider_metadata_overrides_cfg_fallback.

TestProviderConfigPriority rows are now marked by the section that owns each option, rather than by which cases happen to fail. Both [celery] and [celery_kubernetes_executor] are defined by providers/celery/provider.yaml. Several of their options also resolve to the same values through the core cfg fallback, so those cases could pass without actually proving the provider-specific behavior.

In test_executor_loader.py, the module-level importorskip previously skipped the entire file instead of only the four cases that require Celery. The Amazon importorskip, the cncf.kubernetes import in unit/cli/conftest.py, and the dev-group entry are left unchanged because they are still needed by the remaining test slices.

The Celery CLI integration test is moved under the provider. testable-core-integrations only covers Kerberos, OpenTelemetry, and Redis; INTEGRATION_CELERY is never enabled under airflow-core, so this test has effectively never run there.

Running it under the provider exposed a stale _bundle_cleanup_main expectation, which had been renamed in #62655. Updating that expectation is the only assertion changed by this PR.

Tests

Without apache-airflow-providers-celery installed:

  • airflow-core/tests/unit and tests/integration now collect cleanly, whereas unit/cli previously failed during collection.

  • The touched tests skip instead of failing:

    • 11 in test_configuration.py
    • 4 in unit/executors
    • 2 in test_cli_parser.py
    • 1 in the scheduler tests
    • 1 in the standalone command tests

With the provider installed, nothing changes.

Two existing failures are intentionally left untouched in the scoped venv:

  • test_sensitive_values
  • test_providers_manager.py::test_cli

Both assert against the full provider set and already miss keycloak and edge3 in this environment, so they are unrelated to this PR.

Finally, markers.py and unit/cli/conftest.py overlap with #71868: both contain the same skip_if_not_installed implementation. Whichever lands second will need to deduplicate that code.

related: #71641


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

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

@rjgoyln
rjgoyln force-pushed the core-tests-drop-celery branch from 3469109 to f5b4daa Compare August 29, 2026 12:31
@rjgoyln rjgoyln changed the title Stop airflow-core tests from requiring the celery provider Drop the celery provider dependency from airflow-core tests Sep 1, 2026
@rjgoyln
rjgoyln marked this pull request as ready for review September 1, 2026 14:36
The core suite uses CeleryExecutor as its stand-in for "a distributed
executor" and the [celery] section as its stand-in for "config a provider
contributed", so a scoped `uv sync --project airflow-core` environment cannot
run it unless the celery provider is installed. One of those uses is a
conftest import, which takes the whole unit/cli directory down with it.

The celery CLI integration test also sat under airflow-core, where the celery
integration is never started, so it has never actually run — long enough for
the subprocess target it asserts on to be renamed underneath it.
@potiuk

potiuk commented Sep 25, 2026

Copy link
Copy Markdown
Member

Hello @rjgoyln - thank you for your contributions to Apache Airflow!

The Airflow community has introduced a limit of 5 open pull requests at a time for contributors without write access to the repository. You currently have 24 open pull requests, so - as a one-time step of introducing the limit - we closed the ones where maintainers have not engaged yet:

These pull requests stay open because maintainers are already engaged in them - they count towards your limit:

This is not a judgement of you or of your changes. We never told contributors before that opening many pull requests at once was a problem, so there is nothing to feel bad about - and nothing is lost: your branches, commits and the review history stay where they are.

What we ask you to do is to make your first prioritization decision: choose which of the pull requests above matter most to you, and reopen them (up to 5 open at a time, including the ones still open) with the "Reopen pull request" button or gh pr reopen <PR_NUMBER> --repo apache/airflow. Reopen the ones you are ready to follow through - keep them rebased, respond to review comments and fix failing checks.

While your pull requests are waiting for review, the most valuable thing you can do is help in other ways - reviewing other contributors' pull requests, helping with issues, and taking part in the discussions on the devlist and Slack.

Why we introduced the limit, what it means for you and how to reopen or restore a pull request is explained in https://github.com/apache/airflow/blob/main/contributing-docs/32_open_pull_request_limit.rst.


Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CLI area:Executors-core LocalExecutor & SequentialExecutor area:providers closed because of open PR limit Closed as a one-time step of introducing the open pull request limit provider:celery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants