Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Enable cover tox env on Travis #628

Merged
merged 1 commit into from
Aug 15, 2016

Conversation

theacodes
Copy link
Contributor

Replace fragile app engine sdk download script with gcprepotools script -
this ensures the SDK is up-to-date and is a no-op if the SDK is installed
and up-to-date.

Resolves #617

@theacodes
Copy link
Contributor Author

(do not merge until I confirm the test god is behaving as expected)

if [[ "${TOX_ENV}" == "gae" && ! -d ${GAE_PYTHONPATH} ]]; then
python scripts/fetch_gae_sdk.py `dirname ${GAE_PYTHONPATH}`
if [[ "${TOX_ENV}" == "gae" || "${TOX_ENV}" == "cover" ]]; then
pip install git+https://github.com/GoogleCloudPlatform/python-repo-tools.git

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Aug 11, 2016

Is readthedocs.org build system using fetch_gae_sdk.py?

@theacodes
Copy link
Contributor Author

Is readthedocs.org build system using fetch_gae_sdk.py?

@dhermes god I hope not. Let me check.

@theacodes
Copy link
Contributor Author

@dhermes doesn't appear so. We mock all the app engine imports for the docs build.

@theacodes
Copy link
Contributor Author

(As an aside, this should also fix our GCE system tests on jenkins because tox is obtuse about environment variables)

@theacodes
Copy link
Contributor Author

Travis is only slow when you need it to be fast.

@pferate
Copy link
Contributor

pferate commented Aug 12, 2016

What do you think about changing the coveralls command to:

coverage report --show-missing --fail-under=100 && coveralls

and dropping {[coverbase]commands} from coveralls?

@theacodes
Copy link
Contributor Author

@pferate good point, there's no need for the coveralls tox env to re-run the tests.

@theacodes theacodes force-pushed the cover-on-travis branch 3 times, most recently from f8cb017 to 3aad378 Compare August 12, 2016 16:34
@dhermes
Copy link
Contributor

dhermes commented Aug 12, 2016

there's no need for the coveralls tox env to re-run the tests

You could just drop the coveralls tox env entirely?

@theacodes
Copy link
Contributor Author

@dhermes it works! the cover environment is failing because of missing branches in sqlalchemy.

@theacodes
Copy link
Contributor Author

You could just drop the coveralls tox env entirely?

That's what I did.

@theacodes
Copy link
Contributor Author

Okay, so I'm assuming we don't want to merge this because it makes travis fail. Does anyone want to tackle the missing branches in sqlalchemy so I can rebase and merge this?

@pferate
Copy link
Contributor

pferate commented Aug 12, 2016

I could take a stab at it.

@theacodes
Copy link
Contributor Author

@pferate that'd be swell. Otherwise I'll try to do it this afternoon.

@dhermes
Copy link
Contributor

dhermes commented Aug 12, 2016

It looks like oauth2client.client has also grown a branch miss via #588:

oauth2client/client.py                                696      0    202      1    99%   1945->1947

@pferate
Copy link
Contributor

pferate commented Aug 12, 2016

Got the SQLAlchemy tests taken care of, then I found that the new PKCE code has a partial branch as well.

@pferate
Copy link
Contributor

pferate commented Aug 12, 2016

Haha @dhermes barely beat me at posting it here.

@pferate
Copy link
Contributor

pferate commented Aug 12, 2016

@jonparrott, #629 has been submitted for you!

Replace fragile app engine sdk download script with gcprepotools script -
this ensures the SDK is up-to-date and is a no-op if the SDK is installed
and up-to-date.

Resolves googleapis#617
@theacodes
Copy link
Contributor Author

Rebased. Waiting on travis. @dhermes any concerns with merging this?

@dhermes
Copy link
Contributor

dhermes commented Aug 12, 2016

Nope no concerns

@pferate
Copy link
Contributor

pferate commented Aug 12, 2016

Hmm... Once again I'm seeing strange failures in my Travis fork, but it's not failing on the main repository. Is anybody else seeing anything similar?

For the pypy tox environment:
./scripts/install.sh: line 31: /home/travis/.pyenv/bin/pyenv: No such file or directory

It looks like ${HOME}/.pyenv exists, since it passes if [ ! -d "${HOME}/.pyenv" ]; then, but it fails on the next line, as if the cloned repo isn't there.

I cleared my Travis cache and restarted the test, but it failed again.... 😦

Any ideas?

@theacodes
Copy link
Contributor Author

@pferate not sure.

It's still reporting branch misses after rebase. What even?

@pferate
Copy link
Contributor

pferate commented Aug 12, 2016

Hmm.. tox -e cover reported no missed branches for me and you didn't change anything in oauth2client or tests.

What lines are being reported with missed branches?

@pferate
Copy link
Contributor

pferate commented Aug 12, 2016

It looks like an empty .pyenv directory is getting created somehow. I added some tracers to a test branch and got this:

ls -la "${HOME}"

total 80
drwxr-xr-x 18 travis travis  4096 Aug 12 22:14 .
drwxr-xr-x  3 root   root      33 Feb  5  2015 ..
--- OTHER DIRECTORIES OMITTED ---
drwxrwxr-x  2 travis travis     6 Aug 12 22:14 .pyenv
--- OTHER DIRECTORIES OMITTED ---

ls -la "${HOME}/.pyenv"

total 4
drwxrwxr-x  2 travis travis    6 Aug 12 22:14 .
drwxr-xr-x 18 travis travis 4096 Aug 12 22:14 ..

Maybe Travis is creating it for me, since it's called out as a cached directory?
$ git grep pyenv

.travis.yml:  - ${HOME}/.pyenv
scripts/install.sh:    if [ ! -d "${HOME}/.pyenv" ]; then
scripts/install.sh:        git clone https://github.com/yyuu/pyenv.git ${HOME}/.pyenv
scripts/install.sh:    ${HOME}/.pyenv/bin/pyenv install --skip-existing pypy-2.6.0
scripts/run.sh:# pyenv.
scripts/run.sh:    PATH="${HOME}/.pyenv/versions/pypy-2.6.0/bin:${PATH}"

I wonder if it's not failing in the main repo since it had pyenv cloned before #590 and #595, and is keeping the cached version. I'm thinking that if you delete the cache on the main repo, you will see the same failures that I am.

@theacodes
Copy link
Contributor Author

Seems we figured out the pyenv issues separately. Merging this.

@theacodes theacodes merged commit 499375c into googleapis:master Aug 15, 2016
@theacodes theacodes deleted the cover-on-travis branch August 15, 2016 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants