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

CircleCI experiment #286

Closed
paneq opened this issue Apr 10, 2018 · 8 comments
Closed

CircleCI experiment #286

paneq opened this issue Apr 10, 2018 · 8 comments
Assignees

Comments

@paneq
Copy link
Member

paneq commented Apr 10, 2018

No description provided.

@paneq paneq self-assigned this Apr 10, 2018
@paneq
Copy link
Member Author

paneq commented Apr 10, 2018

circleci@a752b4350a2d:~$ which rspec
/usr/local/bundle/bin/rspec
circleci@a752b4350a2d:~$ rspec --version
RSpec 3.6
  - rspec-core 3.6.0
  - rspec-expectations 3.6.0
  - rspec-mocks 3.6.0
  - rspec-support 3.6.0
circleci@a752b4350a2d:~$ cd /home/circleci/project/aggregate_root
circleci@a752b4350a2d:~/project/aggregate_root$ bundle exec rspec
bundler: failed to load command: rspec (/usr/local/bundle/bin/rspec)
Gem::Exception: can't find executable rspec for gem rspec-core. rspec-core is not currently included in the bundle, perhaps you meant to add it to your Gemfile?
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/rubygems_integration.rb:458:in `block in replace_bin_path'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/rubygems_integration.rb:489:in `block in replace_bin_path'
  /usr/local/bundle/bin/rspec:29:in `<top (required)>'
circleci@a752b4350a2d:~/project/aggregate_root$ cat Gemfile.lock | grep rspec
    mutant-rspec (0.8.14)
      rspec-core (>= 3.4.0, < 3.7.0)
    rspec (3.6.0)
      rspec-core (~> 3.6.0)
      rspec-expectations (~> 3.6.0)
      rspec-mocks (~> 3.6.0)
    rspec-core (3.6.0)
      rspec-support (~> 3.6.0)
    rspec-expectations (3.6.0)
      rspec-support (~> 3.6.0)
    rspec-mocks (3.6.0)
      rspec-support (~> 3.6.0)
    rspec-support (3.6.0)
  mutant-rspec (~> 0.8.14)
  rspec (~> 3.6)
circleci@a752b4350a2d:~/project/aggregate_root$ bundle show rspec
Could not find gem 'rspec'.

@paneq
Copy link
Member Author

paneq commented Apr 10, 2018

circleci@a752b4350a2d:~/project/aggregate_root$ bundle install
Using concurrent-ruby 1.0.5
Using i18n 1.0.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.0
Using activemodel 5.2.0
Using arel 9.0.0
Using activerecord 5.2.0
Using activerecord-import 0.22.0
Using bundler 1.16.1
Using mysql2 0.4.10
Using pg 0.21.0
Using ruby_event_store 0.27.1 from source at `../../../ruby_event_store`
Using rails_event_store_active_record 0.27.1 from source at `../..`
Using sqlite3 1.3.13
Bundle complete! 6 Gemfile dependencies, 16 gems now installed.
Bundled gems are installed into `/usr/local/bundle`
circleci@a752b4350a2d:~/project/aggregate_root$ bundle install | grep rspec

@paneq
Copy link
Member Author

paneq commented Apr 10, 2018

seems like bundler is not installing development dependencies...

@paneq
Copy link
Member Author

paneq commented Apr 10, 2018

Bundler settings

silence_root_warning
  Set via BUNDLE_SILENCE_ROOT_WARNING: true
app_config
  Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"
bin
  Set via BUNDLE_BIN: "/usr/local/bundle/bin"
path
  Set via BUNDLE_PATH: "/usr/local/bundle"
gemfile
  Set via BUNDLE_GEMFILE: "/home/circleci/project/rails_event_store_active_record/spec/without_rails/Gemfile"

@paneq
Copy link
Member Author

paneq commented Apr 10, 2018

circleci@a752b4350a2d:/usr/local/bundle$ env | grep BUNDLE
BUNDLE_SILENCE_ROOT_WARNING=1
BUNDLE_APP_CONFIG=/usr/local/bundle
BUNDLE_BIN=/usr/local/bundle/bin
BUNDLE_PATH=/usr/local/bundle
BUNDLER_VERSION=1.16.1

@paneq
Copy link
Member Author

paneq commented Apr 10, 2018

install: ## Install gem dependencies
	@echo "Installing gem dependencies"
	@bundle install
	@echo "Installing v1_v2_schema_migration gem dependencies"
	@BUNDLE_GEMFILE=spec/v1_v2_schema_migration/Gemfile bundle install
	@BUNDLE_GEMFILE=spec/without_rails/Gemfile bundle install

something, somewhere is remembering this last BUNDLE_GEMFILE location...

@paneq
Copy link
Member Author

paneq commented Apr 10, 2018

rubygems/bundler#6162

@paneq
Copy link
Member Author

paneq commented Apr 10, 2018

We've also encountered similar-but-not-quite-the-same problems with monorepo projects

paneq added a commit that referenced this issue Apr 10, 2018
paneq added a commit that referenced this issue Apr 10, 2018
we are just testing CircleCI behavior

Issue: #286
paneq added a commit that referenced this issue Apr 10, 2018
paneq added a commit that referenced this issue Apr 10, 2018
which might be problematic because it uses 2 gemfiles during
installation and execution of tests.

Issue: #286
paneq added a commit that referenced this issue Apr 10, 2018
paneq added a commit that referenced this issue Apr 10, 2018
paneq added a commit that referenced this issue Apr 10, 2018
paneq added a commit that referenced this issue Apr 10, 2018
paneq added a commit that referenced this issue Apr 11, 2018
paneq added a commit that referenced this issue Apr 11, 2018
maybe ARCHFLAGS is needed just like for postgres driver?

Issue: #286
paneq added a commit that referenced this issue Apr 11, 2018
chromedriver required.

Issue: #286
paneq added a commit that referenced this issue Apr 11, 2018
chrome required as well

Issue: #286
paneq added a commit that referenced this issue Apr 12, 2018
paneq added a commit that referenced this issue Apr 12, 2018
paneq added a commit that referenced this issue Apr 12, 2018
paneq added a commit that referenced this issue Apr 12, 2018
paneq added a commit that referenced this issue Apr 12, 2018
which is using bundler

Issue: #286
paneq added a commit that referenced this issue Apr 12, 2018
Normal apps use strategy based on {{ checksum "Gemfile.lock" }}
but we as a library don't commit that file. We run mutation testing on newest
versions of Rails etc.

Cache in CircleCI is immutable and stored once.

Let's use new cache key every week to cache newest state of dependencies.

It's not a problem if we restore old cache. Bundler will just take a
little more time to install uncached dependencies. We try 3 potential
keys for restoration.

We also expire cache when Gemfile is changed or gemspec.

More on how this works on CircleCI: https://circleci.com/docs/2.0/caching/

Issue: #286
paneq added a commit that referenced this issue Apr 12, 2018
Normal apps use strategy based on {{ checksum "Gemfile.lock" }}
but we as a library don't commit that file. We run mutation testing on newest
versions of Rails etc.

Cache in CircleCI is immutable and stored once.

Let's use new cache key every week to cache newest state of dependencies.

It's not a problem if we restore old cache. Bundler will just take a
little more time to install uncached dependencies. We try 3 potential
keys for restoration.

We also expire cache when Gemfile is changed or gemspec.

More on how this works on CircleCI: https://circleci.com/docs/2.0/caching/

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

No branches or pull requests

2 participants