Downgrade your ridley gem if berks upload doesn't work


#1

There’s a regression in the newest version of ridley, 0.8.4, or one of it’s
dependencies that breaks berks upload. It caused me a few hours of
anguish today tracking down the solution, so I decided to go ahead and let
everyone know so no one else has to debug it as well.

Just put this in your Gemfile and you’ll be good to go.

gem ‘ridley’, “0.8.3”

-Kevin


#2

Thanks Kevin! I lost a few hours on this one yesterday as well before finally giving up and pinning Berkshelf to an older version. I switched to your solution and upload works. I do still get the following:

Ridley::Errors::HTTPBadRequest {“error”:[“Field ‘metadata.name’ invalid”]}

It appears to be benign, but I’ll need to investigate when I actually have changes to push. Thanks again for sharing the knowledge.

:: toddmichael

On Mar 14, 2013, at 8:03 PM, Kevin Nuckolls wrote:

There’s a regression in the newest version of ridley, 0.8.4, or one of it’s dependencies that breaks berks upload. It caused me a few hours of anguish today tracking down the solution, so I decided to go ahead and let everyone know so no one else has to debug it as well.

https://github.com/RiotGames/ridley/issues/74

Just put this in your Gemfile and you’ll be good to go.

gem ‘ridley’, “0.8.3”

-Kevin


#3

On Fri, Mar 15, 2013 at 12:16 AM, Todd Michael Bushnell
todd@toorsecurity.com wrote:

Thanks Kevin! I lost a few hours on this one yesterday as well before
finally giving up and pinning Berkshelf to an older version. I switched to
your solution and upload works. I do still get the following:

Ridley::Errors::HTTPBadRequest {“error”:[“Field ‘metadata.name’ invalid”]}

It appears to be benign, but I’ll need to investigate when I actually have
changes to push. Thanks again for sharing the knowledge.

I’ve seen upload failures with this on cookbooks that don’t explicitly
set “name” in their metadata.rb. Setting it seems to fix it. Which
reminds, I need to submit a couple of PRs.


#4

Yeah, that was the first thing I checked. It’s set properly so not sure what’s causing this. Cheers!

::toddmichael

On Mar 14, 2013, at 9:25 PM, JD Harrington wrote:

On Fri, Mar 15, 2013 at 12:16 AM, Todd Michael Bushnell
todd@toorsecurity.com wrote:

Thanks Kevin! I lost a few hours on this one yesterday as well before
finally giving up and pinning Berkshelf to an older version. I switched to
your solution and upload works. I do still get the following:

Ridley::Errors::HTTPBadRequest {“error”:[“Field ‘metadata.name’ invalid”]}

It appears to be benign, but I’ll need to investigate when I actually have
changes to push. Thanks again for sharing the knowledge.

I’ve seen upload failures with this on cookbooks that don’t explicitly
set “name” in their metadata.rb. Setting it seems to fix it. Which
reminds, I need to submit a couple of PRs.


#5

On Thursday, March 14, 2013, Todd Michael Bushnell wrote:

Thanks Kevin! I lost a few hours on this one yesterday as well before
finally giving up and pinning Berkshelf to an older version. I switched to
your solution and upload works. I do still get the following:

Ridley::Errors::HTTPBadRequest {“error”:[“Field ‘metadata.name’ invalid”]}

It appears to be benign […]

Not benign, I was bit by both issues yesterday while bootstrapping a local
dev server. Wish I would have seen this thread earlier.

Started to prep pull requests before I realized the scope of the problem.
(~tens of community cookbooks affected.) Besides, isn’t the name optional
anyways? Ridley appears to try and use a fallback name when uploading if
one isn’t present, not sure where its going wrong.

As a new Chef user, I’ve found the lack of stability with documentation
and some of the community tools very frustrating in the last month. Tough
time to get started, too easy to waste a lot of time on bugs and unspoken
10/11 changes.

-n


#6

Fix to Ridley is coming this weekend; wasn’t able to address it because I was traveling.

Jamie Winsor
@resetexistence

On Mar 15, 2013, at 10:26 AM, nick hatch nicholas.hatch@gmail.com wrote:

On Thursday, March 14, 2013, Todd Michael Bushnell wrote:

Thanks Kevin! I lost a few hours on this one yesterday as well before finally giving up and pinning Berkshelf to an older version. I switched to your solution and upload works. I do still get the following:

Ridley::Errors::HTTPBadRequest {“error”:[“Field ‘metadata.name’ invalid”]}

It appears to be benign […]

Not benign, I was bit by both issues yesterday while bootstrapping a local dev server. Wish I would have seen this thread earlier.

Started to prep pull requests before I realized the scope of the problem. (~tens of community cookbooks affected.) Besides, isn’t the name optional anyways? Ridley appears to try and use a fallback name when uploading if one isn’t present, not sure where its going wrong.

As a new Chef user, I’ve found the lack of stability with documentation and some of the community tools very frustrating in the last month. Tough time to get started, too easy to waste a lot of time on bugs and unspoken 10/11 changes.

-n


#7

On Fri, Mar 15, 2013 at 1:26 PM, nick hatch nicholas.hatch@gmail.com wrote:

Besides, isn’t the name optional
anyways?

“name” is optional. However, IMNSHO, it should not be - but that’s me
:wink: I always add name to cookbooks and think everyone should.

–Brian


#8

Ridley 0.8.5 was released that addresses this issue.

on a side note: ‘name’ is only optional if you are purposefully attempting to troll the world


Jamie Winsor
@resetexistence

On Sunday, March 17, 2013 at 2:08 PM, Brian Akins wrote:

On Fri, Mar 15, 2013 at 1:26 PM, nick hatch <nicholas.hatch@gmail.com (mailto:nicholas.hatch@gmail.com)> wrote:

Besides, isn’t the name optional
anyways?

“name” is optional. However, IMNSHO, it should not be - but that’s me
:wink: I always add name to cookbooks and think everyone should.

–Brian


#9

on a side note: ‘name’ is only optional if you are purposefully attempting
to troll the world
Any Opscode people listening?

On Mon, Mar 18, 2013 at 4:24 PM, Jamie Winsor jamie@vialstudios.com wrote:

Ridley 0.8.5 was released that addresses this issue.

on a side note: ‘name’ is only optional if you are purposefully attempting
to troll the world


Jamie Winsor
@resetexistence
https://github.com/reset

On Sunday, March 17, 2013 at 2:08 PM, Brian Akins wrote:

On Fri, Mar 15, 2013 at 1:26 PM, nick hatch nicholas.hatch@gmail.com
wrote:

Besides, isn’t the name optional
anyways?

“name” is optional. However, IMNSHO, it should not be - but that’s me
:wink: I always add name to cookbooks and think everyone should.

–Brian


#10

On Monday, March 18, 2013 at 2:38 PM, Mike wrote:

on a side note: ‘name’ is only optional if you are purposefully attempting
to troll the world

Any Opscode people listening?

Breaking compatibility in a minor/patch release is an even better way to troll the world. Or did we all forget that last json gem release already?

See also: http://tickets.opscode.com/browse/CHEF-3307 (reviewed and will be committed for next planned release).


Daniel DeLeo


#11

Sometimes bugs make it through our unit tests, Dan. Unfortunately we all make mistakes eventually.


Jamie Winsor
@resetexistence

On Monday, March 18, 2013 at 2:43 PM, Daniel DeLeo wrote:

On Monday, March 18, 2013 at 2:38 PM, Mike wrote:

on a side note: ‘name’ is only optional if you are purposefully attempting
to troll the world

Any Opscode people listening?

Breaking compatibility in a minor/patch release is an even better way to troll the world. Or did we all forget that last json gem release already?

See also: http://tickets.opscode.com/browse/CHEF-3307 (reviewed and will be committed for next planned release).


Daniel DeLeo


#12

Jamie, that wasn’t aimed at you at all – I know that was an honest mistake.

Just explaining why we can’t make the name field of metadata required just yet – the issue wasn’t raised until just before the 11.0 release.

I should have been more clear and less snarky. My apologies.


Daniel DeLeo

On Monday, March 18, 2013 at 2:45 PM, Jamie Winsor wrote:

Sometimes bugs make it through our unit tests, Dan. Unfortunately we all make mistakes eventually.


Jamie Winsor
@resetexistence
https://github.com/reset

On Monday, March 18, 2013 at 2:43 PM, Daniel DeLeo wrote:

On Monday, March 18, 2013 at 2:38 PM, Mike wrote:

on a side note: ‘name’ is only optional if you are purposefully attempting
to troll the world

Any Opscode people listening?

Breaking compatibility in a minor/patch release is an even better way to troll the world. Or did we all forget that last json gem release already?

See also: http://tickets.opscode.com/browse/CHEF-3307 (reviewed and will be committed for next planned release).


Daniel DeLeo


#13

Totally mis-read that, I could agree more that we can’t be making the ‘name’ attribute required in a patch release!

Sorry for the confusion Dan :slight_smile:


Jamie Winsor
@resetexistence

On Monday, March 18, 2013 at 2:53 PM, Daniel DeLeo wrote:

Jamie, that wasn’t aimed at you at all – I know that was an honest mistake.

Just explaining why we can’t make the name field of metadata required just yet – the issue wasn’t raised until just before the 11.0 release.

I should have been more clear and less snarky. My apologies.


Daniel DeLeo

On Monday, March 18, 2013 at 2:45 PM, Jamie Winsor wrote:

Sometimes bugs make it through our unit tests, Dan. Unfortunately we all make mistakes eventually.


Jamie Winsor
@resetexistence
https://github.com/reset

On Monday, March 18, 2013 at 2:43 PM, Daniel DeLeo wrote:

On Monday, March 18, 2013 at 2:38 PM, Mike wrote:

on a side note: ‘name’ is only optional if you are purposefully attempting
to troll the world

Any Opscode people listening?

Breaking compatibility in a minor/patch release is an even better way to troll the world. Or did we all forget that last json gem release already?

See also: http://tickets.opscode.com/browse/CHEF-3307 (reviewed and will be committed for next planned release).


Daniel DeLeo


#14

On Mar 18, 2013, at 3:38 PM, Mike miketheman@gmail.com wrote:

on a side note: ‘name’ is only optional if you are purposefully attempting
to troll the world

Any Opscode people listening?

Making it required in Chef itself was already discussed.

However, we’ve added ‘name’ to all our cookbooks. Not all have been re-released with the name added yet, but soon. E.g., I released openssl a few days ago with this.

Cheers,
Joshua