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-6956] Extract kill_child_processes_by_pids from DagFileProcessorManager #7584

Merged
merged 1 commit into from Mar 3, 2020

Conversation

mik-laj
Copy link
Member

@mik-laj mik-laj commented Feb 28, 2020


Issue link: AIRFLOW-6956

Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Commit message/PR title starts with [AIRFLOW-NNNN]. AIRFLOW-NNNN = JIRA ID*
  • Unit tests coverage for changes (not needed for documentation changes)
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

* For document-only changes commit message can start with [AIRFLOW-XXXX].


In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@mik-laj mik-laj added the area:Scheduler Scheduler or dag parsing Issues label Feb 28, 2020
@codecov-io
Copy link

codecov-io commented Feb 28, 2020

Codecov Report

Merging #7584 into master will decrease coverage by 0.23%.
The diff coverage is 85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7584      +/-   ##
==========================================
- Coverage   86.81%   86.58%   -0.24%     
==========================================
  Files         896      897       +1     
  Lines       42704    42747      +43     
==========================================
- Hits        37074    37011      -63     
- Misses       5630     5736     +106
Impacted Files Coverage Δ
airflow/utils/dag_processing.py 89.57% <50%> (+2.92%) ⬆️
airflow/utils/process_utils.py 73.25% <88.88%> (+4.13%) ⬆️
airflow/kubernetes/volume_mount.py 44.44% <0%> (-55.56%) ⬇️
airflow/kubernetes/volume.py 52.94% <0%> (-47.06%) ⬇️
airflow/kubernetes/pod_launcher.py 47.18% <0%> (-45.08%) ⬇️
...viders/cncf/kubernetes/operators/kubernetes_pod.py 69.69% <0%> (-25.26%) ⬇️
airflow/kubernetes/refresh_config.py 50.98% <0%> (-23.53%) ⬇️
airflow/config_templates/airflow_local_settings.py 64.28% <0%> (-1.76%) ⬇️
airflow/models/dag.py 91.55% <0%> (-0.03%) ⬇️
airflow/utils/log/cloudwatch_task_handler.py 100% <0%> (ø)

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 1d16de7...7d83211. Read the comment docs.

Copy link
Contributor

@msb217 msb217 left a comment

Choose a reason for hiding this comment

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

I think creating process_utils file makes sense. Do you think it would make sense to move more functionality to this process_utils file as well? For example, creating more generic util functions and then calling upon them from _kill_process, kill, terminate, start of the class DagFileProcessorProcess? And other files throughout dag_processing.py?

@mik-laj
Copy link
Member Author

mik-laj commented Feb 29, 2020

Do you have any specific example? Many operations are available via a nice API in the psutil library. Some operations have system APIs, e.g. os.kill, so they don't have to be in utils. I found one function - reap_process_group that could be moved to this module and I will try to do it in a separate PR.

@mik-laj mik-laj merged commit 4c227e2 into apache:master Mar 3, 2020
galuszkak pushed a commit to FlyrInc/apache-airflow that referenced this pull request Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler Scheduler or dag parsing Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants