-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Rails 4.1 upgrade #1799
Rails 4.1 upgrade #1799
Conversation
Also can't seem to add |
Generated by 🚫 Danger |
Most of the errors are either:
or: WikiControllerTest#test_admin_user_should_delete_wiki_page:
Authlogic::Session::Activation::NotActivatedError: You must activate the Authlogic::Session::Base.controller with a controller object before creating objects
test/functional/wiki_controller_test.rb:12:in `teardown' |
also noting that Dangerbot is not seeing errors correctly because the format has changed. |
OK, the fixtures.rb code in ActiveRecord is trying to load |
OK, moving on to ones like: ERROR["test_should_get_show_for_root_page", TalkControllerTest, 2.7286774160020286]
test_should_get_show_for_root_page#TalkControllerTest (2.73s)
ActionView::Template::Error: ActionView::Template::Error: SQLite3::SQLException: no such column: community_tags.nid: SELECT "term_data".* FROM "term_data" WHERE (community_tags.nid = 2 AND name LIKE 'style:fancy')
app/models/node.rb:382:in `has_tag'
app/views/layouts/application.html.erb:25:in `_app_views_layouts_application_html_erb___1017683525_53195436'
test/functional/talk_controller_test.rb:6:in `block in <class:TalkControllerTest>'
ERROR["test_should_assign_correct_value_to_graph_comments_on_GET_stats", StatsControllerTest, 4.533888999008923]
test_should_assign_correct_value_to_graph_comments_on_GET_stats#StatsControllerTest (4.53s)
ActiveRecord::StatementInvalid: ActiveRecord::StatementInvalid: SQLite3::SQLException: wrong number of arguments to function COUNT(): SELECT COUNT(created, type, status) FROM "node" WHERE "node"."type" = 'note' AND "node"."status" = 1 AND ("node"."created" BETWEEN 1511142110 AND 1511746910)
app/controllers/stats_controller.rb:42:in `index'
test/functional/stats_controller_test.rb:7:in `block in <class:StatsControllerTest>' |
|
Better now: |
Note this new process for secrets: http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml |
I'm pushing this to unstable for testing, as the last remaining issues are with Solr! |
@icarito, looks like we have to do a different setup for our secrets, how does this work in production mode containers like unstable?
|
Oh, I tried running Hmm, not sure how to debug these solr errors: [##################################] [92/92] [100.00%] [00:01] [00:00] [53.27/s]/usr/local/bin/ruby -I"lib:test" -I"/usr/local/bundle/gems/rake-10.5.0/lib" "/usr/local/bundle/gems/rake-10.5.0/lib/rake/rake_test_loader.rb" "test/solr/*_test.rb" /usr/local/bundle/gems/ci_reporter_test_unit-1.0.1/lib/ci/reporter/rake/test_unit_loader.rb
[Coveralls] Using SimpleCov's default settings.
/usr/local/bundle/gems/activerecord-4.1.16/lib/active_record/associations/builder/collection_association.rb:38: warning: already initialized constant TagNodeAssociationExtension
/usr/local/bundle/gems/activerecord-4.1.16/lib/active_record/associations/builder/collection_association.rb:38: warning: previous definition of TagNodeAssociationExtension was here
Started with run options --seed 60657
FAIL["test_Node.search_for_two_different_key_words_returns_different_results", NodeSearchTest, 0.20476326099998232]
test_Node.search_for_two_different_key_words_returns_different_results#NodeSearchTest (0.20s)
Expected false to be truthy.
test/solr/node_search_test.rb:30:in `block in <class:NodeSearchTest>'
FAIL["test_should_get_search_test_action", SearchesControllerTest, 2.7980125459999954]
test_should_get_search_test_action#SearchesControllerTest (2.80s)
Expected [] to not be equal to [].
test/solr/searches_controller_test.rb:23:in `block in <class:SearchesControllerTest>'
FAIL["test_running_TypeaheadService.notes", TypeaheadServiceTest, 2.857186628999955]
test_running_TypeaheadService.notes#TypeaheadServiceTest (2.86s)
Expected: 1
Actual: 2
test/solr/typeahead_service_test.rb:20:in `block in <class:TypeaheadServiceTest>'
FAIL["test_running_TypeaheadService.search_all", TypeaheadServiceTest, 2.9072877629999994]
test_running_TypeaheadService.search_all#TypeaheadServiceTest (2.91s)
Expected: 0
Actual: 1
test/solr/typeahead_service_test.rb:13:in `block in <class:TypeaheadServiceTest>'
7/7: [===================================] 100% Time: 00:00:02, Time: 00:00:02 |
Whoa, but perhaps Rails 4 is running right now on unstable? Can you confirm @icarito? I checked and the gemfile says yes... |
I manually set the secrets.yml just after the build started. |
And this doesn't load, so maybe Solr is not running? http://unstable.publiclab.org/searches/test |
Nope, unrelated -- |
http://unstable.publiclab.org/api/typeahead/all?srchString=precocious doesn't return anything but this could just be due to the partial reindex... |
Manually testing |
I'm trying now to use this to load test fixtures into the test db and open a rails console in test mode:
At the end of:
Not sure this'll work! |
... it didn't, it just hung. This ran, but in production mode: |
Hmm, honestly @icarito @ryzokuken i'm a bit stuck on this... why wouldn't the solr tests be passing, esp. if I can run the queries in production mode on the console? Any fresh ideas very welcome! We're VERY close on this... all normal tests are passing, for Rails 4.1 |
Can we look at the solr logs for the test run to see what queries are actually being triggered by the solr tests? |
Hi,
Congrats on getting all tests related to Rails 4 upgrade running!
I won't be able to check this out this morning but in the afternoon I'll
set aside time to try this and let you know what I find!
The Solr logs are accessible with the command `docker-compose logs solr`.
Regards,
Sebastian
…On 27/11/17 23:19, Jeffrey Warren wrote:
Can we look at the solr logs for the test run to see what queries are
actually being triggered by the solr tests?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMMS8YzwFMDkN3oV6ceV3Dl6PPVJPWrks5s64ndgaJpZM4QqqLj>.
|
Oh cool, can I put that command in somewhere to get it to run in Travis?
…On Nov 28, 2017 8:53 AM, "Sebastian Silva" ***@***.***> wrote:
Hi,
Congrats on getting all tests related to Rails 4 upgrade running!
I won't be able to check this out this morning but in the afternoon I'll
set aside time to try this and let you know what I find!
The Solr logs are accessible with the command `docker-compose logs solr`.
Regards,
Sebastian
On 27/11/17 23:19, Jeffrey Warren wrote:
>
> Can we look at the solr logs for the test run to see what queries are
> actually being triggered by the solr tests?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1799 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AAMMS8YzwFMDkN3oV6ceV3Dl6PPVJPWrks5s64ndgaJpZM4QqqLj>.
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ7kgzz2oMbLM6JpQqs09j50xCJDoks5s7BAjgaJpZM4QqqLj>
.
|
I added it to |
It doesn't appear to have run the |
Oh I see it... line 3206, reading... |
Ummmm, i think we did it!!! There's only this last error due to the Dangerfile and Dangerbot not being able to parse the error output! |
Sounds cool! I'll try giving it a spin.
…On Thu 7 Dec, 2017, 1:49 AM Jeffrey Warren, ***@***.***> wrote:
Ummmm, i think we did it!!! There's only this last error due to the
Dangerfile and Dangerbot not being able to parse the error output!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMg3Mv9o58WPItwrnR_yJC7vQNx75rD5ks5s9vbmgaJpZM4QqqLj>
.
|
Adding a rescue around that part of the Dangerfile, with console logging error. But i want to address that separately. |
This is based on https://github.com/jywarren/plots2/blob/rails-4/.travis.yml#L22
|
YAYYYYYYYYY @icarito i'm merging this in now and will push to staging. |
Awesome! How long before it comes to staging?
…On Thu 7 Dec, 2017, 5:57 AM Jeffrey Warren, ***@***.***> wrote:
Merged #1799 <#1799>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1799 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AMg3Mif0e2NL41WcUYs77hwJj1uxmcNxks5s9zEBgaJpZM4QqqLj>
.
|
I just pushed it there. Fingers X and if you can report back here if it works for you, thank you in advance! it'll show up at http://staging.publiclab.org/ |
Hmm, @icarito i see |
Ah! we need to set
https://blog.carbonfive.com/2015/03/17/docker-rails-docker-compose-together-in-your-development-workflow/ has guidance. Is this something you could work on? Thank you! |
Super! I'm very happy that we are moving forward our stack. It makes my
life so much more enjoyable when we are on supported releases of base
components.
Sure I'll setup the token.
Regards,
Sebastian
…On 06/12/17 19:44, Jeffrey Warren wrote:
Ah! we need to set |SECRET_KEY_BASE| -- pretty straightforward.
|Your rails_env production don't have required set up,probably missing
secret_key_base.|
https://blog.carbonfive.com/2015/03/17/docker-rails-docker-compose-together-in-your-development-workflow/
has guidance. Is this something you could work on?
Thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMMSzKHiYuK51fu89jOkflTOaOgxcxkks5s9zTagaJpZM4QqqLj>.
|
Great.
On Thu 7 Dec, 2017, 8:22 AM Sebastian Silva, <notifications@github.com>
wrote:
… Super! I'm very happy that we are moving forward our stack. It makes my
life so much more enjoyable when we are on supported releases of base
components.
Sure I'll setup the token.
Regards,
Sebastian
On 06/12/17 19:44, Jeffrey Warren wrote:
>
> Ah! we need to set |SECRET_KEY_BASE| -- pretty straightforward.
>
> |Your rails_env production don't have required set up,probably missing
> secret_key_base.|
>
>
https://blog.carbonfive.com/2015/03/17/docker-rails-docker-compose-together-in-your-development-workflow/
> has guidance. Is this something you could work on?
>
> Thank you!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1799 (comment)>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AAMMSzKHiYuK51fu89jOkflTOaOgxcxkks5s9zTagaJpZM4QqqLj
>.
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMg3MjpTIivgw3GeOHpbaA0DXc6w8v0Zks5s91LXgaJpZM4QqqLj>
.
|
Okay I setup the environment variable and we're good! |
Great! I'm very happy too!
Does this change our production deployment process at all or do we need to
add environment variables there before publishing?
Thanks!
…On Dec 6, 2017 10:30 PM, "Sebastian Silva" ***@***.***> wrote:
Okay I setup the environment variable and we're good!
It is still quite slow for me, although the server load is fine.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJwTaV91R0AvxuYFlMPLBUYWCuks4ks5s91vDgaJpZM4QqqLj>
.
|
We can simply edit secrets.yml in production and switch to an
environment variable when we upgrade production to containers. Which
makes me think we may have to do the same with other tokens or secrets
we may have in production.
…On 06/12/17 23:32, Jeffrey Warren wrote:
Great! I'm very happy too!
Does this change our production deployment process at all or do we need to
add environment variables there before publishing?
Thanks!
On Dec 6, 2017 10:30 PM, "Sebastian Silva" ***@***.***>
wrote:
> Okay I setup the environment variable and we're good!
> It is still quite slow for me, although the server load is fine.
>
> —
> You are receiving this because you modified the open/close state.
> Reply to this email directly, view it on GitHub
> <#1799 (comment)>,
> or mute the thread
>
<https://github.com/notifications/unsubscribe-auth/AABfJwTaV91R0AvxuYFlMPLBUYWCuks4ks5s91vDgaJpZM4QqqLj>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMMS6wmuJ54BCuqpUbwC7siwSvZXDD7ks5s92pNgaJpZM4QqqLj>.
|
Great, would you like to do the publication this week at our meeting?
Thanks!
…On Dec 6, 2017 11:55 PM, "Sebastian Silva" ***@***.***> wrote:
We can simply edit secrets.yml in production and switch to an
environment variable when we upgrade production to containers. Which
makes me think we may have to do the same with other tokens or secrets
we may have in production.
On 06/12/17 23:32, Jeffrey Warren wrote:
> Great! I'm very happy too!
>
> Does this change our production deployment process at all or do we need
to
> add environment variables there before publishing?
>
> Thanks!
>
> On Dec 6, 2017 10:30 PM, "Sebastian Silva" ***@***.***>
> wrote:
>
> > Okay I setup the environment variable and we're good!
> > It is still quite slow for me, although the server load is fine.
> >
> > —
> > You are receiving this because you modified the open/close state.
> > Reply to this email directly, view it on GitHub
> > <#1799 (comment)
>,
> > or mute the thread
> >
> <https://github.com/notifications/unsubscribe-auth/
AABfJwTaV91R0AvxuYFlMPLBUYWCuks4ks5s91vDgaJpZM4QqqLj>
> > .
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1799 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AAMMS6wmuJ54BCuqpUbwC7siwSvZXDD7ks5s92pNgaJpZM4QqqLj>.
>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ6VRXyY8hfypYhN3YQlCv0huFHsuks5s92-tgaJpZM4QqqLj>
.
|
This is pretty weird, but some routes got lost in the upgrade (bad job merging by me) but the tests didn't catch it! Hmm... including
However, the tests show:
Vs. the last version before this PR:
That equals
(here) |
Update -- i think functional tests do not test routes: #1841 |
* rails 4 find_by and assert_not conventions * assert_not prep for rails 4 * bin, form_for, and other rails 4 reqs * config changes for rails 4 * regex no longer multiline * non-multiline regex pt 2 * further regex fixes * missing parenthesis * last regex fix, i hope * added bin/ * resolved plurality issues * fixtures disentangling * passing more functional tests * further fixtures and table name fixes * major refactor of .references() after actually reading docs * further debugging * down to 86 functional test errors * fixed date helpers * down to 36 functional test errors * down to 50 functional test errors * down to 6 errors * down to 1 functional test errors * addressing functional test errors * getting closer * user sessions fixes * integration and unit test error resolutions * down to 2 failures overall * all tests passing! * small fix * searches test route * small changes * adding travis solr log output * Update routes.rb * Update .travis.yml * Update searches_controller_test.rb * Update .travis.yml * Update searches_controller_test.rb * Update node_search_test.rb * Update node_search_test.rb * Update searches_controller_test.rb * moved custom rake tasks to Rakefile * Update node_search_test.rb * reactivate default test tasks * removed inline reindex * rake test:run tweak * invoke instead of execute rake tasks * sorted rakefile issues maybe * test adjustments * better rakefile output * execute instead of invoke in Rakefile * reworking namespace * Update Rakefile * Update Rakefile * Update Dangerfile * Create TEST_.xml * Delete TEST_.xml * Update .travis.yml * Update .travis.yml * Update .travis.yml
@ryzokuken @icarito -- trying to tackle this here. Any PRs against this one welcome!
These are changes that are not compatible with Rails 3, unlike #1798.
Heavily based on #1160 by @sjones88