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

Speed up Travis build times #290

Closed
dhermes opened this issue Oct 23, 2014 · 12 comments · Fixed by #308
Closed

Speed up Travis build times #290

dhermes opened this issue Oct 23, 2014 · 12 comments · Fixed by #308
Assignees
Labels
🚨 This issue needs some love. testing triage me I really want to be triaged.

Comments

@dhermes
Copy link
Contributor

dhermes commented Oct 23, 2014

I'm working on a strategy to use tox more selectively with Travis to speed up builds.

tox is great for local dev where the tox environ gets set up once and is re-used but setting up 6 environments (not including logs and dist) is a large cost.

$ ls .tox/
cover/  dist/  docs/  lint/  log/  py26/  py27/  regression/
$ ls .tox/log/
tox-0.log
$ ls .tox/dist/
gcloud-0.02.2.zip
@dhermes dhermes self-assigned this Oct 23, 2014
@tseaver
Copy link
Contributor

tseaver commented Oct 23, 2014

Hmm, the pylint bit is definitely the most time-consuming part, once we actually get scheduled on a CPU. Once we are running regression tests, they will likely run longer, too.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 23, 2014

@tseaver The tox installs take the most time (about a minute each, times six).

From there, run_pylint is the longest running script.

I'm focusing (for now) on reducing the install time.

Also,

From http://jsatt.com/blog/using-tox-with-travis-ci-to-test-django-apps/

Travis runs it's tasks based on the build matrix of environment variables
and language versions, allowing us to run each testenv asynchronously
and reporting the results for each version separately.
Using TOXENV potentially looks promising.

@tseaver
Copy link
Contributor

tseaver commented Oct 23, 2014

Note that the compiling C in the upstream dependencies injects the majority of the time: if they were distributed as wheels (compatible with our platform, of course) then we could nuke most of that. I guess we could build the wheels ourselves and push them to GH pages (or somewhere) as a "private index".

@dhermes
Copy link
Contributor Author

dhermes commented Oct 23, 2014

Interesting. This is compiling the crypto parts?

I stored some times in https://gist.github.com/dhermes/5088b5520bba841a3d0e and setup.py install takes up the bulk.

@tseaver
Copy link
Contributor

tseaver commented Oct 23, 2014

Crypto and CFFI:

$ find .tox/py27/ -name "*.so"
.tox/py27/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_36a40ff0x2bad1bae.so
.tox/py27/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_8f86901cxc1767c5a.so
.tox/py27/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_fc665d23x4f158fee.so
.tox/py27/lib/python2.7/site-packages/Crypto/Cipher/_DES.so
.tox/py27/lib/python2.7/site-packages/Crypto/Cipher/_AES.so
.tox/py27/lib/python2.7/site-packages/Crypto/Cipher/_ARC2.so
.tox/py27/lib/python2.7/site-packages/Crypto/Cipher/_DES3.so
.tox/py27/lib/python2.7/site-packages/Crypto/Cipher/_XOR.so
.tox/py27/lib/python2.7/site-packages/Crypto/Cipher/_CAST.so
.tox/py27/lib/python2.7/site-packages/Crypto/Cipher/_ARC4.so
.tox/py27/lib/python2.7/site-packages/Crypto/Cipher/_Blowfish.so
.tox/py27/lib/python2.7/site-packages/Crypto/Util/strxor.so
.tox/py27/lib/python2.7/site-packages/Crypto/Util/_counter.so
.tox/py27/lib/python2.7/site-packages/Crypto/Hash/_SHA512.so
.tox/py27/lib/python2.7/site-packages/Crypto/Hash/_MD4.so
.tox/py27/lib/python2.7/site-packages/Crypto/Hash/_RIPEMD160.so
.tox/py27/lib/python2.7/site-packages/Crypto/Hash/_SHA384.so
.tox/py27/lib/python2.7/site-packages/Crypto/Hash/_SHA256.so
.tox/py27/lib/python2.7/site-packages/Crypto/Hash/_SHA224.so
.tox/py27/lib/python2.7/site-packages/Crypto/Hash/_MD2.so
.tox/py27/lib/python2.7/site-packages/_cffi_backend.so

@dhermes
Copy link
Contributor Author

dhermes commented Oct 24, 2014

"Confirmed" Travis can do builds in parallel:
http://www.dominicrodger.com/tox-and-travis.html
http://docs.travis-ci.com/user/speeding-up-the-build/

Looking into compiling the C stuff.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 24, 2014

I found a project which creates wheel files on Travis and then commit them to a separate branch. I adapated this project to our needs and used the generated wheels in a build.

I was able to cut BUILD times from 7:49 to 3:17 and then finally down to 2:09. (NOTE: This simplication dumps off python2.6 testing and running in parallel with reduced install times via custom wheels may be the way to go.)

@dhermes
Copy link
Contributor Author

dhermes commented Oct 24, 2014

Using 100% pre-built wheels the whole install (our library and test deps) takes 10.92s. Running a secondary pip install --upgrade on all the dependencies (to make sure the pre-built wheels are not out-of-date) takes an additional 5.90s. (Also it takes 2.26s to clone the repo holding our pre-built wheels.)

See:
https://gist.github.com/dhermes/b618c1dcbe0d811865eb
https://travis-ci.org/dhermes/gcloud-python/builds/38970047

@tseaver WDYT of this strategy? To clarify, the strategy is:

  • Build wheels on Travis, store in separate repo. These are static and only need to be updated on the order of once a week (but likely less).
  • Use our pre-built wheels to pip install --no-index --find-links=LOCAL_WHEELS
  • Run pip install --upgrade to make sure we are up-to-date (or get the new version). Since updating wheels is disjoint from the gcloud-python builds.

We can incorporate this strategy into tox and still use the parallel builds or ditch tox and manage dependencies ourselves (seems scary).

@tseaver
Copy link
Contributor

tseaver commented Oct 27, 2014

I don't honestly think using Travis to build the wheels is much of a win (as opposed to doing it manually when we notice that a new version is out, and decide to adopt it).

We could choose to build a private index from the set of wheels after building them. See https://gist.github.com/tseaver/dc75c100b70323803bc3 for an example (it predates wheels, and so would need to be updated to scan them).

To re-create the index pages after adding a distribution / wheel (e.g., 'foo-1.2.3.tar.gz') into 'gcloud/production':

$ cd /path/to/indexrepo
$ git pull
$ python make_index.py
$ git add gcloud/production
$ git commit -m "Add foo 1.2.3."

@dhermes
Copy link
Contributor Author

dhermes commented Oct 27, 2014

I am under the impression that using Travis to build the wheels is needed due to potential platform dependencies.

Also, with the setup I describe in
GoogleCloudPlatform/gcloud-python-wheels#1
it will allow new wheels to be built without any manual intervention on our part (which is a positive).

@silvolu
Copy link
Contributor

silvolu commented Oct 27, 2014

+1 for no manual intervention.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 28, 2014

@tseaver #308 should wrap this up. Sorry to have ignored the custom index you showed in the gist. It certainly looked useful, but I had already gotten this method working. FWIW I was pleasantly surprised at how close to the default tox build process we were able to get with the wheelhouse solution.

@jgeewax jgeewax modified the milestone: Core Stable Jan 30, 2015
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 7, 2020
atulep pushed a commit that referenced this issue Apr 3, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 413453425

Source-Link: googleapis/googleapis@2b47b24

Source-Link: googleapis/googleapis-gen@7ffe6e0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2ZmZTZlMGExYmY2M2Q4NTQwMDA5Y2U2OTg2NjBlYmI3MWM1NGZmMSJ9

feat: add WEBM_OPUS codec 
feat: add SpeechAdaptation configuration 
feat: add word confidence 
feat: add spoken punctuation and spoken emojis 
feat: add hint boost in SpeechContext
atulep pushed a commit that referenced this issue Apr 6, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 413453425

Source-Link: googleapis/googleapis@2b47b24

Source-Link: googleapis/googleapis-gen@7ffe6e0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2ZmZTZlMGExYmY2M2Q4NTQwMDA5Y2U2OTg2NjBlYmI3MWM1NGZmMSJ9

feat: add WEBM_OPUS codec 
feat: add SpeechAdaptation configuration 
feat: add word confidence 
feat: add spoken punctuation and spoken emojis 
feat: add hint boost in SpeechContext
atulep pushed a commit that referenced this issue Apr 6, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 413453425

Source-Link: googleapis/googleapis@2b47b24

Source-Link: googleapis/googleapis-gen@7ffe6e0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2ZmZTZlMGExYmY2M2Q4NTQwMDA5Y2U2OTg2NjBlYmI3MWM1NGZmMSJ9

feat: add WEBM_OPUS codec 
feat: add SpeechAdaptation configuration 
feat: add word confidence 
feat: add spoken punctuation and spoken emojis 
feat: add hint boost in SpeechContext
atulep pushed a commit that referenced this issue Apr 18, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 413453425

Source-Link: googleapis/googleapis@2b47b24

Source-Link: googleapis/googleapis-gen@7ffe6e0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2ZmZTZlMGExYmY2M2Q4NTQwMDA5Y2U2OTg2NjBlYmI3MWM1NGZmMSJ9

feat: add WEBM_OPUS codec 
feat: add SpeechAdaptation configuration 
feat: add word confidence 
feat: add spoken punctuation and spoken emojis 
feat: add hint boost in SpeechContext
parthea pushed a commit that referenced this issue Jun 4, 2023
…p/templates/python_library/.kokoro (#290)

Source-Link: https://togithub.com/googleapis/synthtool/commit/bb171351c3946d3c3c32e60f5f18cee8c464ec51
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f62c53736eccb0c4934a3ea9316e0d57696bb49c1a7c86c726e9bb8a2f87dadf
parthea added a commit that referenced this issue Jun 4, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this issue Jun 4, 2023
Source-Link: googleapis/synthtool@69fabae
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:562802bfac02e012a6ac34eda282f81d06e77326b82a32d7bbb1369ff552b387
parthea pushed a commit that referenced this issue Jun 4, 2023
Source-Link: googleapis/synthtool@703554a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:94961fdc5c9ca6d13530a6a414a49d2f607203168215d074cdb0a1df9ec31c0b
parthea pushed a commit that referenced this issue Jun 4, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Jun 4, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 472772457

Source-Link: googleapis/googleapis@855b74d

Source-Link: googleapis/googleapis-gen@b64b1e7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY0YjFlN2RhM2UxMzhmMTVjYTM2MTU1MmVmMDU0NWU1NDg5MWI0ZiJ9
parthea pushed a commit that referenced this issue Jun 4, 2023
Source-Link: googleapis/synthtool@ca87909
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6162c384d685c5fe22521d3f37f6fc732bf99a085f6d47b677dbcae97fc21392

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Jun 4, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 441524537

Source-Link: googleapis/googleapis@2a27391

Source-Link: googleapis/googleapis-gen@ab6756a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9

feat: AuditConfig for IAM v1
fix(deps): require grpc-google-iam-v1 >=0.12.4
docs: fix type in docstring for map fields
parthea pushed a commit that referenced this issue Aug 15, 2023
Source-Link: https://togithub.com/googleapis/synthtool/commit/eaef28efd179e6eeb9f4e9bf697530d074a6f3b9
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f8ca7655fa8a449cadcabcbce4054f593dcbae7aeeab34aa3fcc8b5cf7a93c9e
vchudnov-g pushed a commit that referenced this issue Sep 20, 2023
vchudnov-g pushed a commit that referenced this issue Sep 20, 2023
PR #290 included changes to the generated client but the conventional commit messages were not included in the PR. This PR updates the `begin-after-commit-hash` that owl-bot uses to pull changes from googleapis-gen to match [this commit](https://github.com/googleapis/googleapis-gen/search?q=0a3c7d272d697796db75857bac73905c68e498c3&type=commits).

The following changes are already in master:

feat: added more Environment RPCs
feat: added Versions service
feat: added Fulfillment service
feat: added TextToSpeechSettings.
feat: added location in some resource patterns
fix: removed incorrect resource annotation for UpdateEnvironmentRequest.
fix: add async client to %name_%version/init.py
chore: add autogenerated snippets
chore: remove auth, policy, and options from the reserved names list
feat: support self-signed JWT flow for service accounts
chore: enable GAPIC metadata generation
chore: sort subpackages in %namespace/%name/init.py
parthea pushed a commit that referenced this issue Sep 22, 2023
Source-Link: googleapis/synthtool@571ee2c
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:660abdf857d3ab9aabcd967c163c70e657fcc5653595c709263af5f3fa23ef67
parthea pushed a commit that referenced this issue Sep 22, 2023
Source-Link: googleapis/synthtool@56da63e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:993a058718e84a82fda04c3177e58f0a43281a996c7c395e0a56ccc4d6d210d7
parthea pushed a commit that referenced this issue Sep 22, 2023
* feat: add Dataproc Serverless for Spark Batches API

Committer: @medb
PiperOrigin-RevId: 402631995

Source-Link: googleapis/googleapis@95af2e4

Source-Link: googleapis/googleapis-gen@0ee7abd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGVlN2FiZDllY2QyOTUxZTk1ODMwMzY4MWE0YjI1MWE5NDgxMDdiNiJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Sep 22, 2023
…290)

