Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache is broken when a version override is not specified #1181

Open
rbclark opened this issue Apr 8, 2020 · 1 comment
Open

Cache is broken when a version override is not specified #1181

rbclark opened this issue Apr 8, 2020 · 1 comment

Comments

@rbclark
Copy link

rbclark commented Apr 8, 2020

I apologize however I am not sure if this is a bug in omnibus-software or omnibus.

Version:

omnibus-software@1b490aa4e6 (current latest)
omnibus@f38991750 (current latest)

Environment:

docker run -it ruby:2.6 bash
git clone https://github.com/rbclark/omnibus-brokenexample.git && cd omnibus-brokenexample
apt update && apt install -y fakeroot
bundle install

Scenario:

I am trying to run subsequent builds without having to delete the whole cache. I have found that setting

override :rubygems, version: "3.1.2"
override :bundler, version: "2.1.2"
override :nokogiri, version: "1.10.9"

Causes the cache to not miss, however it was not intuitive that this was a required step for caching to work.

Steps to Reproduce:

bundle exec omnibus build brokencache # <-- Passes
bundle exec omnibus build brokencache # <-- Fails

Expected Result:

bundle exec omnibus build brokencache # <-- Passes
bundle exec omnibus build brokencache # <-- Passes

Actual Result:

bundler: failed to load command: omnibus (/usr/local/bundle/bin/omnibus)
Errno::ENOENT: No such file or directory - /opt/brokencache/embedded/bin/gem
  /usr/local/bundle/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:343:in `exec'
  /usr/local/bundle/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:343:in `block in fork_subprocess'
  /usr/local/bundle/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:321:in `fork'
  /usr/local/bundle/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:321:in `fork_subprocess'
  /usr/local/bundle/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout/unix.rb:97:in `run_command'
  /usr/local/bundle/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout.rb:270:in `run_command'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/util.rb:119:in `shellout'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/util.rb:135:in `shellout!'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:871:in `shellout!'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:335:in `block in gem'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:1061:in `instance_eval'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:1061:in `run'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:889:in `block (3 levels) in execute'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:911:in `with_retries'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:888:in `block (2 levels) in execute'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/instrumentation.rb:23:in `measure'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:887:in `block in execute'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:962:in `with_clean_env'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:886:in `execute'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:778:in `block (2 levels) in build'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:777:in `each'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:777:in `block in build'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/instrumentation.rb:23:in `measure'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/builder.rb:776:in `build'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/software.rb:1235:in `execute_build'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/software.rb:1107:in `build_me'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/project.rb:1078:in `block (2 levels) in build'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/project.rb:1077:in `each'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/project.rb:1077:in `block in build'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/licensing.rb:62:in `block in create_incrementally'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/licensing.rb:57:in `tap'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/licensing.rb:57:in `create_incrementally'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/project.rb:1076:in `build'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/cli.rb:89:in `build'
  /usr/local/bundle/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
  /usr/local/bundle/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
  /usr/local/bundle/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/cli/base.rb:33:in `dispatch'
  /usr/local/bundle/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/lib/omnibus/cli.rb:42:in `execute!'
  /usr/local/bundle/bundler/gems/omnibus-f389917504c2/bin/omnibus:16:in `<top (required)>'
  /usr/local/bundle/bin/omnibus:23:in `load'
  /usr/local/bundle/bin/omnibus:23:in `<top (required)>'
@tas50
Copy link
Contributor

tas50 commented Jul 8, 2021

@lamont-granquist didn't this get resolved with your caching fixes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants