Skip to content

Travis flow optimization #5095

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

Closed
philpennock opened this issue Mar 21, 2018 · 5 comments · Fixed by #5450
Closed

Travis flow optimization #5095

philpennock opened this issue Mar 21, 2018 · 5 comments · Fixed by #5450
Labels
auto-locked Outdated issues that have been locked by automation C: automation Automated checks, CI etc state: awaiting PR Feature discussed, PR is needed type: maintenance Related to Development and Maintenance Processes

Comments

@philpennock
Copy link
Contributor

Description:

The current flow fires off a lot of jobs, even if there are trivial failures. Travis now has "build steps", to allow for chained dependencies. I've put together an experiment which might be interesting to you.

What I've run:

In this, the lints run first; a failure in either terminates. Then the other tests are run.

In fact, I split the other tests up too, designating one as the "primary", the latest released version of Python, and run that first. Only once that gives the all clear do the rest fire. The 'nightly' job can fail, as before.

This has the downside that time to complete success increases, because the primary has to succeed before the soaks fire, but has the upside that it's clearer what to investigate, and keeps your hosting happier about resource-consumption by not burning containers doing things you know are going to fail. If you're already waiting 25+ minutes for a test, there's not that much difference.

But that's more contentious. I think the approach might be interesting to you, so have put together the test repo to try things out, and gotten the replacement matrix working, which should be enough for the maintainers to decide if there's anything worthwhile in this.

What didn't work?

Using an implicit 'test' stage, or anything pulling in a test stage, given an explicit matrix, just didn't seem to work. Build stages seem to interact properly with implicit matrix expansion to populate steps, but not with explicit matrices. But at least the allow_failure and fast_finish do work correctly.

@pradyunsg
Copy link
Member

Hey @philpennock!

I've mentioned this in the past (#4478) but I never actually got to it.

I'll be happy to accept a PR for this. :)

@pradyunsg pradyunsg added C: automation Automated checks, CI etc type: maintenance Related to Development and Maintenance Processes state: awaiting PR Feature discussed, PR is needed labels Apr 7, 2018
@philpennock
Copy link
Contributor Author

What aspects of the test repo setup do you like or dislike? The ticket above has links to a working setup for how things might be split, and the Travis results of that. The build steps themselves are dummy, but the framework should be 1:1 comparable, because I wrote it for double-checking how pip might behave.

I can go ahead and submit a PR, but I figure iterating on rough design on a repo where the tests take less than three minutes (and that long because of sleep invocations) is easier for everyone than iterating where the builds take ... "much longer".

@pradyunsg
Copy link
Member

Hi @philpennock!

Sorry for the delay! Looking at the build matrix, I think something else would be nice:

  • "Primary"
    • lint
    • docs
    • CPython 3.6 (latest stable)
    • CPython 2.7
  • "Secondary"
    • everything else
      • in descending order of versions
        • we get to pop off the lowest item when dropping support. :P

@pradyunsg
Copy link
Member

I do understand that this is longer than the 2 minutes from the linting only, but this information is definitely more useful and this will fail faster than status quo anyway.

Another idea would be to run the unit tests only but they aren't very useful (yet).

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: automation Automated checks, CI etc state: awaiting PR Feature discussed, PR is needed type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants