voxpupuli / puppet-blacksmith

Ruby Gem with Puppet Module utilities
Apache License 2.0
69 stars 31 forks source link

Errno: EPIPE when trying to push #39

Open jaxxstorm opened 7 years ago

jaxxstorm commented 7 years ago

When trying to do an initial push of a module, I'm getting Errno::EPIPE: Broken pipe

Uploading to Puppet Forge jaxxstorm/cron
rake aborted!
Errno::EPIPE: Broken pipe
/Users/Lee/github/puppet-cron/vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/request.rb:270:in `net_http_do_request'
/Users/Lee/github/puppet-cron/vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/request.rb:418:in `block in transmit'
/Users/Lee/github/puppet-cron/vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
/Users/Lee/github/puppet-cron/vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
/Users/Lee/github/puppet-cron/vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
/Users/Lee/github/puppet-cron/vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient.rb:69:in `post'
/Users/Lee/github/puppet-cron/vendor/bundle/ruby/2.3.0/gems/puppet-blacksmith-3.4.0/lib/puppet_blacksmith/forge.rb:56:in `push!'
/Users/Lee/github/puppet-cron/vendor/bundle/ruby/2.3.0/gems/puppet-blacksmith-3.4.0/lib/puppet_blacksmith/rake_tasks.rb:118:in `block (2 levels) in define'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/Users/Lee/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
/Users/Lee/.rvm/gems/ruby-2.3.1/bin/bundle:23:in `load'
/Users/Lee/.rvm/gems/ruby-2.3.1/bin/bundle:23:in `<main>'
/Users/Lee/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/Users/Lee/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => module:push
(See full trace by running task with --trace)

Running ruby 2.3.1 on OS X if that helps

jaxxstorm commented 7 years ago

It looks like the reason for this is that the package that's being built is including the vendor directory, which is in my .gitignore and creating a very large (~40mb) package.

Is there something which might be causing blacksmith to include the vendor path even though it's in my .gitignore ?

jaxxstorm commented 7 years ago

For those that come across this, it's kinda silly.

Your gitignore must have a slash after the dir name.

So vendor won't work But vendor/ will.

rski commented 7 years ago

@jaxxstorm does git ignore the folder and blacksmith not?

jaxxstorm commented 7 years ago

@rski see last comment, was a silly typo

rski commented 7 years ago

Yes, I see, but i think this is still an issue. Blacksmith should ignore the same things that git does. vendor works for git so why not for blacksmith? Also the fact that a typo causes a completely irrelevant error like Errno::EPIPE: Broken pipe should probably be addressed imo.

jaxxstorm commented 7 years ago

The broken pipe error was because of the size of the resulting module, which I didn't immediately notice. It should probably catch the error from the API better about the size of the uploaded module? I'll reopen and let someone else triage