kurocha/teapot

Time outs when `fetch` on MacOS

Closed this issue · 20 comments

Trying to fetch dependencies for a project, teapot keeps looping over dependencies for an hour until git timesout.
Recent timeout:

Package locked to commit: master/4d95d75cbb3df6a20defefcdbdcf8f5f103ba9ea
Updating package at path (filtered)/build-darwin...
Processing clones platform-darwin-osx from https://github.com/kurocha/platform-darwin-osx...
Package locked to commit: master/d352ae8d26a35585bc74b83c5fbace3c317f7bb7
Updating package at path (filtered)/platform-darwin-osx...
Processing clones build-darwin from https://github.com/kurocha/build-darwin...
Package locked to commit: master/4d95d75cbb3df6a20defefcdbdcf8f5f103ba9ea
Updating package at path (filtered)/build-darwin...
Processing clones platform-darwin-osx from https://github.com/kurocha/platform-darwin-osx...
Package locked to commit: master/d352ae8d26a35585bc74b83c5fbace3c317f7bb7
Updating package at path (filtered)/platform-darwin-osx...
Elapsed Time: 5105.826s
curl error: Connection timed out after 2087426 milliseconds

(filtered).gem/ruby/2.2.5/gems/rugged-0.26.0/lib/rugged/repository.rb:215:in `fetch'
(filtered).gem/ruby/2.2.5/gems/rugged-0.26.0/lib/rugged/repository.rb:215:in `fetch'
(filtered).gem/ruby/2.2.5/gems/teapot-2.2.0/lib/teapot/command/fetch.rb:153:in `clone_or_pull_package'
(filtered).gem/ruby/2.2.5/gems/teapot-2.2.0/lib/teapot/command/fetch.rb:198:in `fetch_package'
(filtered).gem/ruby/2.2.5/gems/teapot-2.2.0/lib/teapot/command/fetch.rb:67:in `block in invoke'
(filtered).rubies/ruby-2.2.5/lib/ruby/2.2.0/set.rb:283:in `each_key'
(filtered).rubies/ruby-2.2.5/lib/ruby/2.2.0/set.rb:283:in `each'
(filtered).gem/ruby/2.2.5/gems/teapot-2.2.0/lib/teapot/command/fetch.rb:66:in `invoke'
(filtered).gem/ruby/2.2.5/gems/teapot-2.2.0/lib/teapot/command.rb:112:in `block in invoke'
(filtered).gem/ruby/2.2.5/gems/samovar-1.7.0/lib/samovar/command/track_time.rb:28:in `track_time'
(filtered).gem/ruby/2.2.5/gems/teapot-2.2.0/lib/teapot/command.rb:111:in `invoke'
(filtered).gem/ruby/2.2.5/gems/teapot-2.2.0/bin/teapot:28:in `<top (required)>'
(filtered).gem/ruby/2.2.5/bin/teapot:23:in `load'
(filtered).gem/ruby/2.2.5/bin/teapot:23:in `<top (required)>'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `load'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:28:in `run'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/cli.rb:463:in `exec'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/cli.rb:27:in `dispatch'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/cli.rb:18:in `start'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
(filtered).gem/ruby/2.2.5/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'
(filtered).gem/ruby/2.2.5/bin/bundle:23:in `load'
(filtered).gem/ruby/2.2.5/bin/bundle:23:in `<main>'

Can you please tell me what version of teapot you are using and what command you are executing?

Also, that's a super old version of Ruby.

Cheers for a quick pickup, command as per your docs bundle exec teapot fetch ruby 2.3.7 - 2.5 (tried on various versions) I don't think that's the issue tho...

The best thing to do at this point would be to use teapot v3.1 since 90% of the packages have been updated and migrated.

Unless this is for an existing project and you have a lock file for all the existing packages, then it should work correctly. Perhaps use teapot 2.3 which is the latest and final 2.x release.

Wow 90% code change sounds like a major upgrade. Will give it a run in the morning; will report back

Yeah version gem "teapot", "~> 2.0"

It's not 90% code change, it's that the DSL for the packages was simplified slightly, and packages were updated to suit the new DSL. teapot packages use a rolling release model, so they are not forwards/backwards compatible in all situations.

Can you show me your full lockfile and teapot.rb

Yeah I've noticed with your concurrent

The features from concurrent which were in fact regarding parallelism were moved to a new package parallel: https://github.com/kurocha/parallel

Regarding this issue more generally: I've been considering doing some kind of semantic versioning - but it's a bit beyond how the system works currently, and for most projects I normally commit the lockfile, or do teapot fetch --update and deal with the changes.

It's possible to specify project.version which could conceivably be used for some kind of semantic versioning. teapot would need to use git tags to figure out the latest compatible version. Honestly, I'm not sure it's the right model. Open to ideas. I know it's a bit hostile to users like yourself, but the forward migration should be relatively straight forward provided all packages you are using have been updated.

Yeah version gem "teapot", "~> 2.0"

teapot v2.3.0 was the final 2.x stable release: https://rubygems.org/gems/teapot/versions/2.3.0

It won't work for new projects but it will work for existing projects which have a lock file. If you still having some problems, I can provide a known good Gemfile which locks versions of several related gems. It's unfortunate there might have been some backwards incompatible stuff tied into the 2.x release, but sometimes I stuff up - teapot is a pretty complex project and I'm only one person. I move fast and break stuff because that's best for me.

recent run of fetch with teapot 3.1

47.44s: Cloning package at path (...)/unit-test...
50.32s: #<Teapot::Command::Top:0x00007fc79807e100>
      |   KeyError: Object Build/Files already exists!
      |   → /Library/Ruby/Gems/2.3.0/gems/build-dependency-1.4.0/lib/build/dependency/set.rb:61 in `add'
      |     /Library/Ruby/Gems/2.3.0/gems/build-dependency-1.4.0/lib/build/dependency/provider.rb:200 in `block in depends'
      |     /Library/Ruby/Gems/2.3.0/gems/build-dependency-1.4.0/lib/build/dependency/provider.rb:199 in `each'
      |     /Library/Ruby/Gems/2.3.0/gems/build-dependency-1.4.0/lib/build/dependency/provider.rb:199 in `depends'
      |     (...)/teapot/packages/vulkanraum/async-http/teapot.rb:47 in `block in load!'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/loader.rb:112 in `define_target'
      |     (...)/teapot/packages/vulkanraum/async-http/teapot.rb:24 in `load!'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/loader.rb:178 in `instance_eval'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/loader.rb:178 in `load!'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/loader.rb:152 in `initialize'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/context.rb:94 in `new'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/context.rb:94 in `load'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/select.rb:111 in `load_package!'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/select.rb:133 in `block (2 levels) in load!'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/configuration.rb:186 in `block in merge'
      |     /Library/Ruby/Gems/2.3.0/gems/build-dependency-1.4.0/lib/build/dependency/set.rb:78 in `each_value'
      |     /Library/Ruby/Gems/2.3.0/gems/build-dependency-1.4.0/lib/build/dependency/set.rb:78 in `each'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/configuration.rb:179 in `merge'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/select.rb:131 in `block in load!'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/configuration.rb:161 in `traverse'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/select.rb:130 in `load!'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/select.rb:56 in `initialize'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/context.rb:52 in `new'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/context.rb:52 in `select'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/command/fetch.rb:71 in `invoke'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/lib/teapot/command.rb:106 in `invoke'
      |     /Library/Ruby/Gems/2.3.0/gems/teapot-3.1.0/bin/teapot:29 in `<top (required)>'
      |     /usr/local/bin/teapot:22 in `load'
      |     /usr/local/bin/teapot:22 in `<top (required)>'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74 in `load'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74 in `kernel_load'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:28 in `run'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:463 in `exec'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27 in `run'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126 in `invoke_command'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387 in `dispatch'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:27 in `dispatch'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466 in `start'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:18 in `start'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:30 in `block in <top (required)>'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124 in `with_friendly_errors'
      |     /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:22 in `<top (required)>'
      |     /usr/local/bin/bundle:22 in `load'
      |     /usr/local/bin/bundle:22 in `<main>'```

Show me your teapot.rb and I will update it for you.

That error is because I made teapot more strict with the dependency resolution. It won't allow you to have the same thing listed twice.

Some package might not be updated to support 3.1 yet - not sure about async-http, need to check it.

My config

define_configuration "test-run" do |configuration|
  configuration[:source] = "https://github.com/kurocha"
  
  configuration.require "platforms"
  
  configuration.require "async-http"
  
  configuration.require "zlib-ng"
  configuration.require "images"
  
  configuration.require "build-cmake"
  configuration.require "build-make"
  
  configuration.require "glslang"
  configuration.require "vulkan-sdk"

  configuration.require "euclid"
  configuration.require "buffers"
  configuration.require "tagged-format"
  configuration.require "units"
  
  configuration.require "commander"
  configuration.require "streams"
  
  configuration.require "generate-template"
  configuration.require "generate-cpp-class"
  
  configuration.require "unit-test"
end

Let me play with it for a bit I may fix it in parallel

Thanks for your swish support, mate!

Unrelated of Matt's issue, I am making sense of build and teapot in general. SDK is installed separately with Xcode. Regardless, let me look into the teapot's "strict with the dependency"

I'm going to close this issue, it's fixed by using the latest stable 3.x release :p