Skip to content

Conversation

@tamasflamich
Copy link

@tamasflamich tamasflamich commented Jul 2, 2019

Make sure you have checked all steps below.

Jira

Description

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

In case a task instance

  • has more attempts than retries (it can happen when the state of the task instance is explicitly cleared) and
  • task instance is prematurely terminated (without graceful shutdown)
    then zombie collection process of the scheduler can mark the task instance failed instead of up_for_retry.

This happens because the max_retries field is not persisted but set to its initial value (retries).

Tests

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

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.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

Code Quality

  • Passes flake8

@codecov-io
Copy link

Codecov Report

Merging #5514 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5514      +/-   ##
==========================================
- Coverage   79.07%   79.07%   -0.01%     
==========================================
  Files         489      489              
  Lines       30744    30748       +4     
==========================================
+ Hits        24312    24315       +3     
- Misses       6432     6433       +1
Impacted Files Coverage Δ
airflow/models/dagbag.py 92.16% <100%> (+0.03%) ⬆️
airflow/utils/dag_processing.py 60.47% <100%> (+0.2%) ⬆️
airflow/models/taskinstance.py 93.02% <0%> (-0.17%) ⬇️

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 0fe8cbe...c1faf93. Read the comment docs.

@seelmann
Copy link
Member

seelmann commented Jul 4, 2019

Just FYI, this will conflict with #5511 and when applied this change should no longer be required because the full TaskInstance including max_tries is loaded from DB when calling handle_failure().

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