refs CORE-2438
Change-Id: I41bff34847009029fa631ff776cd99a9189846ac
Reviewed-on: https://gerrit.instructure.com/181239
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
basically, avoid trying to do column lookups at this point
Change-Id: Ib652d20cf3822ba6167a5687a5b14aadfbfc8427
Reviewed-on: https://gerrit.instructure.com/181242
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
and no time limits while debugging
I'm guessing this is just older rubies being more lenient, and ruby
2.6 being more strict
Change-Id: I6dba7f4fca1e6129510f873016e0b72dfe550a72
Reviewed-on: https://gerrit.instructure.com/181240
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs PLAT-4154
Test Plan:
Verify you can post results to the AGS using the
application/vnd.ims.lis.v1.score+json content-type
Change-Id: I2de0da013a93669b597aaac02070d2dac7ff207b
Reviewed-on: https://gerrit.instructure.com/178409
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-4154
Test Plan:
Attempt to use the AGS with the custom mime type. Verify line items can
be created.
Change-Id: Ib771ca04a0fbcda87bc7b169abe9fcafb11f4e47
Reviewed-on: https://gerrit.instructure.com/178334
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Missed fixing the namespace inside the block being used in the
delayed job.
refs PLAT-4048
Test Plan:
n/a
Change-Id: I0c6e38ac2074e546206eaecbf82fc2a33ba4963f
Reviewed-on: https://gerrit.instructure.com/176552
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
Product-Review: Marc Phillips <mphillips@instructure.com>
test plan:
* run the migrations
* sending messages and viewing them as an admin
should work as before
closes #COMMS-1327
Change-Id: If955b49d07fa68f8a5151984eb4d9c3b97b118ee
Reviewed-on: https://gerrit.instructure.com/170657
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
The graphql-ruby gem defaults to not including the nodes field for
connections defined with the legacy api
Test plan:
All connections should now have a `nodes` field.
closes GQL-19
Change-Id: I5981b68cdbde73cac2ca06ca4ac90448ab348008
Reviewed-on: https://gerrit.instructure.com/173412
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
closes #CORE-1770
Change-Id: Ic0907e2c6d7e01158ea9ad651bc676e1732aab73
Reviewed-on: https://gerrit.instructure.com/167143
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
if not database server has a region set, the job still needs to run
once.
fixes gh-1344
test plan:
- on open source canvas, make sure incoming mail jobs are actually
queued and run
Change-Id: Id1cdd0da52b2a10356c2542e37b358278af2e697
Reviewed-on: https://gerrit.instructure.com/164657
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
it's still on a strand per-db, but don't enqueue multiple per-shard
Change-Id: I32185d6fddd6007ef1dbc507e88aa10556ec4995
Reviewed-on: https://gerrit.instructure.com/164172
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
closes #CORE-1830
Change-Id: Ib40cf5c3a500cba5cc75b5826769cbd70cb24612
Reviewed-on: https://gerrit.instructure.com/163223
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
so that it can use the same caching infra
Change-Id: Ie797a8f83d16def504b76003b472b538d4b52df5
Reviewed-on: https://gerrit.instructure.com/162504
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
and log autoscaling actions even when autoscaling is enabled
Change-Id: I9f8c5c526707ebf2f3c085a0ce98d4b6ad30b414
Reviewed-on: https://gerrit.instructure.com/161806
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CORE-1784
we've never adjusted it, and it's causing a thundering herd of connections
on HUP and restart
Change-Id: I2d479be48cb19de6389f03cf25e41154bb12bef6
Reviewed-on: https://gerrit.instructure.com/162333
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-43369
it can cause the connection to swap, which confuses AR's advisory lock
protecting against concurrent migraitons
Change-Id: I0e75ffc76dbe7408221c9865b93d0561bcd46b5b
Reviewed-on: https://gerrit.instructure.com/161494
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
woo
Change-Id: I1c3045f001626bee41ee669e8bbe86ea708b8080
Reviewed-on: https://gerrit.instructure.com/160230
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Change-Id: Ia1c3b06f8adffb822415b672912b873dd748197f
Reviewed-on: https://gerrit.instructure.com/158589
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Closes PLAT-3508 & PLAT-3509
Test Plan:
- Verify the key rotate correctly (set current to past, future
to current, and the new key to future) in both cases: when there
is no existing key AND when there is key already in Consul
- Verify the script will be running every month
- Verify the keys got rotated using Imperium gem version '0.4.0'
Change-Id: I630f230b3cd1c515ebb266b532901b4260622173
Reviewed-on: https://gerrit.instructure.com/154529
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
so that we don't get annoying warnings about assuming it's a string
Change-Id: I14e5741725247fb4937cda0a5e39366fb2086f12
Reviewed-on: https://gerrit.instructure.com/156609
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
refs CORE-1505
also, don't build the overview report anymore (which requires summing up
all of the parts)
Change-Id: Icb4c317e65237cb4ea9a800d7742f36ebac79022
Reviewed-on: https://gerrit.instructure.com/154342
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Refs MBL-10482
Test Plan:
- Create an observer alert threshold for
assignment_missing between an observer and student
- Create an assignment that is due in 1-2 minutes
- Wait at least 5 minutes
- Hit /api/v1/users/self/observer_alerts
- An assignment_missing alert should exist
Change-Id: I7936d1eb7bcf347a776c3d0af675e61f5c25db98
Reviewed-on: https://gerrit.instructure.com/153446
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Tested-by: Jenkins
Product-Review: Matthew Sessions <msessions@instructure.com>
refs QUIZ-4583, QUIZ-4626
Must be tested in conjunction with QUIZ-4415
Provides visual indicators in assignment list for the Importing, and
Failed to import states. Allows for the user to remove a failed
assignment import from the list.
Test Plan:
- Do a Common Cartridge or QTI import, enabling Quizzes.Next importing
- Monitor state transitions in Canvas Assignment views.
- Ensure they move from Importing to a finished stated.
Change-Id: I6f07ecae7b5a93dadd5309bb54bf15724f512c16
Reviewed-on: https://gerrit.instructure.com/151026
Reviewed-by: Omar Khan <okhan@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
Refs MBL-10482
Test Plan:
- Create a super observer connected to a student
- Student should be enrolled in a course
- Create a threshold for `assignment_missing` for that student
- POST /api/v1/users/observer_alert_thresholds
- {
student_id: :student_id,
threshold: {
alert_type: 'assignment_missing'
}
}
- Create an assignment that is due in the course for a minute
or two in the future
- Wait at least 5 minutes
- As the observer hit /api/v1/users/self/observer_alerts/:student_id
- There should be an alert for that user
Change-Id: If2dea94052ff932c866a7382a2119a3287350c28
Reviewed-on: https://gerrit.instructure.com/152073
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Taylor Wilson <twilson@instructure.com>
fixes CORE-931
test plan
- migrations should run
Change-Id: I0e836bb4db2ab19fd7763864bea02c8c9dcbe552
Reviewed-on: https://gerrit.instructure.com/139665
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Refs MBL-10126
Test Plan:
- In the rails console, create a
UserObservationLink and an ObserverAlertThreshold
- Create an alert that links to both
- Create another alert that links to both but has
a created_at set to more than 6 months ago
- Run ObserverAlert.clean_up_old_alerts
- Run ObserverAlert.all
- You should only have 1 alert
Change-Id: I23f4723574cde01135ddafb9926c06029266d07d
Reviewed-on: https://gerrit.instructure.com/150324
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Kausty Saxena <ksaxena@instructure.com>
we discovered that direct string comparision of xlog locations can give
invalid results in some situations, where second part of the xlog
location value "wraps" from 7 hex characters to 8
Change-Id: I62215e5fcc3f9655643aab9fc99f55ddbb37e8ac
Reviewed-on: https://gerrit.instructure.com/150385
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes problems when run on relations that are using `from()`
Change-Id: I528dfb7e6885b4ce276900a53d9b2f8adfabafe5
Reviewed-on: https://gerrit.instructure.com/149795
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
closes CORE-1245
recent internal changes in rails (released in 5.1.6) make it more
difficult for our module prepend to work, because column information is
no longer referenced lazily when checking on attribute defaults (see
changes to model_schema.rb). this means that we would need to tie in at
a lower level so that _default_attributes excludes the dropped column,
but in looking at that, Rails 5 added support for ignoring columns,
which ties in at the right level and should solve the same use case we
have.
see http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-ignored_columns-3D
Change-Id: I1f76e9d0894551f90232a36f5d48f27f8989c3a1
Reviewed-on: https://gerrit.instructure.com/145723
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
We're planning to make API calls to Canvas from Quizzes.Next to notify
it that an assignment has finished duplicating. But making API calls to
Canvas is hard, as it requires lots of configuration, an oauth dance,
and a fair amount of luck.
To ensure that assignments don't get stuck in the "duplicating" state if
Quizzes.Next -> Canvas communication breaks down, this commit adds a
periodic job to transition assignments to the "failed_to_duplicate"
state if they have been duplicating for more than 5 minutes.
Refs QUIZ-3764
Test plan:
- Create a Quizzes.Next assignment
- Go to the canvas assignments page
- Click on the kebab menu for the assignment, click "Duplicate"
- Wait 10 minutes
- Refresh the page
- Check that the new assignment displays a "failed to duplicate" message
Change-Id: Ibaf8c16117bc7ab7fc24007944943c3090ba7041
Reviewed-on: https://gerrit.instructure.com/148001
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
I couldn't take it anymore. it was driving me crazy
Change-Id: Ib40addff56e98a6e0a6d80f246c208e0ce0cb762
Reviewed-on: https://gerrit.instructure.com/148026
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
rails uses callbacks internally to manage dirty state tracking. in
a recent update, skipping these callbacks when saving a new object
breaks any future updates to that object (because id_from_database is
not populated, which is then used as `nil` when trying to do
a subsequent update). see:
6932998fc7 (diff-1a091d0f7eb7b0b2ca95c82f5ba0e1fb)
Because of that I feel like saving without any callbacks is somewhat
dangerous. I think if you have to do it, use one of the built in active
record methods that skips callbacks:
http://guides.rubyonrails.org/active_record_callbacks.html#skipping-callbacks
Or use our active_record-suspension gem to skip specific app-level
callbacks.
test plan: tests pass
Change-Id: I7bfb87e328317430fb2a77edca56cace2cd372b5
Reviewed-on: https://gerrit.instructure.com/146139
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
we never want to just increment the last migration version number by 1,
it's too likely to generate conflicts
Change-Id: If6c95470b9fae257cc40c45a3eac0e1d871fb657
Reviewed-on: https://gerrit.instructure.com/145952
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes CORE-1240
test plan
- run account report using parallel runner
- it should work
Change-Id: Ib0e8480e53d65b7e5b7f4d3c3f2f36c7d283fb52
Reviewed-on: https://gerrit.instructure.com/145605
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Change-Id: I67b0b7b9baa41d76a34f37e2b33541cb10760dc6
Reviewed-on: https://gerrit.instructure.com/145006
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
also do it 4x daily rather than 1x daily
Change-Id: I328091586226e334c48bfe96b57b0a601bb22ef2
Reviewed-on: https://gerrit.instructure.com/143678
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Closes: CORE-1154
There are 2 feature flags here. One a specific user (internal
employees, sales people, contractors, etc) can turn on to see where we
are and what would still need to be done. And the other is for an
account to be able to turn on to let the users in their account that
have their language set to an RTL language (eg: Arabic, Farsi or Hebrew)
see the interface in RTL
This commit is part of a chain of commits. you'll need to apply the ones
that follow-on after this to see most of the actual Right To Left
features, this commit is mainly just to create the feature flag.
Test plan:
* go to your user settings page
* you should see a feature option for Force RTL Layout”
* it should show that it is “in development”
* it should should be hidden: eg: only appears for site admins and not
For normal users
* turn it on
(if you have this checked out along with the others that follow beind
this commit)
* navigate around canvas, most things on most pages should be RTL
* you should be able to get an idea of how much more work and what
Kind of changes we’d still need to make to get it 100%
* now turn off that user feature flag, and go to your account's settings
* turn on the "allow users from RTL languages to see RTL layout"
account-level feature flag.
* nothing should change for you, it should be LTR like normal
* set your language to either Arabic, Farsi or Hebrew
* now the interface should all be in right to left.
(again, you'll need to have the follow-on commits to this to see all
of the RTL changes)
* without either of the feature flags turned on, absolutely nothing
should be different at all anywhere in the interface.
Change-Id: Ia78d86fa46d2d289b1913c5d1340546d7f6c3a1f
Reviewed-on: https://gerrit.instructure.com/143891
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Even though this is a patch level version bump, it made a subtle change
that broke some workflows we had (see https://xkcd.com/1172/).
The second argument to Zip::File.open is a `create` flag, which
determines whether the zip file is created if it does not exist. Prior
to 1.2.1, the expectation was that `Zip::File::CREATE` was passed as the
argument if creation was desired. However, internally the library was
inconsistent about checking the passed flag against `Zip::File::CREATE`
vs just checking truthiness.
In practice, what this meant is that if you passed a different truthy
value, like `Zip::File.open(filename, 'w')` (like we did in several
places), the file would still be created if it did not exist, BUT,
critically, it would not be saved if nothing was put into the archive.
1.2.1 changed this flag to always check "truthiness", meaning empty zip
archives started to be saved. Unfortuantely, our mime type evalutation
rules don't correctly identify an empty zip file as a zip file, but
instead as just a binary file. These two things combined to create
problems.
see https://github.com/rubyzip/rubyzip/compare/v1.2.0...v1.2.1
and particularly fc23f68f77
closes CNVS-41711
test plan:
- test course copy and export/import workflows (both canvas and standard
common cartridge formats), especially in "sparse" cases where, for
example, no associated files would be copied.
Change-Id: If0033f6c0ede7f7a6e8c26031371ae2bd24cd1fb
Reviewed-on: https://gerrit.instructure.com/143744
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
(Canvas won't even boot with an older version)
so remove conditionals for older features
Change-Id: Ied601ef97f527ac93d386a650a1bd23f198dcf04
Reviewed-on: https://gerrit.instructure.com/143634
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
refs gh-1229
also make clear how the collator is configured, vs. the defaults
also also document each of our three uses of ICU to point to each
other if you change anything in the future
Change-Id: Ib911302a96a9d9a667923793ebb2be095b62d8ab
Reviewed-on: https://gerrit.instructure.com/142772
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CORE-1069
refs CORE-1026
test plan
- have 2 users with conflicting submissions
one with grade one with submission
- merge them
- split them and it should be restored
Change-Id: Id645ddcc0c5182a825e513de7e7d05e6fa50f254
Reviewed-on: https://gerrit.instructure.com/142004
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
this is just used to fail the delayed job, so it retries. if it fails
it's max retries, the error details are logged on the submission
Change-Id: If1f7da5dd5331ad153d78c323526eac22afd01c5
Reviewed-on: https://gerrit.instructure.com/143174
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
This reverts commit 2b9853c82d
but replaces the googlusercontent url that doesn't exist on the
internet with one that will continue to exist:
aka: https://du11hjcvx0uqb.cloudfront.net/dist/images/email_signature-ea0b2cda73.png
Change-Id: I82ba0bb3cc5ae3ef4749f1fcaabe783775dcfc78
Reviewed-on: https://gerrit.instructure.com/143074
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
test-plan:
- without any other plugin defining `#account` on delayed jobs,
`job.account` should still exist and should return Account.default
- with some other plugin already defining `#account` on delayed jobs,
`job.account` should still use the plugin defined behavior
Change-Id: I5c74febd4525b4196e38c632cfb737a97090f704
Reviewed-on: https://gerrit.instructure.com/143005
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Michael Jasper <mjasper@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes COMMS-939
Test Plan:
- send any email in canvas
- notice the footer image is there
- inspect the html source, and notice that the host is
your local Canvas install
- enable CDN config, run `node_modules/.bin/gulp rev`,
and `rake canvas:cdn:upload_to_s3`
- send another enable
- notice the footer image is still there
- inspect the html source, and notice that the host
is the CDN
Change-Id: Ieaed838dee02168a2aa67f3448d8d68fb6f5b701
Reviewed-on: https://gerrit.instructure.com/142889
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
closes: QUIZ-3861, QUIZ-4113
Test-Plan:
- QA-CR because it's not hooked up yet
Change-Id: I9028c91f485b63bc8ca8d2c70567c78945c2a848
Reviewed-on: https://gerrit.instructure.com/142304
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
and rename that suite of methods to make more sense
test-plan: N/A
Change-Id: Iffc520ea55141ac47da669663838a4d3c3d8712c
Reviewed-on: https://gerrit.instructure.com/142486
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
should still copy rules correctly even if the referenced
assignments are not included in the copy
test plan:
* create a blueprint course
* have an assignment group with assignments and
a dropping rule that excludes one of the
assignments
* sync to an associated course
* change the rule on the group
* re-sync
* it should still exclude the correct assignments
in the associated course group
closes #ADMIN-801
Change-Id: I60e2a691426364ca0b93a1f67b29d1ab05d18e8a
Reviewed-on: https://gerrit.instructure.com/141655
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes GRADE-907, CORE-1050
they don't work right. Rails accomplishes them by selecting IDs
first, and then doing a second query for the eager load. too much work
to re-implement
Change-Id: I0ef2cb437850521c79c22363d82e7302331dc5f7
Reviewed-on: https://gerrit.instructure.com/141865
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
closes CORE-1027
test plan:
* configure marginalia.yml
* in consule, run Account.active.find_each {}
* observer the COPY query, with a marginalia comment
Change-Id: I7708e641e699e52637a800e1d3f25d9b26d94a7a
Reviewed-on: https://gerrit.instructure.com/141636
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Closes: GRADE-861
Test Plan
- Verify there are no N+1 queries when loading speedgrader
caused by originality reports
- Verify there are no N+1 queries when loading gradebook
caused by originality reports
- Verify originality reports are copied to all submissions
in a group when they are created or updated in a group
assignment.
- Verify online upload originality reports are displayed
correctly in speedgrader, gradebook, student grade page,
and submission details page.
- Verify originality reports display properly in gradebook
and speed grader when there are multiple submissions
and each has a different originality report.
- Verify the "resubmit to plagiarism tool" button still
appears in speedgrader.
- Verify originality reports for group assignments are displayed
correctly.
- Verify text entry originality reports are displayed correctly.
- Verify originality report launches work correctly from speedgrader
and gradebook.
Change-Id: I459bbf0a165bb131d58fc153feb0dce3d0bf07af
Reviewed-on: https://gerrit.instructure.com/141321
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
test plan:
- have an assignment that accepts file uploads
- have a student with non-ASCII characters in the name
(e.g., accented or Japanese, etc.)
- submit as the student
- as the teacher, on the assignment page right sidebar,
download submissions (ensure jobs are running)
- the non-ASCII characters should not be filtered out
of the student's name in the filename
notes:
- spaces and commas and hyphens, etc., will still
be filtered out of names; this was done for
other reasons and has not changed. the difference
is we use [[:word:]] instead of \w, which includes
word-like Unicode general categories and not just
alphanumerics
- windows explorer prior to windows 8 does not
properly support unicode filenames in zip files.
there's not much we can do about this, other than to
suggest using a third-party zip program that does.
(ASCII filenames are still handled correctly)
- the student's name is not included if anonymous grading
is turned on
fixes ADMIN-770
Change-Id: I1cb06a4277ee330e02dabab1d7d7cae01d80822a
Reviewed-on: https://gerrit.instructure.com/140996
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
so that the connection to the default shard catches it. also
stop using the Rails 4 location of it
Change-Id: Iec213127458d77d12b98fd9a8f02fec7f74f1cc4
Reviewed-on: https://gerrit.instructure.com/141434
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
also, allow explain to take a block, so you can run it for any query
(i.e. User.explain { something_complicated.count })
Change-Id: Ie724215ed1f1a45e7bec49a6deb960d09876bf03
Reviewed-on: https://gerrit.instructure.com/140615
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes gh-1167
and set them up for the chinese variants
test plan:
* change your browser language to Chinese (Traditional)
* ensure your account and user don't override the language
(both set to System Default)
* inspect your web request, make sure the accept-language includes
zh-TW
* you should see Canvas in traditional chinese, not simplified
chinese
Change-Id: Id09e9b348c18195809b96138d081c246c080fa29
Reviewed-on: https://gerrit.instructure.com/133838
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
where possible
fixes CORE-939
test plan:
* run some account reports
* check your log
* see that reports were run with COPY (...) TO STDOUT, and not
a cursor
Change-Id: Icf953ffe33c12b2046187ceecad0397ce20a9eb4
Reviewed-on: https://gerrit.instructure.com/139552
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CORE-324
test plan
- run a sis import with errors
- the errors should be included in the api JSON
Change-Id: I97e372a82b565e7bfa01cd9ca0bb66bb67c95723
Reviewed-on: https://gerrit.instructure.com/139071
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Test Plan:
* Configure canvas to work with 3rd party service (like address-book)
* Confirm that canvas can connect to third party service
* Save or touch any file (IE app/observers/live_events_observer.rb)
* Reload page, and confirm that canvas can still connect to service
closes RECNVS-246
Change-Id: Ib3a1b12cdc038f90c139e4d4c957e960288b3e9a
Reviewed-on: https://gerrit.instructure.com/138638
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
refs CORE-899
test plan
- migrations should run
Change-Id: I7ab923cc917f753b92fbaf69b3e910f599ecc052
Reviewed-on: https://gerrit.instructure.com/138834
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Change-Id: Ieb0faa8b5f0295c035d88499cd6730a432ab5521
Reviewed-on: https://gerrit.instructure.com/136260
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes CORE-638
also change time zone picker to show DST offset as well as the
base offset if they respect DST in that zone
test plan:
* go to change your user settings, and in the time zone drop down
you should see all 6 brazil zones.
* ensure saving thas these zones actually persists
Change-Id: I2a31780f25f396cc79a8d5a630791646cdda8e76
Reviewed-on: https://gerrit.instructure.com/133060
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
also, activate the correct shard before using it in SisPseudonym
Change-Id: If7cc30580630aea190f4ca5853ad25ec3fec4e2d
Reviewed-on: https://gerrit.instructure.com/133876
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CORE-47
test plan:
- have a user who has their language set to spanish
- checkout the following locations and ensure that week days run from
Monday to Sunday:
- syllabus mini calendar
- calendar page week + month view
- calendar page mini calendar
- date picker on assignment or calendar event
- have a user ho has their language set to english
- check the same locations and ensure that week days run from Sunday
to Saturday
Change-Id: I03d02f37aa6c5570967b092ffcdd774acc62984b
Reviewed-on: https://gerrit.instructure.com/132264
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
This re-enables better_errors with an opt in policy for
binding_of_caller (which powers the browser REPL) to safeguard
by defautl against RCE with tools like ssh, ngrok or localtunnel
The key for enabling the console is BETTER_ERRORS_ENABLE_CONSOLE
and the key for disabling better_errors altogether is
BETTER_ERRORS_DISABLE.
Docker users: set your TRUSTED_IP address in your environment
variables to access better errors in you web container.
fixes: GRADE-156
test plan:
- by default, no live REPL console should be present when the
error page is present (e.g. /accounts/0)
- given BETTER_ERRORS_ENABLE_CONSOLE=true
- the live REPL console is now present
- given BETTER_ERRORS_DISABLE=true
- the better errors page is not displayed (e.g. /accounts/0)
Change-Id: Ia259bc466136d678aa0b33047dda5f2aa0b3c28d
Reviewed-on: https://gerrit.instructure.com/95120
QA-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes CNVS-39780
test plan:
* change your time zone to Philippines
Change-Id: Ief15405da51f0471c2bd10a239ef305ae2b80a18
Reviewed-on: https://gerrit.instructure.com/129722
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: If820d1c671036f5335ec23bc1007626f0b54e265
Reviewed-on: https://gerrit.instructure.com/129712
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
all of them should be migrated over now
Change-Id: I4663d44ccafd913087ecef3cf89809473e5be202
Reviewed-on: https://gerrit.instructure.com/129707
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Fixes: CNVS-39854
Test plan:
* mv config/database.yml config/database.yml.backup
* bundle exec rake canvas:compile_assets
* it should work
* Docker build should pass
Change-Id: I0786d1de1d6f6f69d665e10b0428571e77d7f859
Reviewed-on: https://gerrit.instructure.com/128974
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Closes: CNVS-39627, AMS-701
The Delayed::Worker around callbacks are chained,
so all of the required parameters must be passed
through to the block in case it is another callback
that relies on them.
Change-Id: I740d42bfc36e3dda52c85802ddca673f2b2f6bb8
Reviewed-on: https://gerrit.instructure.com/128232
Tested-by: Jenkins
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Jeremy Slade <jslade@instructure.com>
QA-Review: Jeremy Slade <jslade@instructure.com>
also change cache_store reloader to not leave a bad state
if one cluster has invalid config
Change-Id: I711aff6d9dbbadff8a6ea66a6f438781b5c8e19b
Reviewed-on: https://gerrit.instructure.com/126634
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I1703075e45c377a86bdee3757b967e732d1fa318
Reviewed-on: https://gerrit.instructure.com/125926
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-39296
test plan:
* run jobs/web (must be using a web server that doesn't capture HUP
itself)
* HUP your processes
* notice that they don't crash, and the logs will say that the reloader
ran
Change-Id: I150729fdb68c0fd0ff462d794eecfc8da7e17e5e
Reviewed-on: https://gerrit.instructure.com/125968
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-39235
also allow chaining of clusters (to share a cache store among
multiple clusters), and hot-reloading. but do it all carefully so that
if config doesn't change, we don't reconnect, and shared cache stores
are actually shared (not multiple connections)
Change-Id: I2b72472b4d0f4a34619878752801dd5c05a305a8
Reviewed-on: https://gerrit.instructure.com/125833
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-35834
* allow specifying tree, service, and cluster for consul stuff
* check multiple consul keys for each setting (cluster, env, region, global)
test plan:
* an existing consul environment still works
Change-Id: I48e8fadeac2e140973bfc4b41c1cfb386532d15c
Reviewed-on: https://gerrit.instructure.com/125271
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
test plan:
* use the API to queue a content migration for a course
with a parameter 'file_url' set to a local url
(i.e. 'localhost:3000/500.html')
* it should not download the file and allow the file
to be downloaded on the content migrations page
for the course
* create a link to a local file
in a piece of course content (i.e. a page)
* run the course link validator
* it should not actually check if the link exists locally
or not, but rather always flag the link
closes #SEC-606 SEC-607
Change-Id: I671c017ec93d88446df77d716725fff8874622bc
Reviewed-on: https://gerrit.instructure.com/125118
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: I89a76098f8785a800561c6ec6c5dfbd54f729995
Reviewed-on: https://gerrit.instructure.com/125230
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
and use per-cluster for permissions
Change-Id: Ib5a84f2768c5e86f2071dbd149e8d9cdfd015917
Reviewed-on: https://gerrit.instructure.com/124951
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-38989
Test Plan:
- Send yourself an email (one which you can reply too
aka conversation messages/discussions)
- notice you see the text:
"You can reply to this message in Canvas by replying directly
to this email, or by clicking this link: %{link}."
- stop your server and modify config/outgoing_mail.yml
under development(or whatever env you are in) add
`reply_to_disabled: true`
after ` default_name: "Instructure Canvas"` key
- resend yourself an email like above
- notice that text above no longer states you can reply to the email.
Change-Id: I2707b77d3aa296dce5f04359c8e016d805e7ecd3
Reviewed-on: https://gerrit.instructure.com/124813
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Christi Wruck
closes CNVS-38714
test plan:
- enable the crocodoc plugin with a bogus api key
- notice that the CrocodocDocument.update_process_states runs and fails
- check the box to disable polling in the plugin
- the job should stop failing
Change-Id: I365ceeba2d83e4d2ec66ed8e977ba7798a58a960
Reviewed-on: https://gerrit.instructure.com/123017
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
name did not match usage, and all remaining usage can be satisfied in
other ways.
closes CNVS-38407
test plan: regression test message sending (immediate, delayed, and
dashboard notifications w/ stream items)
Change-Id: Ibe110527b4644cbaa417c53b2b53c2fd7e18dc9e
Reviewed-on: https://gerrit.instructure.com/120520
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Reviewed-by: Matt Smith <msmith@instructure.com>
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes PLAT-2770
test plan:
• Go to any account/course settings page
• Click on the Apps tab
• Click on any LTI that populates within the App Center (I use 3DGameLab)
• Click '+ Add App'
• Click the 'Add App' button in the window that appears
• Verify app is added successfully
Change-Id: I060ed314423c841ff5d8ef12c46f2377f31b58b1
Reviewed-on: https://gerrit.instructure.com/122918
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: August Thornton <august@instructure.com>
This method is already defined by YARD, but we don't include YARD in our
production dependencies, so we have to reimplement it.
Test plan: check that production builds work
Change-Id: I1dc383b8ca5414a57151ac409795e53932f9cd8a
Reviewed-on: https://gerrit.instructure.com/122078
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
fixes CNVS-38446
refactor InCommon to be a common base class for both, and in our
special casing of InCommon refactor to iterate the children
classes
test plan:
* add a SAML config with either InCommon or UK Federation special
metadata URIs, and a valid entity ID for a school that's part of
one or the other
* the rest of the metadata should populate without error
Change-Id: Ie2d37e942cc35333ee16d1f0b3cbb2dc81f53767
Reviewed-on: https://gerrit.instructure.com/121421
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I2f4ca4a671a0e5bdcfbeb90b4714465ec34acc9f
Reviewed-on: https://gerrit.instructure.com/120891
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Test plan:
Periodic jobs run
Change-Id: Iecd5fc2660f7daa7da355cb3cd04cbadc8883178
Reviewed-on: https://gerrit.instructure.com/120806
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
closes CNVS-38367
test plan: send a message, it should work
Change-Id: Ic1b99120ee0c93155a4a4475f4d1dfb3d373be37
Reviewed-on: https://gerrit.instructure.com/120424
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Matt Smith <msmith@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Change-Id: Ic6e4f64874021639f5e8950e2fe42f714ae31250
Reviewed-on: https://gerrit.instructure.com/120225
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Change-Id: I367c6dfbe237272f187e262e86725038fc9febbd
Reviewed-on: https://gerrit.instructure.com/120553
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Change-Id: Ieef3d3447cfa2b22c9c9f6662688a40ae48a726c
Reviewed-on: https://gerrit.instructure.com/119730
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Fixes: CNVS-38111
Test Plan:
* Disable permission caching
`Setting.set('permissions_cache_enabled', 'false')`
* Start up your web server and visit any page
* You should not see any Redis requests for permissions in your
development logs
Change-Id: Ib91a0b7fc9ca8db121f942984e26f44d19d2400b
Reviewed-on: https://gerrit.instructure.com/118850
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
Fixes: CNVS-38113
By intermediate permissions we mean permissions used to determine if the
directly queried one matches, for example in `app/models/account.rb` we
have a :create_tool_manually permission that checks if the user can
:lti_add_edit. Before this patch both permissions would get written to
the Rails cache, with this patch and the flag set to false :lti_add_edit
won't get written but the top level :create_tool_manually will.
Test Plan:
* Set the new flag to false:
`Setting.set('permissions_cache_intermediate', 'false')`
* Start tailing the development log grepping for setting permissions
`tail -f log/development.log | grep 'setex permissions'`
* Create an LTI1 tool registration using the UI, you should see a
permission named `create_tool_manually` get cached while one named
`lti_add_edit` should not.
Change-Id: I88ba5cc03d1a13030f53194554d6eee3c287c10d
Reviewed-on: https://gerrit.instructure.com/118656
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
closes CNVS-38143
this commit aligns the collation schemes for postgres, ruby and
javascript to the same level. this means that when sorting an
array of strings in any of the three environments, the result
will be identical.
this also stops relying on default collation strengths in ruby
and postgres and explicitly specifies the default collation
strengths to avoid surprises later.
test plan:
* Verify migrations pass with multiple shards
* Verify migrations rollback properly individually
Change-Id: I6023b364c260c35b85a8d6364ccc346e2ef7d159
Reviewed-on: https://gerrit.instructure.com/118675
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Fixes: CNVS-38114
We were just blindly caching everything that could be cached when
calculating permissions, it turns out these aren't actually used very
frequently so we're going to try turning caching of them off.
Test Plan:
* With Redis backed caching enabled
* Tail your development log grepping for setting permission caches:
`tail -f log/development.log | grep 'setex permissions'`
* Visit your main account settings page: `/accounts/1/settings`
* Note that there are many manage, update, and delete permissions
written to redis.
* In a console disable related permissions caching:
`Setting.set('permissions_cache_related', 'false')`
* Reload configuration values for your web process (SIGHUP or restart)
* Reload the account settings page, note that there are only redis
writes for read permissions now instead of many others.
Change-Id: Ic5a73a5124b42405fed79bede37aff70322d0c54
Reviewed-on: https://gerrit.instructure.com/118480
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
Fixes: CNVS-38110
This is the first of a few knobs we'll be adding to give the ability to
tune rails cache traffic coming from adheres_to_policy. We're adding
these because it constitutes a very large portion of the current redis
traffic with a fair bit of that traffic writing keys that never end up
actually being read based on some recent log analysis.
Test Plan:
* Tail your development log grepping for `manage_courses`
`tail -f log/development.log | grep manage_courses`
* Visit an account's courses page: /accounts/self
* The tailed logs should show a Redis get and setex for a permissions
key on accounts.manage_courses
* In a console run
`Setting.set('permissions_cache_blacklist', 'account.manage_courses')`
* Restart your web server
* Visit the account courses page
* The logs should no longer include the Redis traffic
Change-Id: I566f58e70687c4fcffe7369b94f38e62f1318ce8
Reviewed-on: https://gerrit.instructure.com/118378
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
Remove accepted_at and add seconds_late_override to the submissions
table.
closes CNVS-37893
Test Plan:
1. Verify running the migrations in this commit removes accepted_at
and adds seconds_late_override to the submissions table.
2. Verify rolling back the migrations in this commit adds accepted_at
and removes seconds_late_override from the submissions table.
3. Run the migration before following the next steps.
4. In a rails console, find a submission and set its late_policy_status
to nil.
s = Submission.find(<submission id>)
s.update!(late_policy_status: nil)
5. Verify you cannot set seconds_late_override.
s.update!(seconds_late_override: 60)
s.seconds_late_override # => nil
6. Set the late_policy_status to "late" and verify you can set the
seconds_late_override. Also verify the seconds_late method now
returns the overridden value.
s.update!(late_policy_status: "late", seconds_late_override: 60)
s.seconds_late_override # => 60
s.seconds_late # => 60
s.update!(seconds_late_override: 20)
s.seconds_late_override # => 20
s.seconds_late # => 20
7. Set the late_policy_status to something other than "late" and verify
the seconds_late_override is set to nil.
s.update!(late_policy_status: "missing")
s.seconds_late_override # nil
8. As a teacher, hit the submissions update API endpoint
(PUT "/api/v1/courses/#{course.id}/assignments/#{assignment.id}/
submissions/#{student.id}.json")
and pass:
submission: {
late_policy_status: 'late',
seconds_late_override: 60
}
a. Make sure the json response includes a late_policy_status of
"late" and a seconds_late of 60.
b. Load the submission in rails console and make sure its
late_policy_status is set to "late" and its seconds_late_override
is set to 60.
9. As a teacher, hit the submissions update API endpoint
(PUT "/api/v1/courses/#{course.id}/assignments/#{assignment.id}/
submissions/#{student.id}.json")
and pass:
submission: {
late_policy_status: 'missing',
seconds_late_override: 60
}
a. Make sure the json response includes a late_policy_status of
"missing" and a seconds_late of 0.
b. Load the submission in rails console and make sure its
late_policy_status is set to "missing" and its
seconds_late_override is set to nil.
Change-Id: I9a8070445482b7029454cdfbbcc266aaab5a3e4b
Reviewed-on: https://gerrit.instructure.com/117476
Tested-by: Jenkins
Reviewed-by: Matt Taylor <mtaylor@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
refs #CNVS-37760
Change-Id: If28e1c1c9f79ce1b7cbe57f0cd24e61c68a31961
Reviewed-on: https://gerrit.instructure.com/117543
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
we only want to still include the current region, not every single
database
Change-Id: I8a03124b3996ed20bcef55709d31891d9d37c8ec
Reviewed-on: https://gerrit.instructure.com/116941
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Change-Id: Ic72ed90ba23355977b7debe5d02941b7743bad6a
Reviewed-on: https://gerrit.instructure.com/115751
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
test plan:
- ContentExport.joins(:attachment).where(id: 1).limit(1).
update_all(updated_at: Time.now.utc) should do the right thing
Change-Id: Ibffb448205a823df23a81dae6200db8cd31baf7d
Reviewed-on: https://gerrit.instructure.com/115785
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>