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

Travis task for Linting times out #10669

Closed
balloob opened this issue Nov 19, 2017 · 5 comments
Closed

Travis task for Linting times out #10669

balloob opened this issue Nov 19, 2017 · 5 comments

Comments

@balloob
Copy link
Member

balloob commented Nov 19, 2017

Problem

This started happening recently as we've gathered more requirements.

  • For the linting task, we will install ALL requirements of all platforms. This is currently 375 packages, not counting any of their dependencies. The reason we do this is:

    • PyLint will verify if dependencies have the methods/properties that we call on the objects
    • We verify that we can install all requirements. If we don't do this during CI, it happens while building our Docker image at which point it's already in dev
  • Tox will not show any output of the command while the command is running.

  • Travis will kill any command that hasn't produced any output for 10 minutes. We bump this to 20 minutes by prefixing command with travis_wait

Result: tox gets killed by travis and we need to restart the build and hope for a faster machine.

Possible Solutions

  1. The linting task currently runs pylint, flake8 and pydocstyle. We could move flake8 and pydocstyle to their own task, as they don't need any requirements installed. This will buy us some extra time.
  2. We find a way for tox to show the installation progress to prevent Travis from timing out
  3. We see if we can configure pylint to not care about 3rd party dependencies. (We still want to install everything, just not lint it)
  4. We build the docker image during Travis to verify requirements can be installed and disable import-error warning in pylint. Downside: we use a lot more Travis resources per build which means we get less builds.
@MartinHjelmare
Copy link
Member

See tox-dev/tox#403 with a new verbose option in tox. Needs tox >= 2.5.0.

@MartinHjelmare
Copy link
Member

Another solution is to extend the time that travis waits:
https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
In the example they extend the time to 30 min.

@MartinHjelmare
Copy link
Member

MartinHjelmare commented Nov 19, 2017

Ok, I've tested running travis with the new tox option, tox -vv. The option works, but the problem with that is you have to run travis without travis_wait to get output, and then the issue becomes the pylint job which runs longer than 10 min and doesn't give output either.
https://travis-ci.org/MartinHjelmare/home-assistant/jobs/304287943

So now the options are, either find a way to get pylint to give output during its run, or extend the travis_wait period to eg 30 min.

@balloob
Copy link
Member Author

balloob commented Nov 19, 2017

Oh, we can extend travis_wait. Well, let's do that right away…

You're right that verbose tox is not going to help if travis_wait wraps the whole process. Hmm

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@balloob balloob closed this as completed Mar 3, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants