FussyFox / fussyfox.github.io

A real-time code linting platform for GitHub
https://fussyfox.github.io
5 stars 1 forks source link

increase linting timeout #6

Open syphar opened 4 years ago

syphar commented 4 years ago

for our definitely not small application, the linters timeout.

Mostly still showing "running linter"

Bildschirmfoto 2019-12-19 um 07 56 05

Sometimes I also saw a "timeout after 200s" message.

Or is the linter stuck here? (without logs difficult to debug)

it happens not only with one, but more linters

Bildschirmfoto 2019-12-19 um 07 58 14
codingjoe commented 4 years ago

Hi @syphar, Yes, the current timeout for subprocess that runs the linter itself is set to 200s: https://github.com/FussyFox/lintipy/blob/5c89ef330f178d6ae854072d6b871de29b28ccb0/lintipy.py#L155

This is mainly due to AWS Lambda's 300s function timeout. This the total and must also facilitate pulling the code and setting sending status updates to GitHub, like the timeout message you are seeing.

Anyhow, apparently AWS increased the limit a function can be run. I would be ok, increasing the execution time, since my AWS bill doesn't kill me yet.

That being said, we should still verify that there isn't another issue, that is causing the timeout, except this probably being a very large repository (let me guess which one 😉 ). Can you provide me with the commit hash and a repo name I'll look though the logs. I can also share them, if you want me too.

Merry Xmas 🎄 -Johannes

codingjoe commented 4 years ago

Soo, I removed you comment, since the repo name doesn't need to be publicly available.

Anyhow, I looked through the code and the timeout occurred during the execution of the linter. That being said, the code download takes a whopping 8 seconds followed by a 10 second gzip extract.

I did only look into the isort, but actually the timeout message you see at GitHub will be different depending on what part of the process times out. So my guess is, it is always the linter. Knowing the repo, that doesn't come as a surprise... it's just too much my code 😜

Going forward, there are two options.

  1. Use GitHub actions. They are slower, but you have the added benefit of adding constraints. e.G. running your test suite only after the linters have passed. If you are looking for a large example of a GitHub CI workflow with Docker, PostGis and other extras, here is something I wrote recently.
  2. We – and by we I mean you – increase the timeout to 15min. I am happy to do that, but only if it's worth the effort. How long does isort or falke8 take on your local machine as a single process -j0? You can increase the limit in the line that I pointed out earlier. Once the package is released, dependabot will update all functions. However, the function timeout will also be increased here: https://github.com/FussyFox/isort/blob/03ec6cc9bf5c88539818020f394566ed9c120a00/.travis.yml#L21

Your call :)