Closed Bug 1148966 Opened 9 years ago Closed 9 years ago

Use container based travis CI to improve test wait times

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rail, Assigned: rail)

References

Details

Attachments

(3 files)

Sometimes it takes a lot of time to get Travis test coverage. 

Per http://docs.travis-ci.com/user/workers/container-based-infrastructure/:

* start up faster
* allow the use of caches for public repositories

Let's optimize a bit more!
Attached patch custom.diffSplinter Review
Attachment #8585228 - Flags: review?(bugspam.Callek)
Attachment #8585229 - Flags: review?(bugspam.Callek)
* 3 chunks
* s/pep8/flake8/
Attachment #8585230 - Flags: review?(bugspam.Callek)
All 3 patches are tested in my user repos
Comment on attachment 8585230 [details] [diff] [review]
faster_tests-buildbot-configs.diff

Review of attachment 8585230 [details] [diff] [review]:
-----------------------------------------------------------------

::: .travis.yml
@@ +5,5 @@
> +sudo: false
> +
> +env:
> +  global:
> +    - PIP_FIND_LINKS=file://$HOME/.cache/pip

not sure I get why PIP_FIND_LINKS was needed... (even when looking at your git commit history and related travis jobs)

::: test-masters.sh
@@ +27,5 @@
> +    exit 1
> +  fi
> +}
> +
> +if [ "$1" == "--unittests-only" ]; then

please allow (with deprecation warning) "run-tests" as the trigger for this at least in the short term. (I think some of the stuff armen was working on was using it)

(I'm happy to be talked out of this opinion)

@@ +63,5 @@
>  FAILFILE=$(mktemp $WORK/tmp.failfile.XXXXXXXXXX)
>  atexit+=("rm $FAILFILE")
>  
>  # Construct the set of masters that we will test.
> +MASTERS=($(./setup-master.py -l -j "$MASTERS_JSON" --tested-only --error-logs))

"$@" was used to allow us to specify additional input, I don't think anyone actively used it, but mentioning incase it will matter.

::: tox.ini
@@ +45,5 @@
> +
> +[flake8]
> +exclude = .ropeproject,.tox
> +show-source = True
> +max-line-length=159

So I've been pretty much against flake8 (instead of seperate pyflakes and pep8 calls) until I read this hunk; including it in the tox.ini is *awesome* thanks.
Attachment #8585230 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 8585229 [details] [diff] [review]
faster_tests-tools.diff

Review of attachment 8585229 [details] [diff] [review]:
-----------------------------------------------------------------

r+ if you undo the comment-out of irc notifs

::: .travis.yml
@@ +7,3 @@
>  env:
> +  global:
> +    - PIP_FIND_LINKS=file://$HOME/.cache/pip

same find_links confusion

@@ +46,5 @@
> +    #template:
> +      #- "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}"
> +      #- "Change view : %{compare_url}"
> +      #- "Build details : %{build_url}"
> +      #- "Commit message : %{commit_message}"

undo this hunk
Attachment #8585229 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 8585228 [details] [diff] [review]
custom.diff

Review of attachment 8585228 [details] [diff] [review]:
-----------------------------------------------------------------

::: .travis.yml
@@ +5,5 @@
> +sudo: false
> +
> +env:
> +  global:
> +    - PIP_FIND_LINKS=file://$HOME/.cache/pip

again .. ;-)
Attachment #8585228 - Flags: review?(bugspam.Callek) → review+
(In reply to Justin Wood (:Callek) from comment #5)
> Comment on attachment 8585230 [details] [diff] [review]
> faster_tests-buildbot-configs.diff
> 
> Review of attachment 8585230 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: .travis.yml
> @@ +5,5 @@
> > +sudo: false
> > +
> > +env:
> > +  global:
> > +    - PIP_FIND_LINKS=file://$HOME/.cache/pip
> 
> not sure I get why PIP_FIND_LINKS was needed... (even when looking at your
> git commit history and related travis jobs)

This is used by "pip install tox" inside .travis.yml. Tox ignores environment variables AFAIK.

 
> ::: test-masters.sh
> @@ +27,5 @@
> > +    exit 1
> > +  fi
> > +}
> > +
> > +if [ "$1" == "--unittests-only" ]; then
> 
> please allow (with deprecation warning) "run-tests" as the trigger for this
> at least in the short term. (I think some of the stuff armen was working on
> was using it)

Let's ask Armen about this.

I'd prefer to kill the old option without any deprecation warning (written in bash, eeew).

> @@ +63,5 @@
> >  FAILFILE=$(mktemp $WORK/tmp.failfile.XXXXXXXXXX)
> >  atexit+=("rm $FAILFILE")
> >  
> >  # Construct the set of masters that we will test.
> > +MASTERS=($(./setup-master.py -l -j "$MASTERS_JSON" --tested-only --error-logs))
> 
> "$@" was used to allow us to specify additional input, I don't think anyone
> actively used it, but mentioning incase it will matter.

I didn't want to increase complexity of this script by separating its own options and options passed to to setup-master.py. This script should be used by CI only! :P 
> ::: tox.ini
> @@ +45,5 @@
> > +
> > +[flake8]
> > +exclude = .ropeproject,.tox
> > +show-source = True
> > +max-line-length=159
> 
> So I've been pretty much against flake8 (instead of seperate pyflakes and
> pep8 calls) until I read this hunk; including it in the tox.ini is *awesome*
> thanks.

Sweet! :)
Flags: needinfo?(armenzg)
Agreed on IRC.
Flags: needinfo?(armenzg)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
See Also: → 1156251
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: