Live data from Hacker News

Ruby deploys temporarily disabled

status.heroku.com

71–80 of 98 posts

Re: Ruby deploys temporarily disabled

#71
post #32

A tangent, but I always thought "YAML" was pronounced /'jæm.ḷ/, however the post's use of "an YAML" suggests it's actually pronounced /waɪ.eɪ.ɛm.ɛl/. Weird.

Counterpoint: this post [1] on HN front page at the moment contains the sentence "Never heard of a yml file?"

[1] http://www.crowdhoster.com/

Re: Ruby deploys temporarily disabled

#72
post #32

A tangent, but I always thought "YAML" was pronounced /'jæm.ḷ/, however the post's use of "an YAML" suggests it's actually pronounced /waɪ.eɪ.ɛm.ɛl/. Weird.

FWIW, the Wikipedia article http://en.wikipedia.org/wiki/YAML corroborates the first pronouncation.

Re: Ruby deploys temporarily disabled

#73
post #68

Earlier quoted context omitted.

bundle package puts all your app's dependencies in vendor/cache. That can then be put into a git submodule. The problem then becomes the Gemfile and Gemfile.lock, which should really be in that submodule as well. You need to pass flags to bundler commands because it assumes the Gemfile is in the project root.

I don't think Heroku's deploy is smart enough to recognize that you've packaged, right? It'll still try to bundle install, which would break in the current situation. I think a full solution requires packaging, and using a modified buildpack that skips the bundle step.

$ bundle package

Places the gem binaries in vendor/cache, as noted. SCM those.

"While installing gems, Bundler will check vendor/cache and then your system's gems. If a gem isn't cached or installed, Bundler will try to install it from the sources you have declared in your Gemfile."

http://gembundler.com/bundle_install.html

Heroku uses this tree lookup AFAIK.

Re: Ruby deploys temporarily disabled

#74
post #26

Earlier quoted context omitted.

The way we handle that for our Python deploys is to have a separate "deploy" git repo which includes complete .tar.gz files of all of our dependencies, then have our pip requirements.txt file point to those file paths rather than using external HTTP URLs. To avoid packages sneakily trying to download their own dependencies from the internet we run pip install with a "--proxy http://localhost:9999 argument (where noth…

We do something very similar, but like you said there are the occasional sneaky devils trying to download their own dependencies. Nine times out of ten it seems like it's some version of distribute that they insist on fetching. The non-existant proxy trick seems useful, I'll have to try that out.

We run our own internal PyPi server. Makes it super easy to install our own packages over Pip, as well as ensure that dependancies are nice and clean.

Re: Ruby deploys temporarily disabled

#75

Earlier quoted context omitted.

This is not that vulnerability. Their Rails is just fine. This is related to the fact that gems use YAML to store their metadata.

Semi related CVEs aside (CVE-2013-0333 and CVE-2013-0156): YAML's security problems have been known for years by the community. YAML aside, don't trust user input. This is egg on rubygems's face and the ruby community. I don't think http://rubycentral.org/ has full-time staff for rubygems either. Gems, specifically should be signed. They are not, this type of exploit will continue to happen, hell, remember when githu…

The GIL is not really a problem. There are far more pressing issues with MRI, and many core developers are working hard to solve these.

Re: Ruby deploys temporarily disabled

#76
post #73
post #68

Earlier quoted context omitted.

I don't think Heroku's deploy is smart enough to recognize that you've packaged, right? It'll still try to bundle install, which would break in the current situation. I think a full solution requires packaging, and using a modified buildpack that skips the bundle step.

$ bundle package Places the gem binaries in vendor/cache, as noted. SCM those. "While installing gems, Bundler will check vendor/cache and then your system's gems. If a gem isn't cached or installed, Bundler will try to install it from the sources you have declared in your Gemfile." http://gembundler.com/bundle_install.html Heroku uses this tree lookup AFAIK.

Yeah, I knew that part...I wasn't sure what the default heroku ruby buildpack did. I'm still digging into the source to see what the build process is. It's non-trivial.

UPDATE:

For others' edification, the default heroku ruby buildpack respects vendor/cache, but will purge it in the following scenarios:

  * if vendor/ruby_version exists
  * if vendor/heroku/buildpack_version exists, but vendor/heroku/ruby_version does not
  * if the bundler cache exists, but vendor/heroku/ruby_version file specifies a different version of ruby than the one actually being used.

Re: Ruby deploys temporarily disabled

#77
post #36
post #30

Earlier quoted context omitted.

Sounds like a good reason to switch to "everything must be signed"

Just to reiterate the parent: This is only valuable if we trust the signatures - which I wouldn't if they were, say, just held along side the "hacked" gems server.

I'm talking g about developers signing the archive on their local machine. Private key would be stored on developers laptop

Re: Ruby deploys temporarily disabled

#78

This should also be a reminder to everyone that you shouldn't be reliant on a single point of failure for your deploys. It's something that we in the Python community have already encountered (and hopefully learned from) due to the historical unreliability of our equivalent package repo, PyPI. Have an internal repo that's accessible by your deploy servers, which in turn locally caches anything that you might have pre…

That's a very good point to make. .NET developers, you can set up a similar cache for NuGet packages to avoid downtime (and reduce bandwidth usage): http://www.hanselman.com/blog/HowToAccessNuGetWhenNuGetorgIs...

Is bandwidth usage really a concern?

Re: Ruby deploys temporarily disabled

#79
post #24

Earlier quoted context omitted.

From a manager perspective, this sort of alert (as well as recent Heroku emails telling you specifically which app(s) needed patching for the recent Rails CVE issues) is a great example of one of the extra benefits of Heroku. A team of engineers 'watching your back' at no extra charge is a good thing.

Agreed. I was surprised when I received an email from Heroku letting me know that a few of my apps needed to be updated after the Rails vulnerabilities were uncovered. They also named the apps that needed to be updated, which makes my job that much simpler.

It was a nice service with the mail. But it was sent one day after the exploit was out in the open, which is too late, but better than nothing.

Re: Ruby deploys temporarily disabled

#80
post #78

Earlier quoted context omitted.

That's a very good point to make. .NET developers, you can set up a similar cache for NuGet packages to avoid downtime (and reduce bandwidth usage): http://www.hanselman.com/blog/HowToAccessNuGetWhenNuGetorgIs...

Is bandwidth usage really a concern?

For most people/enterprises, no. But there are still many places in the world -- in the US, even -- with slow and/or spotty internet connections, so it would make sense for them.
Post reply on HN