Commit Graph

25 Commits

Author SHA1 Message Date
Cody Cutrer 2deb504378 useful find_each
* 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>
2013-07-18 22:26:46 +00:00
Stanley Stuart 42888839b1 remove unused cucumber script runner
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>
2013-05-23 22:44:42 +00:00
Cody Cutrer 9d9a110f07 make discussion_topic_materialized_view.discussion_topic_id a true primary key
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>
2013-05-21 16:58:52 +00:00
Brian Palmer 31f33164b5 remove 1.8 compatibility shims
- 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>
2013-05-03 01:43:52 +00:00
Jon Willesen d8efd3e805 improve robustness of incoming message processor
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>
2013-04-29 14:47:09 +00:00
Cody Cutrer 8e9599757e migration_lint!
Change-Id: I0c0e12e0aa6401e15cf52915f1fdebe82686a0bf
Reviewed-on: https://gerrit.instructure.com/19837
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>
2013-04-22 15:22:32 +00:00
Brian Palmer cb5e957965 start adding rails 3.0 support
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>
2013-03-22 19:08:40 +00:00
James Williams 5f470c69ac add File.expand_path for ruby version compatibility
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>
2013-03-18 12:25:14 -06:00
Brian Palmer 77ca8ac013 remove deprecated rails constant usage
basically convert RAILS_ROOT -> Rails.root , RAILS_ENV -> Rails.env ,
RAILS_DEFAULT_LOGGER -> Rails.logger

This is necessary for rails 3

Change-Id: I138e1aa217fa8fb186d23ac09b04031c1e2b665e
Reviewed-on: https://gerrit.instructure.com/18412
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-03-11 12:14:08 -06:00
Duane Johnson bbe8b17b67 adds user search API to courses
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>
2013-01-25 09:42:30 -07:00
Cody Cutrer 18385db63c remove script/spec_server closes gh-246
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>
2012-11-28 13:22:15 -07:00
Brian Palmer 8ad464eecb improve guard/dj in script/server
Try harder to kill the processes when script/server exits

Change-Id: Ib401bd23cd51135122a7611f5ffad9daca086160
Reviewed-on: https://gerrit.instructure.com/11947
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-06-28 18:05:08 -06:00
Jake Sorce 90318ab33a using custom parallelized specs gem for rspec tests
Change-Id: Ia7d9ca7fd19267e9a3a66611b50d64bfc7bf3445
Reviewed-on: https://gerrit.instructure.com/10115
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-04-23 13:33:29 -06:00
Brian Palmer 3b5cdfa82a script/server improvements
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>
2012-04-03 10:06:04 -06:00
Brian Palmer 3c68044ef8 run delayed jobs and guard with script/server in dev
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>
2012-03-28 16:11:49 -06:00
Bryan Madsen 990e4906a1 use parallel_tests-instructure and remove custom loggers
Change-Id: Id71849f40ae94fa073d235e178a5497284a8e3ed
Reviewed-on: https://gerrit.instructure.com/8362
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-30 11:14:50 -07:00
Bryan Madsen 20535f8fd1 create a text log of failed parallel tests
Change-Id: Ia1681235bb8a9f7c9f88da9b67c0b739b480e285
Reviewed-on: https://gerrit.instructure.com/5929
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-03 14:23:53 -06:00
Brian Palmer 7c29dab51b chmod +x script/ssl_server
Change-Id: Ia7008629dfb7c38cd9efae97d546b0515645ef7e
Reviewed-on: https://gerrit.instructure.com/5953
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-10-03 08:21:16 -06:00
Bryan Madsen d259963460 enable parallelization of selenium tests
Change-Id: I2cbe3f19df3df1442a45479337607bb829b54188
Reviewed-on: https://gerrit.instructure.com/5739
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-09-26 15:45:35 -06:00
Ryan Shaw 2a94eb2937 add a script/ssl_server for https debugging
Change-Id: I767c818c19e7f5ac522d4b81c83744d1dfff0315
Reviewed-on: https://gerrit.instructure.com/3574
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-05-31 09:44:35 -06:00
Brian Palmer 26032f2046 new jobs admin area
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>
2011-05-19 10:49:37 -06:00
Cody Cutrer 63bad32df0 Handle incoming mails. Closes #4016.
* 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>
2011-04-07 10:46:11 -06:00
JT Olds 046cfe54c1 oh whoops, bash might not always be the default shell
Change-Id: I3ba13544e0238579fb374a6a0886fd978689433c
Reviewed-on: https://gerrit.instructure.com/2270
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 12:33:24 -07:00
JT Olds 903bcdd371 move gem_home configuration for delayed_jobs to config folder
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>
2011-02-03 13:38:32 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00