Jira (PUP-8616) puppet module upgrade crashes

2 views
Skip to first unread message

Nelson Araujo (JIRA)

unread,
Mar 28, 2018, 5:19:04 PM3/28/18
to puppe...@googlegroups.com
Nelson Araujo created an issue
 
Puppet / Bug PUP-8616
puppet module upgrade crashes
Issue Type: Bug Bug
Affects Versions: PUP 5.4.0
Assignee: Unassigned
Components: CLI, Modules
Created: 2018/03/28 2:18 PM
Environment:

Puppet 5.4.0

Priority: Normal Normal
Reporter: Nelson Araujo

When upgrading a module on a private Forge the client crashes:

$ puppet module upgrade --module_repository=http://<customer>...com google-gstorage
Notice: Preparing to upgrade 'google-gstorage' ...
Notice: Found 'google-gstorage' (v0.2.0) in /home/nelsona/.puppetlabs/etc/code/modules ...
Error: undefined method `gsub' for false:FalseClass
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/forge.rb:240:in `decode_uri'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/forge.rb:110:in `fetch'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/module_tool/applications/upgrader.rb:93:in `run'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/face/module/upgrade.rb:73:in `block (3 levels) in <top (required)>'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/interface/action.rb+eval[wrapper]:264:in `upgrade'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/application/face_base.rb:247:in `main'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/application.rb:383:in `run_command'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/application.rb:375:in `block in run'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/util.rb:665:in `exit_on_fail'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/application.rb:375:in `run'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/util/command_line.rb:137:in `run'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/lib/puppet/util/command_line.rb:73:in `execute'
/home/nelsona/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/puppet-5.4.0/bin/puppet:5:in `<top (required)>'
/home/nelsona/.rbenv/versions/2.5.0/bin/puppet:23:in `load'
/home/nelsona/.rbenv/versions/2.5.0/bin/puppet:23:in `<main>'

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Nelson Araujo (JIRA)

unread,
Mar 28, 2018, 5:29:02 PM3/28/18
to puppe...@googlegroups.com
Nelson Araujo commented on Bug PUP-8616
 
Re: puppet module upgrade crashes

Update: I tested against 4.10.0 and the problem does not occur.

Did you make breaking changes in the module protocol between 4.x and 5.x?

Craig Gomes (JIRA)

unread,
Apr 2, 2018, 5:31:04 PM4/2/18
to puppe...@googlegroups.com
Craig Gomes commented on Bug PUP-8616

Jesse Scott this looks related to the pagination changes that were made in the Forge.

Jesse Scott (JIRA)

unread,
Apr 2, 2018, 6:02:05 PM4/2/18
to puppe...@googlegroups.com
Jesse Scott commented on Bug PUP-8616

Can we see an example of the API responses sent by your private Forge instance? I suspect one of the pagination fields is "false" when it should be "null".

Josh Cooper (JIRA)

unread,
Apr 2, 2018, 6:35:04 PM4/2/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Puppet Developer Experience

Nelson Araujo (JIRA)

unread,
Apr 3, 2018, 5:36:05 PM4/3/18
to puppe...@googlegroups.com
Nelson Araujo commented on Bug PUP-8616

Is there a way to output Puppet's response get? BTW I'm using this Forge Server: https://rubygems.org/gems/puppet-forge-server

Jesse Scott (JIRA)

unread,
Apr 3, 2018, 5:44:05 PM4/3/18
to puppe...@googlegroups.com
Jesse Scott commented on Bug PUP-8616

Nelson Araujo you should be able to use curl or your web browser to make a request directly to the API and get the JSON back.

Something like:

with the URI of your local Forge mirror and desired output file path substituted.

It sounds like the maintainer of that gem could make an update to return the correct pagination values, we are also looking into making the module tool more tolerant of unexpected values in the API response in a future Puppet release.

Nelson Araujo (JIRA)

unread,
Apr 3, 2018, 6:22:03 PM4/3/18
to puppe...@googlegroups.com
Nelson Araujo updated an issue
Change By: Nelson Araujo
Attachment: forge_api.json

Nelson Araujo (JIRA)

unread,
Apr 3, 2018, 6:23:03 PM4/3/18
to puppe...@googlegroups.com

Jesse Scott (JIRA)

unread,
Apr 3, 2018, 7:40:05 PM4/3/18
to puppe...@googlegroups.com
Jesse Scott commented on Bug PUP-8616

Yes the value of the "next" field in the "pagination" section is "false" when it should be "null".

It looks like this bug was supposed to be resolved in the latest release of that gem though, are you using version 1.10.1?

https://github.com/unibet/puppet-forge-server/releases/tag/1.10.1

https://rubygems.org/gems/puppet-forge-server/versions/1.10.1

 

Josh Cooper (Jira)

unread,
Apr 1, 2020, 12:45:03 AM4/1/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8616

Given the lack of response, I'm going to close this. Please reopen if it is still an issue.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages