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

Use SQLite3 3.7.15 which supports multiple values insert #24440

Merged

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Apr 5, 2016

Summary

This pull request updates SQLite3 database version to 3.7.15 when tested at Travis CI.
Since SQLite3 3.7.11 supports to insert multiple values in one statement.

Ref #24288 and travis-ci/apt-package-safelist#368

@rails-bot
Copy link

r? @senny

(@rails-bot has picked a reviewer for you, use r? to override)

@yahonda yahonda force-pushed the use_newer_version_of_sqlite3_at_travis_ci branch 3 times, most recently from 4587bc5 to de98a64 Compare April 5, 2016 21:40
@rafaelfranca rafaelfranca merged commit a3d085a into rails:master Apr 6, 2016
@rafaelfranca
Copy link
Member

This broke the build so I had to revert. Could you take a look?

rafaelfranca added a commit that referenced this pull request Apr 6, 2016
…qlite3_at_travis_ci"

This reverts commit a3d085a, reversing
changes made to e2df1c6.

It broke the build
@yahonda
Copy link
Member Author

yahonda commented Apr 6, 2016

Thanks for the reminder. Let me take a look at these build detail and will update.

https://travis-ci.org/rails/rails/jobs/121052262
https://travis-ci.org/rails/rails/jobs/121052263

@jasnow
Copy link

jasnow commented Apr 6, 2016

My guess is that the sqlite3 addons are not compatible with the PostgreSQL addon. Try removing the PostgreSQL addon temporarily as an experiment to see - then we know the problem to report to TravisCI folks.

@yahonda
Copy link
Member Author

yahonda commented Apr 6, 2016

I am able to reproduce these 2 failures by upgrading SQLite version from 3.7.9 to 3.7.15 using Ubuntu 12.04 LTS.

Summary

  • Currently Travis CI runs Ubuntu 12.04 which installs SQLite 3.7.9 by default.
  • These 2 tests are running fine using SQLite 3.7.9
  • By upgrading SQLite from 3.7.9 to 3.7.15.1, these 2 failures reproduced
  • Ubuntu 15.10 installs SQLite 3.8.11.1, these 2 tests are running fine

There may be something between 3.7.9 and 3.7.15.1. SQLite Release 3.7.15 was released on 2012-12-12 older than 3 years. No need to diagnose anymore since it does not reproduce using the newer version of SQLite 3.8.11.1. Looking forward Ubuntu 16.04 LTS released and available from Travis CI.

Steps to reproduce (if you are interested in...)

  • Clong rails-dev-box at your host
> git clone https://github.com/rails/rails-dev-box.git
  • Edit Vagrantfile to use Ubuntu 12.04
> git diff
diff --git a/Vagrantfile b/Vagrantfile
index 7da4cfc..a1d03f0 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -1,7 +1,7 @@
 # -*- mode: ruby -*-
 # vi: set ft=ruby :
 Vagrant.configure('2') do |config|
-  config.vm.box      = 'ubuntu/wily64'
+  config.vm.box      = 'ubuntu/precise64'
   config.vm.hostname = 'rails-dev-box'

   config.vm.network :forwarded_port, guest: 3000, host: 3000
>
  • Startup rails-dev-box and login to guest
> vagrant up
> vagrant ssh
$ git clone https://github.com/rails/rails.git
$ cd rails/activerecord
$ git config --global url."https://".insteadOf git://
$ bundle
$ ARCONN=sqlite3 bundle exec ruby -Itest test/cases/associations/nested_through_associations_test.rb

Using sqlite3
Run options: --seed 39108

# Running:

.........................................................

Finished in 0.909425s, 62.6770 runs/s, 175.9354 assertions/s.

57 runs, 160 assertions, 0 failures, 0 errors, 0 skips
vagrant@rails-dev-box:~/rails/activerecord$
  • Check SQLite3 version
$ sqlite3 --version
3.7.9 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e
  • Remove sqlite3 and libsqlite3-dev packages to prepare
$ sudo apt-get remove sqlite3 libsqlite3-dev
  • Add ppa:travis-ci/sqlite3 repository and install SQLite3 3.7.15.1
$ sudo add-apt-repository ppa:travis-ci/sqlite3
$ sudo apt-get update
$ sudo apt-get install sqlite3 libsqlite3-dev
$ sqlite3 --version
3.7.15.1 2012-12-19 20:39:10 6b85b767d0ff7975146156a99ad673f2c1a23318
$ ARCONN=sqlite3 bundle exec ruby -Itest test/cases/associations/nested_through_associations_test.rb
Using sqlite3
Run options: --seed 62166

# Running:

F...................................................F....

Finished in 0.939324s, 60.6819 runs/s, 170.3352 assertions/s.

  1) Failure:
NestedThroughAssociationsTest#test_has_many_through_has_many_through_with_has_many_source_reflection [test/cases/associations/nested_through_associations_test.rb:82]:
--- expected
+++ actual
@@ -1 +1 @@
-[#<Subscriber nick: "alterself", name: "Luke Holden", books_count: 0>, #<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>, #<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>]
+#<ActiveRecord::AssociationRelation [#<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>, #<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>, #<Subscriber nick: "alterself", name: "Luke Holden", books_count: 0>]>



  2) Failure:
NestedThroughAssociationsTest#test_distinct_has_many_through_a_has_many_through_association_on_through_reflection [test/cases/associations/nested_through_associations_test.rb:406]:
--- expected
+++ actual
@@ -1 +1 @@
-[#<Subscriber nick: "alterself", name: "Luke Holden", books_count: 0>, #<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>]
+#<ActiveRecord::AssociationRelation [#<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>, #<Subscriber nick: "alterself", name: "Luke Holden", books_count: 0>]>


57 runs, 160 assertions, 2 failures, 0 errors, 0 skips

@yahonda yahonda deleted the use_newer_version_of_sqlite3_at_travis_ci branch April 29, 2016 20:16
eliotsykes added a commit to eliotsykes/payola that referenced this pull request Jul 12, 2016
eliotsykes added a commit to eliotsykes/payola that referenced this pull request Jul 30, 2016
eliotsykes added a commit to eliotsykes/payola that referenced this pull request Aug 4, 2016
eliotsykes added a commit to eliotsykes/payola that referenced this pull request Aug 10, 2016
Highlights include:

- Stop deprecation notices relating to:
  - `:back` for redirects
  - `render nothing: true`
  - Rails 5.0 on using `to_hash`
  - `static_cache_control`
  - `before_filter` -> `before_action`
- Compatibility shim to support params keywords in controller specs
- Upgrade CI SQLite to avoid Rails 5.0 migration bug rails/rails#24440
- Upgrade CI Ruby to 2.3.1
- Upgrade Rack to version required by Rails 5.0
- Dummy app upgrade to Rails 5 (and downgrades to 4.x when required for tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants