Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIRFLOW-3885] Fix race condition in scheduler test #4737

Merged

Conversation

astahlman
Copy link
Contributor

Jira

  • [ X ] My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

Description

  • [ X ] Here are some details about my PR, including screenshots of any UI changes:

This is a follow-up to #4730.

We're hitting this race condition frequently now that we don't sleep()
during unit tests. We don't actually need to assert that the task is
currently running - it's fine if it has already run successfully.

Tests

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

Commits

  • [ X ] 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.
    • All the public functions and the classes in the PR contain docstrings that explain what it does

Code Quality

  • [ X ] Passes flake8

We're hitting this race condition frequently now that we don't sleep()
during unit tests. We don't actually need to assert that the task is
currently running - it's fine if it has already run successfully.
@astahlman
Copy link
Contributor Author

cc @feng-tao I expect this to fix all of those failing builds on master

@codecov-io
Copy link

codecov-io commented Feb 19, 2019

Codecov Report

Merging #4737 into master will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4737      +/-   ##
==========================================
+ Coverage    74.5%   74.61%   +0.11%     
==========================================
  Files         430      430              
  Lines       28002    28002              
==========================================
+ Hits        20862    20893      +31     
+ Misses       7140     7109      -31
Impacted Files Coverage Δ
airflow/jobs.py 76.46% <0%> (+0.71%) ⬆️
airflow/utils/dag_processing.py 59.89% <0%> (+1.06%) ⬆️
airflow/executors/__init__.py 63.46% <0%> (+3.84%) ⬆️
airflow/utils/sqlalchemy.py 81.81% <0%> (+4.54%) ⬆️
airflow/executors/sequential_executor.py 100% <0%> (+50%) ⬆️

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 daec2ff...4f152cd. Read the comment docs.

@feng-tao
Copy link
Member

thanks @astahlman

@feng-tao feng-tao merged commit 6bfa0ba into apache:master Feb 19, 2019
antonimaciej pushed a commit to PolideaInternal/airflow that referenced this pull request Feb 26, 2019
We're hitting this race condition frequently now that we don't sleep()
during unit tests. We don't actually need to assert that the task is
currently running - it's fine if it has already run successfully.
ashb pushed a commit to ashb/airflow that referenced this pull request Mar 8, 2019
We're hitting this race condition frequently now that we don't sleep()
during unit tests. We don't actually need to assert that the task is
currently running - it's fine if it has already run successfully.
wmorris75 pushed a commit to modmed/incubator-airflow that referenced this pull request Jul 29, 2019
We're hitting this race condition frequently now that we don't sleep()
during unit tests. We don't actually need to assert that the task is
currently running - it's fine if it has already run successfully.
@eschachar eschachar deleted the astahlman/airflow-3885-fix-flaky-scheduler-test branch September 24, 2022 22:33
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