-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Make sure backfill deadlocks raise errors #1290
Conversation
|
acf3b63
to
dc3a366
Compare
👍 |
17959c8
to
e6d9897
Compare
e6d9897
to
c85bc8d
Compare
|
Coverage decreased (-0.3%) to 66.753% when pulling c85bc8d4df7db8805a2a1bc408fd154adb44f228 on jlowin:subdag-backfill-status into 0bae60f on airbnb:master. |
Coverage decreased (-0.0003%) to 67.058% when pulling a4cda9897b820071303c3e2b1faeba04ab57afac on jlowin:subdag-backfill-status into 0bae60f on airbnb:master. |
fcc928a
to
8f7e5d4
Compare
Coverage increased (+0.6%) to 67.631% when pulling fcc928aaae99c74a2d9c87a94ff44f1b34af51f2 on jlowin:subdag-backfill-status into 0bae60f on airbnb:master. |
Coverage increased (+0.7%) to 67.76% when pulling 8f7e5d44b442b7185919866c43edccef313f0533 on jlowin:subdag-backfill-status into 0bae60f on airbnb:master. |
8f7e5d4
to
e05d1cb
Compare
@syvineckruyk there are a lot of fixes in this PR so I'm going to say it's "done" -- still thinking about one of the cases we discussed offline and will address it separately. |
Coverage increased (+0.7%) to 67.764% when pulling e05d1cb0c25c03a8d22daf5970deeb57eb5cc308 on jlowin:subdag-backfill-status into 0bae60f on airbnb:master. |
@@ -42,7 +42,7 @@ | |||
DEFAULT_DATE_ISO = DEFAULT_DATE.isoformat() | |||
DEFAULT_DATE_DS = DEFAULT_DATE_ISO[:10] | |||
TEST_DAG_ID = 'unit_tests' | |||
configuration.test_mode() | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configuration.test_mode() is used through out core.py. Should these all be replaced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bolkedebruin I deleted this one because it was already called on line 22 of tests/core.py
-- but to be completely honest, I'm not sure if configuration.test_mode()
actually does anything?
This is the entire function:
def test_mode():
conf = ConfigParserWithDefaults(defaults)
conf.read(TEST_CONFIG)
It creates a new conf
object with the test parameters, but doesn't return it or overwrite the existing one. And it doesn't change values that were already read-in at the module level (like DAGS_FOLDER
at the top of models.py
)
When tests are running, the default DAG_FOLDER becomes `airflow/tests/dags`. This makes it much easier to execute DAGs in unit tests in a standardized manner. Also exports DAGS_FOLDER as an env var for Travis
e05d1cb
to
e3da897
Compare
e3da897
to
d1b5be9
Compare
Coverage increased (+0.7%) to 67.766% when pulling d1b5be939fde25c9e200f79e8b18592b42c13412 on jlowin:subdag-backfill-status into 6581858 on airbnb:master. |
- Raise an error when a backfill deadlocks Deadlocked backfills didn’t raise AirflowExceptions, so SubDagOperators didn’t recognize that their subdags were failing. - Fix bug with marking DagRuns as failed - Let SchedulerJob mark DagRuns as deadlocked when there are no TIs available; other deadlock metrics depend on TIs - Adds unit tests.
Addresses the issue raised in apache#1299
d1b5be9
to
b2844af
Compare
Closes #1289
Deadlocked backfills didn’t raise
AirflowExceptions
, soSubDagOperators
didn’t recognize that their subdags were failing. This PR fixes that and adds a unit test for the situation.It also contains improvements for running DAGs in unit tests