ignore the attribute if we're only copying over a
non-masterypaths assignment with overrides
test plan:
* create an assignment and assign it to a section or student
* copy the assignment
* the new copy should default to being available to everyone
closes #CNVS-34176
Change-Id: Id7134d38b0ec32f0edbf7051a957d5bc2f9e8861
Reviewed-on: https://gerrit.instructure.com/99023
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes: CNVS-32487
Test plan:
Prep
- create user1 and user2 with the same email address
- create user3 with a different email address
- create a course with a few sections
test
- navigate to the course and select People
- click the "+ People" button
> the "Add People" modal dialog should open
> the available Roles should be listed in the dropdown
> the course's sections should be listed in the dropdown,
sorted by section name
> the "Next" button is disabled
- click "Cancel"
> the dialog should close
- click "+ People"
> the dialog should re-open
- click on the email, login id and sis id radio buttons
> the example text above the textarea should change to reflect
your choice
- select "Email Address"
- start typing in the text area
> the "Next" button should become enabled
- enter the unique email address of user3
- click "Next"
> you should see a network request to /courses/:courseid/user_lists.json
> The dialog should show "The following users are ready" panel with
your user's name and institution displayed. The SIS ID is only
displayed if you assigned one. The email is only displayed if you
searched by email (you did and it should be there). The Login ID is
only displayed if you searched by login id.
- clicak "Start Over"
> The search panel of the dialog is redisplayed
- enter the 2 email addresses for the users you created,
plus one you didn't
- select a Role
- select a Section
- click "Next"
> The dialog should show a panel with two sections, duplicates and
missing
> the "Next" button is disabled
> The "there were several possible matches" table should show the
info from user1 and user2, plus a row to create a new user, plus a
row to skip this user.
> The "unable to find matches" secton should show the third email
address with a link to add a name
- Click the "Back" button
> the search panel should redisplay with all your previous inputs
- Click "Next"
> the panel with duplicates and missing emails is redisplayed
- Click user2's radio button
> the "Next" button is enabled
- Click the link or checkbox to "add a name"
> the table row changes to include 2 text boxes for name and email
> the email textbox is pre-populated with the email address you
searchd for
- Click "Next"
> you should see a network request for /courses/:courseid/invite_users
> "the following users are ready to be added" panel is displayed
> the table includes user, the user name and email of the new user
you invited
- Click "Start Over"
> The search panel is displayed, reset to default values
- enter the email address for users 1 and 2
- click "Next"
> the panel showing the 2 users with this email address is displayed
> the "Next" button is disabled
- click the radio button for "Don't add this user for now"
> the "Next" button is enabled
- click "Next"
> "The following users are ready" panel is displayed, with no users
in the table
- click "Start Over"
- enter the email address for users 1, 2 and 3 and an email for a
user that doesn't exist
- click "Next"
- click the radio button or link to "create a new user for.."
> the row gets 2 text boxes for name and email
> the "Next" button is disabled
- enter a name and email address
> the "Next" button is enabled
- click the button or link "click to add a name" for the missing email
> the "Next" button becomes disabled
- enter a name and email
> the "Next" button becomes enabled
- click "Next"
> the "following users are ready" panel is displayed with user3 and
the two users you just created.
- click "Add Users"
> there should be a network request to /courses/:courseid/enroll_users
> the dialog closes
> there's a network request to /api/v1/courses/:courseid/users
> the 3 users are listed in the People page's table.
> the roles and sections are what you chose in the search panel of
the dialog
Change-Id: I1a66aae52e2a5e20839dff278de2e8196d07b24e
Reviewed-on: https://gerrit.instructure.com/93732
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: McCall Smith <mcsmith@instructure.com>
sometimes it refreshes the page before one of the mark-as-read ajax calls
gets triggered, canceling it
Change-Id: Iaa2ac4e47d24c002148e757a039201ed2dc7c0e3
Reviewed-on: https://gerrit.instructure.com/99385
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
closes CNVS-31607
test plan:
* Create a course with four assignments: one regular but with a
really long name, one that is muted (you'll have to use regular
gradebook to mute it), one that has no points and one that
does not count towards the final grade
* Go to the course gradebook and ensure the header for the
assignment column shows the assignment name and the number of
points it's out of
* Ensure all assignment headers show a "more" icon which, when
clicked, shows three dummy menu items to choose from.
* Ensure assignments with long names show as much of the name
as possible and adds ellipses for the rest
* Ensure assignments that have any points associated with them
show a second line indicating the total points
* Ensure assignments that have zero points don't show the total
points on a second line
* Ensure muted assignments show a muted icon and have an
appropriate tooltip
* Ensure assignments that don't count towards the grade show a
warning icon and have an appropriate tooltip
* Move an assignment column to a different position and ensure
its options menu stays the same
Change-Id: Iefdda2e2f05b1824c6d6f125583df4892c78f851
Reviewed-on: https://gerrit.instructure.com/99042
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
closes OUT-426
Test Plan
1. Prepare an assignment accepting submissions.
2. As teacher and admin, ensure todo list on course home page appears
correctly for the assignment.
a. When a submission is made, it should appear "needs grading"
b. When more submissions are made, it should appear only once and
show count of pending submissions.
c. When a submission is graded, the count should decrement until
there are no pending submissions remaining.
d. When a user with a pending submission unenrolls, the count should
decrement. When the user is reenrolled, their submission should
reappear.
3. As a TA with limited visibility to a section, ensure todo list
appears correctly and only counts submissions that should be visible.
4. Ensure graded quizzes have the same behavior.
Change-Id: I5eca4d0d9d008b2ce1ae39660f29709c509bed22
Reviewed-on: https://gerrit.instructure.com/96241
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
closes OFFW-46
test plan:
- from the modules page, click the Download Course Content button
- when the Offline Course Downloads page loads,
you should see a progress bar that increases as progress is made
- when the progess is completed, it should disappear and
and after a delay that export should be added to the list above
Change-Id: Ibc87040c8ed1c7c962774b8d3de848f108032eae
Reviewed-on: https://gerrit.instructure.com/98815
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Fixes CNVS-34276
Test plan:
* As a teacher, create an assignment
* As a student, create a submission
* As a teacher, grade the student
* Delete the student from the course
* In rails console, find the student's enrollment and set its
workflow_state back to 'active'
* As the student, submit for the assignment again if needed
* As a teacher, grade the student again
* You should be able to see the new score (this crashed before)
Change-Id: I0eb62a4be1df7e568b9f761232d4c42ff835e534
Reviewed-on: https://gerrit.instructure.com/99288
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
- add muted and grading_complete fields to live events
refs: OUT-577
Test alongside g/97097
Test plan:
- Partially graded items
1. Create a quiz with some automated and some manually graded
content. Apply mastery paths rules to trigger other assignments.
2. As student, take the quiz, such that your score on the
automatically graded content would trigger a mastery path rule
3. Verify that no content is released
4. As teacher, grade the remaining questions of the quiz such that
master paths content should be released.
5. Verify that the appropriate content is released to the student.
- Muted items
1. Create an assignment with mastery paths rules
2. As student, submit the assignment
3. As teacher, mute the assignment
4. Grade the submissions such that master paths content should be
released
5. As student, verify that no content has been released
6. As teacher, unmute the assignment
7. As student, verify that the appopriate content has been released.
Change-Id: I312aba018ca262a907c6a23a938af739842e28ae
Reviewed-on: https://gerrit.instructure.com/97098
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Fixes: CNVS-33935
Test plan:
- Words in the To-Do, Coming Up, and Recent Feedback
lists should no longer break awkwardly
- Long words and links in the right sidebar To-Do,
Coming Up, and Recent Feedback lists should now
be handled by hiding the overflow and fading them
out with a white gradient:
http://www.screencast.com/t/b19RGB4F7v
- The spacing and line-height of the To-Do, Coming
Up, and Recent Feedback lists should look better.
Change-Id: I96486077c57c24d18a991394c0747c6cf4f98c7d
Reviewed-on: https://gerrit.instructure.com/99234
Tested-by: Jenkins
Reviewed-by: Pam Hiett <phiett@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
test plan:
* create an account outcome
* create a course with an outcome group
* import the account outcome into the group
* link the outcome with a question bank
* copy the course
* it should not create an outcome link in the copied course's
root outcome group
closes #CNVS-34196
Change-Id: I23171bc8270121889c3bf2ae71c2d1e59c81ecc0
Reviewed-on: https://gerrit.instructure.com/99103
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
closes MC-26
Change-Id: I6ee171e7a15e9fc883d4fb0295be66d51237262f
Reviewed-on: https://gerrit.instructure.com/98602
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Non auto submitted submissions will set annotation true when loaded in speed grader
Cloud Assignment submissions will auto submit to canvadocs
refs: RD-3449
Test plan:
Create a cloud assignment
As a student submit the cloud assignment
As a teacher open the assignment in speed grader
Observe the ability to annotate the cloud assignment
Change-Id: I6ddff84a4a97d920d17dcb26933fcc02c5e59026
Reviewed-on: https://gerrit.instructure.com/99196
Reviewed-by: Josh Orr <jgorr@instructure.com>
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
refs #CNVS-32574
Change-Id: I272579bba8c1993fc5af872abe685f21318833a2
Reviewed-on: https://gerrit.instructure.com/94567
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
When an enrollment in restored, only scores with
that enrollment id will now be restored.
closes CNVS-34232
test plan:
1) Create two student enrollments in a course.
2) Go to the gradebook and grade each student
for at least one assignment.
3) Open a rails console and get the course scores
for the enrollments.
$ first_score = Score.find_by(enrollment_id: enrollment1,
grading_period_id: nil)
$ second_score = Score.find_by(enrollment_id: enrollment2,
grading_period_id: nil)
4) Destroy both scores.
$ [first_score, second_score].each(&:destroy)
5) Destroy one of the enrollments and then restore it. Verify
the score associated with that enrollment has been restored.
Verify the score not associated with that enrollment is still
deleted.
$ enrollment1.destroy
$ enrollment1.restore
$ Score.find_by(enrollment_id: enrollment1,
grading_period_id: nil).workflow_state
=> 'active'
$ Score.find_by(enrollment_id: enrollment2,
grading_period_id: nil).workflow_state
=> 'deleted'
Change-Id: I6fccd079b42dbc50c1be9b1c47aca9ebf80d3f71
Reviewed-on: https://gerrit.instructure.com/99146
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.
closes CNVS-33856
test plan:
- register linked in as a user service
- it should work
Change-Id: I158e132314569dd960e04c6c863db90146b8062a
Reviewed-on: https://gerrit.instructure.com/97542
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
in aws-sdk v2, this `.read` doesn't take a block, so the files were empty
verified manually by (re-)finalizing 42613b97
Change-Id: I07fecc2fba31b46de891a000ab16c298cf9a9cc1
Reviewed-on: https://gerrit.instructure.com/99250
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Closes: CNVS-33647
Test Plan:
- Navigate to your user settings
- The text for the Underline Links feature option should now
read as follows:
Underline Links displays hyperlinks in navigation menus,
the Dashboard, and page sidebars as underlined text. This
feature option does not apply to user-generated content
links in the Rich Content Editor, which always underlines
links for all users.
- The text 'underlined text' in the description should be
underlined
https://www.screencast.com/t/xwYkSRknrs7B
Change-Id: I24fd76012f728238ffad2086d8c01594ef986601
Reviewed-on: https://gerrit.instructure.com/98857
Reviewed-by: Pam Hiett <phiett@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
refs #CNVS-32574
Change-Id: Ied89f6194ea3f63c546b50d056fe7cbe3a038609
Reviewed-on: https://gerrit.instructure.com/94678
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes CNVS-34242
This makes dr_diff have an option to avoid checking
lines surrounding changes. It also sets up eslint
to take advantage of this rule.
Test Plan:
- Automated Tests Pass
- Eslint only flags errors on changed lines
(when run through Gerrit/Jenkins/Gergich or
via script/eslint)
Change-Id: I900430f21c4c925e8fd87bd62e75b271fa84d08e
Reviewed-on: https://gerrit.instructure.com/99048
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
if the sis import fails to find the sis_batch on
update progress it will continue and update the
progress on next run.
fixes CNVS-34250
test plan
- run a sis import
- it should run
Change-Id: Ie4541b250f375bcb5fedfa6a1ab9afee15233169
Reviewed-on: https://gerrit.instructure.com/99230
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Fixes CNVS-34215
Test Plan:
* Create an announcement
* As a student, see that the announcement is available to comments
* As an admin, enable the account setting to disable comments on announcements
* As a student, see that announcements have a locked icon and cannot have replies
* As an instructor, view the announcements page and click the settings icon for an announcement
* See that an "Open to Comments" option doesn't appear in the menu
* View (not edit) one specific announcement and click the settings icon
* See that an "Open for Comments" option doesn't appear in the menu
* As an admin, disable the account setting to disable comments on announcements
* As an instructor, view the announcements page and click the settings icon for an announcement
* See that an "Open to Comments" option appears in the menu and unlocks the announcement when clicked
* View (not edit) one specific announcement and click the settings icon
* See that an "Open for Comments" option appears in the menu
Change-Id: I99482c05a5d710095287108925cca969c76ec160
Reviewed-on: https://gerrit.instructure.com/99150
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
refs #CNVS-32574
Change-Id: Idf64d7dc4272c3ee186970b994e5fec5c9597418
Reviewed-on: https://gerrit.instructure.com/94682
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: I1e28ac7a7debbb479c2f8c81597958c799b319d9
Reviewed-on: https://gerrit.instructure.com/94681
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: Ic3cd179a7cfb22e3b25a72500313f1baa8f96bb9
Reviewed-on: https://gerrit.instructure.com/94680
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
it was unused and our fork has diverged from the main gem. I'd still
love to see bullet get into our linting, but we need to start over on
the approach
refs CNVS-34084
test plan: specs should pass
Change-Id: I46c211e4a21b6234d0e3a4fee1ac91acf2d3c5d0
Reviewed-on: https://gerrit.instructure.com/98789
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
test plan:
* see test commit verifying linters still work
Change-Id: I406c218309e824618869c9b5f3841af8387bf836
Reviewed-on: https://gerrit.instructure.com/98329
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
refs #CNVS-32574
Change-Id: Iaac099efac4162bd060e2b8d5a9e6bc5170ce02d
Reviewed-on: https://gerrit.instructure.com/94593
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
fixes FALCOR-58
test plan:
- Have an assignment with a pass / fail grading scheme.
- Complete the assignment for a student and grade it.
- As a teacher, trigger the context tray for the student (from the
grades page, say).
- Observe that the `aria-valuetext` attribute for the corresponding
progress bar is either `complete` or `incomplete`; it used to be
`[object Object]`.
Change-Id: Ia780bea31e0085eaf636084218f123cbf8dd185a
Reviewed-on: https://gerrit.instructure.com/99139
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Dan Sasaki
Fixes: CNVS-28306
Test Plan:
- ensure Admin > <your account> > Settings > Enable Profiles
and User Avatars are checked
- navigate to Account > Profile
- using keyboard:
- TAB (displays "skip to main content")
- ENTER (focuses on the main content of the profile page
- TAB (focuses avatar image)
- ENTER (displayes Select Profile Picture dialog)
- TAB 4 times (focuses "choose a picture")
- ENTER (displays system file open dialog)
- Select a photo
- The selected photo and crop-box are displayed and
have focus
- Use arrow keys to move the crop box around
- Use shift-arrow keys to size the crop box
- TAB twice to focus Save button
- ENTER closes dialog
- cropped image should be displayed on the profile page
change history
- added js spec for the cropper
- fix require_js config for react-crop
2016-12-13
- changes needed after react-crop distribution changed
- break CanvasCropper and CanvasCropperMaker into 2 files
in response to code review
2016-12-16
- update the react-crop version
- set a min size on the cropper (so it can't go negative)
- update css so image won't overflow its box
- address eslint warnings
2016-12-21
- fix merge conflict
note: the .rb file change supports the build. there is no need
for a corresponding spec
Change-Id: I2b6dc165ed5dc2865f282c35018686dd820fea30
Reviewed-on: https://gerrit.instructure.com/97197
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
refs #CNVS-32574
Change-Id: Ifd139bf1e8296370d1d793ceed7c8e2e50440059
Reviewed-on: https://gerrit.instructure.com/94684
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: If0a354295f9433fcf4dc2a776d93ae45833a44bd
Reviewed-on: https://gerrit.instructure.com/94683
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: Ic42c1c7bcc85c99818386392b1a0ebb55229e43c
Reviewed-on: https://gerrit.instructure.com/94679
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: Ib1fc9c81dbfa4ece200a15a23105dbfa6f84d0c6
Reviewed-on: https://gerrit.instructure.com/94677
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
- helps cyoe process and assign synchronously
- correct link error in choose_mastery_path page
fixes: OUT-570
Test plan:
Test alongside CYOE g/97407
- As teacher, create mastery path that includes OR options
- Score student in range such that they are presented with
these options
- As student, visit modules page and choose "Select assignment
option"
- Choose one of the options
- Click on one of the assignments in the chosen option
- Ensure that you are able to view the assignment
Change-Id: I0d2a990b31cbd8205564ba704d4b38907abf98d9
Reviewed-on: https://gerrit.instructure.com/97427
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Using rolling counters in redis, build up data to go into timeout
protection when the percent of failures reaches a certain level.
Also, the existing timeout protection is tweaked to use redis keys
that won't overlap with the rolling counters redis keys.
The default values for failure rate cutoff is 20%, the default minimum
samples is 100, the default rolling counter time is 60 seconds. The
default protection time is the error_ttl time.
closes CNVS-34031
test plan:
- Ensure canvas is configured to use redis
- In the rails console do the following:
Setting.set('service_qatesting_timeout', 1)
Setting.set('service_qatesting_timeout_protection_method',
'percentage')
Setting.set('service_qatesting_min_samples', 10)
- The following must be completed in the rails console in under a
minute:
Canvas.timeout_protection('qatesting') { }
Canvas.timeout_protection('qatesting') { }
Canvas.timeout_protection('qatesting') { }
Canvas.timeout_protection('qatesting') { sleep 2 }
Canvas.timeout_protection('qatesting') { }
Canvas.timeout_protection('qatesting') { sleep 2 }
Canvas.timeout_protection('qatesting') { }
Canvas.timeout_protection('qatesting') { }
Canvas.timeout_protection('qatesting') { }
Canvas.timeout_protection('qatesting') { }
Canvas.timeout_protection('qatesting') { }
Canvas.redis.ttl("service:timeouts:qatesting:percent_counter:protection_activated")
- Note that after each 'sleep' above that an error report of type
'service_timeout' was generated
- Note that after 10 samples, we went into timeout protection by
the log message of "Skipping service call due to error count: qatesting 0.2"
- Note that the Canvas.redis call returns a number between 0 and 60
Change-Id: Id14f2c86c11ded7bb8c18ecfcf51eed2faf4df33
Reviewed-on: https://gerrit.instructure.com/97247
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>