Skip to content

Conversation

@feng-tao
Copy link
Member

After #4808 is merged, we seem to hit a race condition in one of the test. I think in unit test mode we disable the sleeep in https://github.com/apache/airflow/pull/4730/files, I think it is fine for the task to be in either running or success state.

@feng-tao
Copy link
Member Author

PTAL @Fokko @kaxil @XD-DENG

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@feng-tao may be necessary to update the docstring of this test case as well? Currently it's DagRuns with one successful and one future root task -> SUCCESS

Copy link
Member Author

@feng-tao feng-tao Mar 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in real scenario it will only have success state for the dagRun. The issue only happens in unit test as we don't wait / sleep to retrieve the result during CI test for speeding up the CI test effort hence we sometimes(or in some ORM) get the running state for the task which the dagrun state is still running.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated with a note.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I'm missing anything, but I'm thinking if it would be better/clearer to just add a sleep here If the race condition only occurs in this test case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XD-DENG , you could take a look at more on this pr(https://github.com/apache/airflow/pull/4730/files) as it tries to speed up the CI time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @feng-tao for the clarification.

@feng-tao feng-tao force-pushed the tfeng_fix_ci_race branch from 5a0dcf7 to d5e6c47 Compare March 25, 2019 06:21
@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4968      +/-   ##
==========================================
+ Coverage   75.67%   75.76%   +0.08%     
==========================================
  Files         458      458              
  Lines       29856    29856              
==========================================
+ Hits        22594    22620      +26     
+ Misses       7262     7236      -26
Impacted Files Coverage Δ
airflow/models/__init__.py 93% <0%> (+0.04%) ⬆️
airflow/utils/sqlalchemy.py 81.81% <0%> (+1.13%) ⬆️
airflow/hooks/dbapi_hook.py 88% <0%> (+1.59%) ⬆️
airflow/hooks/postgres_hook.py 94.44% <0%> (+2.77%) ⬆️
airflow/operators/postgres_operator.py 100% <0%> (+100%) ⬆️

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 5c49ae3...d5e6c47. Read the comment docs.

@XD-DENG XD-DENG merged commit d911538 into apache:master Mar 25, 2019
ashb pushed a commit to ashb/airflow that referenced this pull request Mar 25, 2019
@Fokko
Copy link
Contributor

Fokko commented Mar 25, 2019

Awesome @feng-tao

cthenderson pushed a commit to cthenderson/apache-airflow that referenced this pull request Apr 16, 2019
andriisoldatenko pushed a commit to andriisoldatenko/airflow that referenced this pull request Jul 26, 2019
wmorris75 pushed a commit to modmed-external/incubator-airflow that referenced this pull request Jul 29, 2019
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.

5 participants