Why pre_packaging script is a bad thing.

140 views
Skip to first unread message

alexand...@altoros.com

unread,
Oct 29, 2014, 9:28:25 AM10/29/14
to bosh...@cloudfoundry.org
Hi, all. 

Not long ago I had an interesting issue updating admin-ui-boshrelease. Admin UI is a ruby application that needs gems, this gems are fetched in pre_packaging script that is executed on a your local computer (where you run `bosh create release`). 

Bearing this fact in mind lets imagine there are gems with native extensions in the Gemfile and your computer runs Mac OS with edge ruby. In this case your ubuntu/centos stemcell will get incompatible list of .gem files into vendor/cache directory and this will cause failure during attempt to build admin_ui package. 

This is partly bundler issue and there is a feature request for it (link) and lots of discussions (#1, #2, #3, ..). But don't you think this could be confusing for people who work with BOSH? What do you think about this hook?

Dmitriy Kalinin

unread,
Oct 29, 2014, 1:01:09 PM10/29/14
to bosh...@cloudfoundry.org
As you pointed out pre_packaging does not run in the clean environment
which could cause significant (and hard to debug) problems. I've
always recommended to _avoid_ using it; however, it is something that
people use for convenience.

I do not have a good answer for packaging os specific gems without
manually downloading them and placing them into vendor/cache. Correct
thing to do here would be to fix bundler but as you mentioned that's
already being discussed.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to bosh-dev+u...@cloudfoundry.org.
Reply all
Reply to author
Forward
0 new messages