Source-Link: https://togithub.com/googleapis/synthtool/commit/395d53adeeacfca00b73abf197f65f3c17c8f1e9
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6c1cbc75c74b8bdd71dada2fa1677e9d6d78a889e9a70ee75b93d1d0543f96e1
parthea pushed a commit that referenced this issue Sep 22, 2023
…290)

Source-Link: googleapis/synthtool@6b4d5a6
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Oct 21, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 474644226

Source-Link: googleapis/googleapis@f90b329

Source-Link: googleapis/googleapis-gen@4ad8763
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFkODc2M2JkZTY3NmY5MmEzZWI3MDc1M2FlMWNmZWQwZTgxMzg3ZSJ9

PiperOrigin-RevId: 474571730

Source-Link: googleapis/googleapis@5a9ee4d

Source-Link: googleapis/googleapis-gen@ceafe52
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2VhZmU1MjFmMTM3NjgwZmRlZTJmOWNhOWUxOTQ3Y2RkODI1MDcwZCJ9

fix(deps): require google-api-core>=1.33.1,>=2.8.0
fix(deps): require protobuf >= 3.20.1
parthea pushed a commit that referenced this issue Oct 21, 2023
- [x] Regenerate this pull request now.

Committer: @parthea
PiperOrigin-RevId: 410565213

Source-Link: googleapis/googleapis@35b8704

Source-Link: googleapis/googleapis-gen@16a2cf9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZhMmNmOTIzYjYzZDVlYmNlMWM4YTk2MWQzNjgwODQ4N2U4OTExNCJ9

Fixes #168 🦕
parthea added a commit that referenced this issue Oct 22, 2023
* chore: Update gapic-generator-python to v1.11.7

PiperOrigin-RevId: 573230664

Source-Link: googleapis/googleapis@93beed3

Source-Link: googleapis/googleapis-gen@f4a4eda
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjRhNGVkYWE4MDU3NjM5ZmNmNmFkZjkxNzk4NzIyODBkMWE4ZjY1MSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: Update gapic-generator-python to v1.11.8

PiperOrigin-RevId: 574178735

Source-Link: googleapis/googleapis@7307199

Source-Link: googleapis/googleapis-gen@ce3af21
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2UzYWYyMWI3YzU1OWE4N2MyYmVmYzA3NmJlMGUzYWVkYTNhMjZmMCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: Update gapic-generator-python to v1.11.9

PiperOrigin-RevId: 574520922

Source-Link: googleapis/googleapis@5183984

Source-Link: googleapis/googleapis-gen@a59af19
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTU5YWYxOWQ0YWM2NTA5ZmFlZGYxY2MzOTAyOTE0MWI2YTViODk2OCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* remove unused files

* update docs/index.rst

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this issue Oct 22, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 413453425

Source-Link: googleapis/googleapis@2b47b24

Source-Link: googleapis/googleapis-gen@7ffe6e0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2ZmZTZlMGExYmY2M2Q4NTQwMDA5Y2U2OTg2NjBlYmI3MWM1NGZmMSJ9

feat: add WEBM_OPUS codec 
feat: add SpeechAdaptation configuration 
feat: add word confidence 
feat: add spoken punctuation and spoken emojis 
feat: add hint boost in SpeechContext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. testing triage me I really want to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants