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-5419] - Use sudo to kill cleared tasks when running with impersonation #6026

Merged
merged 5 commits into from
Sep 24, 2019
Merged

[AIRFLOW-5419] - Use sudo to kill cleared tasks when running with impersonation #6026

merged 5 commits into from
Sep 24, 2019

Conversation

bharathpalaksha
Copy link
Contributor

Marking task failed doesn't kill task, when it is run through impersonation(run_as_user)

Make sure you have checked all steps below.

Jira

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

Description

  • When a dag is run through impersonation 'run_as_user'. Tasks won't get killed when a SIGTERM is issued either by marking it failed explicitly or by scheduler.

Tests

  • Existing test cases should take care as it is already covered and this is more of linux process level defect

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

  • [ ]

@bharathpalaksha bharathpalaksha changed the title AIRFLOW-5419 - Marking task failed doesn't kill the task - https://issues.apache.org/jira/browse/AIRFLOW-5419 [AIRFLOW-5419] - Marking task failed doesn't kill the task - https://issues.apache.org/jira/browse/AIRFLOW-5419 Sep 6, 2019
@bharathpalaksha bharathpalaksha changed the title [AIRFLOW-5419] - Marking task failed doesn't kill the task - https://issues.apache.org/jira/browse/AIRFLOW-5419 [AIRFLOW-5419] - Marking task failed doesn't kill the task when it is run through impersonation Sep 6, 2019
airflow/utils/helpers.py Outdated Show resolved Hide resolved
@ashb ashb changed the title [AIRFLOW-5419] - Marking task failed doesn't kill the task when it is run through impersonation [AIRFLOW-5419] - Use sudo to kill cleared tasks when running with impersonation Sep 6, 2019
airflow/utils/helpers.py Outdated Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6026   +/-   ##
=========================================
  Coverage          ?   80.03%           
=========================================
  Files             ?      594           
  Lines             ?    34751           
  Branches          ?        0           
=========================================
  Hits              ?    27813           
  Misses            ?     6938           
  Partials          ?        0
Impacted Files Coverage Δ
airflow/utils/helpers.py 77.97% <33.33%> (ø)

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 dd36d90...3000b0e. Read the comment docs.

@bharathpalaksha
Copy link
Contributor Author

@ashb please check the comments in response to your review comment and also have addresses the things pointed out

@bharathpalaksha
Copy link
Contributor Author

@ashb please look into this

@ashb ashb merged commit 04c7fd0 into apache:master Sep 24, 2019
ashb pushed a commit that referenced this pull request Sep 24, 2019
ashb pushed a commit to ashb/airflow that referenced this pull request Sep 24, 2019
…mpersonation (apache#6026)

Marking task failed doesn't kill the task when it is run through impersonation(run_as_user)

(cherry picked from commit 04c7fd0)
ashb pushed a commit to ashb/airflow that referenced this pull request Sep 24, 2019
…g with impersonation (apache#6176)

Bug fix to apache#6026

(cherry picked from commit 4181432)
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