potiuk commented on issue #6056: [AIRFLOW-5440] Static checks from docker file 
use dumb-init
URL: https://github.com/apache/airflow/pull/6056#issuecomment-529196017
 
 
   CC: @nuclearpinguin -> this was the most likely culprit from what you saw as 
"hanging" mypy. The problem was that when you thought you killed a running 
pre-commit check with ^C it was actually still running. Pre-commit runs as many 
containers in the background as many processes you have so if you start running 
one or two of those in parallel  and a docker build on top of it, you can 
imagine that docker might get totally stuck (especially on MacOS where we mount 
files over the super-slow - in some cases - osxfs). In this case, it gets 
docker so slow that it even stops responding for a long time to a docker ps 
command from what I saw.
   
   You can read more about it in here, where docker developers explain 
performance issues on osx and that they are working on improving it: 
https://docs.docker.com/docker-for-mac/osxfs/#performance-issues-solutions-and-roadmap
   
   This commit addresses the problem in the way that any cancelled pre-commit 
or script-originated static check (with Ctrl^C/SIGTERM or any other catchable 
signal) will also cancel running pre-commit checks. Unlike running the The 
dumb-init entrypoint is designed in the way to propagate such signals to 
scripts executed as parameter of the entrypoint. I tested it and could 
reproduce both behaviours - before and after dumb-init and it works as expected 
(before dumb-init, cancelling pre-commit did not kill the running containers, 
after dumb-init they are killed immediately). You can read more about the 
problem here: https://github.com/Yelp/dumb-init

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to