Skip to content

Conversation

@KevinYang21
Copy link
Owner

Jira

  • My PR addresses the following Airflow Jira issues and references them in the PR title.

Description

Summary of major changes:

  • Celery executor will create a process pool to enqueue celery task in parallel.
  • Scheduler job will not pass TaskInstance to executor when trying to queue command, instead it passes SimpleTaskInstance, in order to enable parallel enqueuing.
  • Scheduler no longer checks task instance state before enqueuing because worker already checks task instance state before executing. Our cluster has been requeuing everything for a long time and there should be no risk removing that redundant check.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

tests/executors/test_celery_executor.py:TestCeleryExecutor.test_error_sending_task
tests/jobs.py:SchedulerJobTest.test_change_state_for_tasks_failed_to_execute

Also updated existing failing unit test.

Before:
Before (32k tasks should run on 13:30 but didn't get >30k running tasks until 13:41):
screen shot 2018-08-31 at 3 26 48 pm

After (32k tasks should run on 15:10 and got them all running at 15:14):
screen shot 2018-08-31 at 3 26 11 pm

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

  • Passes git diff upstream/master -u -- "*.py" | flake8 --diff

@KevinYang21 KevinYang21 force-pushed the kevin_yang_decouple_dag_parsing branch from 0ca9713 to 69e9311 Compare October 15, 2018 03:47
@KevinYang21 KevinYang21 force-pushed the kevin_yang_parallelize_enqueue branch from ef899e8 to 7ca65b7 Compare October 15, 2018 03:50
@KevinYang21 KevinYang21 force-pushed the kevin_yang_decouple_dag_parsing branch from 69e9311 to 14cf345 Compare October 15, 2018 05:28
@KevinYang21 KevinYang21 force-pushed the kevin_yang_parallelize_enqueue branch from 7ca65b7 to 559fa09 Compare November 20, 2018 23:34
@KevinYang21 KevinYang21 changed the base branch from kevin_yang_decouple_dag_parsing to master November 21, 2018 00:24
@KevinYang21 KevinYang21 force-pushed the kevin_yang_parallelize_enqueue branch 21 times, most recently from 33ce56d to 93b5333 Compare November 27, 2018 08:12
@KevinYang21 KevinYang21 force-pushed the kevin_yang_parallelize_enqueue branch from 93b5333 to d93d295 Compare November 27, 2018 10:18
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@5955db1). Click here to learn what that means.
The diff coverage is 83.94%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master      #5   +/-   ##
========================================
  Coverage          ?   77.8%           
========================================
  Files             ?     201           
  Lines             ?   16448           
  Branches          ?       0           
========================================
  Hits              ?   12797           
  Misses            ?    3651           
  Partials          ?       0
Impacted Files Coverage Δ
airflow/utils/timeout.py 78.57% <100%> (ø)
airflow/models.py 92.33% <100%> (ø)
airflow/executors/base_executor.py 95.16% <100%> (ø)
airflow/executors/celery_executor.py 76.92% <68.51%> (ø)
airflow/utils/dag_processing.py 59.23% <91.66%> (ø)
airflow/jobs.py 77.11% <93.93%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5955db1...d93d295. Read the comment docs.

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.

3 participants