Skip to content

Make test_celery_integration runnable - #64153

Merged
eladkal merged 1 commit into
apache:mainfrom
eladkal:celery
Mar 24, 2026
Merged

Make test_celery_integration runnable#64153
eladkal merged 1 commit into
apache:mainfrom
eladkal:celery

Conversation

@eladkal

@eladkal eladkal commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

It looks like the Celery test was never executed due to return statement.
once removed the test started to run but discovered that it doesn't pass.
Hopefully I fixed all the issues and now it should pass

Here's a summary of all the fixes made to test_celery_executor.py:

  1. Moved test_celery_integration, test_error_sending_task, and test_retry_on_error_sending_task out of the dead-code helper function and into TestCeleryExecutor as proper methods.
  2. Inlined the dag setup directly in test_celery_integration instead of using a separate helper (per your suggestion).
  3. Derived TaskInstanceKeys from the actual dagrun task instances instead of using hardcoded mismatched values.
  4. Replaced ExecuteTask.make() (which requires ORM relationships) with explicit ExecuteTask(...) construction with all required fields.
  5. Fixed the sort destructuring order — "fail" sorts before "success" alphabetically.
  6. Set executor._sync_parallelism = 1 so task sending stays in the main thread where mock patches are active.

Was generative AI tooling used to co-author this PR?
  • [v] Yes (please specify the tool below)
    Claude Opus 4.6

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@eladkal
eladkal merged commit c471909 into apache:main Mar 24, 2026
90 of 91 checks passed
@eladkal
eladkal deleted the celery branch March 24, 2026 16:37
aaron-y-chen pushed a commit to aaron-y-chen/airflow that referenced this pull request Mar 30, 2026
Suraj-kumar00 pushed a commit to Suraj-kumar00/airflow that referenced this pull request Apr 7, 2026
abhijeets25012-tech pushed a commit to abhijeets25012-tech/airflow that referenced this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants