* automatically does with_exclusive_scope
* if the scope has an order or group by, use an alternate
implementation so it's not broken
* alternate methods are cursors (postresql only) or temporary
tables. if a transaction is already open, or we're on a slave,
prefer a cursor (even over the normal method, since the query
might be slow even without an order or group by)
test plan:
* migrations should still work (especially data fixups)
* lots of account reports use find_each; make sure they still run
Change-Id: If876b7b3401e6cda1d41f1c94b93af4810b78cf4
Reviewed-on: https://gerrit.instructure.com/22364
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I391010689a6488c49a75eaef586783793fc29613
Reviewed-on: https://gerrit.instructure.com/20889
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
also added a warning to migration_lint about tables with no primary keys
test plan:
* run the migration; it should not fail
Change-Id: I67a065355bb516b84b00313725f079842bbd8974
Reviewed-on: https://gerrit.instructure.com/20705
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
- update the Gemfile to be 1.9 only, and raise an exception on wrong
ruby version
- remove RUBY_VERSION checks, replacing with the applicable code
- remove the FasterCSV compatibility shim, just use CSV now
test plan: trying to bundle install on ruby 1.8 or 2.0 should raise an
exception, specs should pass, canvas should work as normal on 1.9
Change-Id: I49088e9d227c59c6d5d5acb417c2df971129474a
Reviewed-on: https://gerrit.instructure.com/19806
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
replaced the mailman gem with custom code with more error
handling. this will allow the incoming message processor to
continue processing messages after encountering a message with
an encoding or parsing error. the broken messages will be moved
aside to a separate folder for later inspection.
fixes CNVS-4970
test plan:
- read up on the new incoming_mail.yml configuration settings.
- configure incoming_mail.yml with the test imap accounts
using legacy settings and check for regressions.
- reconfigure incoming_mail.yml to read from a directory.
- copy some testing email files into the configured directory.
test files should be a mix of:
- emails with encoding errors
- emails with syntax errors
- normal emails
- all of the normal emails should be processed normally
- all of the error emails should be moved into the error
subdirectory
Change-Id: I0f946a56b41492f007db2775aa6da3cdfa4fdd3f
Reviewed-on: https://gerrit.instructure.com/19729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
This can successfully load rails console and rails server. There are
many, many problems still. The idea is this won't change anything under
rails 2.3, it's all backwards compatible.
closes CNVS-4711
test plan: `touch RAILS3` in your Canvas Rails.root directory. The run
`bundle update` and verify that you get rails 3 installed. Run `bundle
exec rails c` to load console or `bundle exec rails s` to start a
webrick server. You can login, though the dashboard currently breaks.
Also jammit isn't working yet.
But more importantly, Rails 2.3 should still work same as ever. All
tests should pass, and a basic regression sanity check would be good too.
Change-Id: Idd6f35de88adde84cd2db3a650f44b71bd6e9684
Reviewed-on: https://gerrit.instructure.com/18453
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
code fix, no test plan
Change-Id: Iff01e6523fb7d77a84d8e9829c5efbb2a5306a51
Reviewed-on: https://gerrit.instructure.com/18622
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Test Plan:
- Use the API to query courses/<id>/search_users
- You should be able to specify a search_term in the query that
narrows the results to matching users in the course
- You should be able to specify an enrollment_type of 'student'
or 'ta' etc. to narrow the results further. Multiple 'enrollment_
type's can be specified as a comma-separated list.
- You can limit the number of results with 'limit'
fixes #CNVS-2324
Change-Id: Ic87ff797028f71b478de6397557b142d7d0fe6b5
Reviewed-on: https://gerrit.instructure.com/16640
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
rspec-rails no longer includes it. use spork instead
Change-Id: Ibdd318970e45f5073ed8e498c9bbb184a8ebf7cc
Reviewed-on: https://gerrit.instructure.com/15652
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
don't let guard break ruby-debug
add BARE_SERVER shortcut
don't duplicate the tailing of delayed job output -- the server is
already tailing log/development.log, so tell the job daemon not to tail
it too
Change-Id: I23f8b9b413e99f515804819292b3ae15a598290d
Reviewed-on: https://gerrit.instructure.com/9796
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
test plan: start up script/server in development mode, and verify that
jobs are running and guard catches changes to files. you should also be
able to hit enter to make guard re-compile all.
Change-Id: I064588e58d09dd770110d046b86337a0e988017a
Reviewed-on: https://gerrit.instructure.com/9593
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
and some work on delayed_jobs refactoring
refs #4226
Change-Id: I21a91a44368e77aef4a75e0d30cefe252a901691
Reviewed-on: https://gerrit.instructure.com/3640
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
* Uses Mailman gem
* Can be configured for POP3, Maildir, or stdin (push from mailserver)
* Maildir can be chained with fetchmail or similar to support IMAP
* Can be run as part of the job server, or as a separate process
Change-Id: I000000000000000000000000000001
Reviewed-on: https://gerrit.instructure.com/2971
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
right now, the documentation tells people to change script/canvas_init, which
kinda sucks for people hoping to upgrade by doing git pull.
this seems sort of hacky - i'm open to suggestions.
Change-Id: I66bf3deb2f51c22c23c1963369c6ab3e5f391d33
Reviewed-on: https://gerrit.instructure.com/2145
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>