You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depends on the specific calls involved. Generally speaking all our deployment is split into an install portion (on the host), a package portion (on the host) vendoring the relevant gems, and other install operations inside containers which installs the gems in Gemfile.lock from the packaged gems.
Tooling (in particular on slaves) is deployed using calls similar to bundle install --jobs=nproc --no-cache --local --frozen --system --without development test. This command installs all gems excluding the groups we do not need for use at runtime. This in turn creates a Gemfile.lock with only a subset of all possible gems listed (compared to simply running bundle install, which would install everything).
For deployment in containers we'll then bundle package the relevant gems into the working directory to eliminate duplicative network IO across the numerous containers we build concurrently.
At this point the problem appears. We now have a Gemfile with (e.g.) 100 gems it wants, and a Gemfile.lock which only specifices (e.g.) 50 gems out of the 100. A bug inside bundler makes various commands (foremost bundler package) want to resolve gems which are not in the set of the (e.g.) 50 locked ones which causes error like these
Some gems seem to be missing from your vendor/cache directory.
Could not find vcr-4.0.0 in any of the sources
Because we do not install the development test groups the vcr gem was not bundler packaged, yet bundler wants it to be there making the deployment fail.
The cause is probably (as in: AFAIK no one has verified that this is in fact the cause): rubygems/bundler#6074
The text was updated successfully, but these errors were encountered:
There is quite a mess to use bundler 1.15 instead of 1.16 to workaround
bug and its quite fragile.. so use the bundler 1.16 directly and
workaround bug by not excluding development/test subset
This issue is reported upstream but proposed fix doesn't work yet, so we
can't build our own bundler. Add '--without development test' argument
back when the upstream issue is fixed and our tooling have fix available
See also : #17
Bundler 0.16 screws up deployment
Why?
Depends on the specific calls involved. Generally speaking all our deployment is split into an
install
portion (on the host), apackage
portion (on the host) vendoring the relevant gems, and otherinstall
operations inside containers which installs the gems in Gemfile.lock from the packaged gems.Tooling (in particular on slaves) is deployed using calls similar to
bundle install --jobs=
nproc--no-cache --local --frozen --system --without development test
. This command installs all gems excluding the groups we do not need for use at runtime. This in turn creates aGemfile.lock
with only a subset of all possible gems listed (compared to simply runningbundle install
, which would install everything).For deployment in containers we'll then
bundle package
the relevant gems into the working directory to eliminate duplicative network IO across the numerous containers we build concurrently.At this point the problem appears. We now have a Gemfile with (e.g.) 100 gems it wants, and a Gemfile.lock which only specifices (e.g.) 50 gems out of the 100. A bug inside bundler makes various commands (foremost bundler package) want to resolve gems which are not in the set of the (e.g.) 50 locked ones which causes error like these
Because we do not install the
development test
groups the vcr gem was not bundler packaged, yet bundler wants it to be there making the deployment fail.The cause is probably (as in: AFAIK no one has verified that this is in fact the cause):
rubygems/bundler#6074
The text was updated successfully, but these errors were encountered: