test plan
- check status of feature flag
- it should log a stat containing tags for feature and if it is enabled
fixes VICE-1578
flag = all_the_flags
Change-Id: I42262914255f04649745ca13420ceeb5ca5d26e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266840
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
closes FOO-2029
flag=none
Intended to make it easy to track down
who changed a feature flag at any
level with minimal write load (skips
writing logs for user-context flags).
TEST PLAN:
1) change state of a flag
2) check the auditors ff table, record should have been added
with before and after state.
Change-Id: I23c1c9e0608e292d5e10f057adb33ed3b57b52d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266129
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
these were introduced as part of a major refactor that never
materialized. they have never been used.
closes LS-2098
Change-Id: I9c6711a9c2175f2e094d055f5d12fc21989c6d68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262001
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Allow feature flags to be "allowed on". Updates user facing langauge
to be enabled/disabled + "(always)" or "(default)", which is clearer
than allowed, especially with 4 states. Also moves from backbone UI
to react UI rather than retrofitting the changes to the old UI. The
backbone ui can be killed in a separate PS. The new UI is easier to
ctrl-f on and presents the flags in alphabetical order according to
the user's current locale.
This includes a somewhat gross workaround for a bug in InstUI <Menu>
which is why it goes in an explicit <Popover>
fixes FOO-835
test plan:
- Ensure 'New Feature Flags' feature is off
- Make sure feature flags work in all the expected ways at the siteadmin, account, and course level
- Turn on 'New Feature Flags'
- Make sure that you can still use the feature flag ui in natural ways at each level
- Try turning a feature flag "on" but unlocking it/leaving it unlocked
- Ensure it is inherited on but overridable
Change-Id: I520824cdf6e18b5a7da5ab5f552a7fd3140fd4bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249917
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Change-Id: I70825be7ec7e24458afe0c63dc48c5a76158f520
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* feature flag toggling should work on site admin
closes #LS-1225
Change-Id: I6f383e2b8fa6336d8ddb2665e3a3aba08bf801f7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243755
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
instead of saying a feature "is not valid in context",
say "does not exist" or "does not apply to context"
test plan: you should get distinct validation errors
when trying to set a flag for a nonexistent feature
vs. trying to set a flag in an non-applicable context
(i.e., setting an account feature flag in a course)
flag = none
Change-Id: Idf88c4050d0e8bce760f36c7262b0986e97739fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238466
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* toggling site admin and root account features such
as Direct Share should still work as expected
closes #LA-983
Change-Id: I26912068c78a7d10449a2245c902ac31f105be94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236682
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: I662e9ef520efb24d9923e580eeef1fd977fb8227
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231493
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
test plan:
* in a production-like environment, feature flag changes should
not appear to be undone when refreshing the page (while the
cache is still in the process of invalidating)
closes #ADMIN-2939
Change-Id: I495820850f8facaa6965188140d979bd5227994d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/211436
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
test plan:
- change a course/user feature flag
- the change should stick and apply
Change-Id: I2b4045bf6a0c5c57c58591c98ddcd513e8243fa0
Reviewed-on: https://gerrit.instructure.com/126202
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 CNVS-27109
Test plan:
Regression test everything related to multiple grading periods.
In particular, make sure:
* there is no mention of the multiple grading periods feature flag on
the account or course features pages
* make sure grading periods UI always shows up on the account grading
standards page
* make sure the grading periods UI only shows on the course grading
standards page if legacy course grading periods exist for that course
(see below)
* grading period dropdowns only show up everywhere else if there are
grading periods to show. Otherwise, it should behave as if MGP is
"disabled"
* Grade calculation should work as expected with and without grading
periods
To create legacy course grading periods, you have to use rails console:
1. Find your course:
course = Course.find(<id>)
2. Create a grading period group:
group = course.grading_period_groups.create!(title: "2017")
2. Create a grading period:
group.grading_periods.create!(
weight: 1,
title: 'Fall',
start_date: 5.days.ago,
end_date: 10.days.from_now
)
Here's the list of known places grading periods can be seen in the UI:
Instructor Assignments page
(https://community.canvaslms.com/docs/DOC-2615)
Student Assignments page
(https://community.canvaslms.com/docs/DOC-3123)
Gradebook (https://community.canvaslms.com/docs/DOC-2785)
Gradebook Individual View
(https://community.canvaslms.com/docs/DOC-2788)
Course Settings grading schemes page
(https://community.canvaslms.com/docs/DOC-4042)
Student Grades page (https://community.canvaslms.com/docs/DOC-1291)
Dashboard global Grades page
(https://community.canvaslms.com/docs/DOC-5464)
Change-Id: Iefac4b08120bd1699d4ed98bcb418089eec9b3b8
Reviewed-on: https://gerrit.instructure.com/99744
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
refs #CNVS-32574
Change-Id: I3ba018a7110a7530c9af4a59c97422f626a749b6
Reviewed-on: https://gerrit.instructure.com/99260
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>
don't load manageable role data for each course
it's too expensive - just load up for the account level
test plan:
* enable the new course and user search feature
* the "plus" button on courses on the search page should
bring up the dialog to add people to the course
* the roles should still appear in the drop-down
closes #CNVS-30513
Change-Id: Ib9eb08afe253ca0890d4c60c23cd52e68a19d944
Reviewed-on: https://gerrit.instructure.com/85779
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
As a site admin user,
1. Set "Post grades to SIS" to Allowed in a root account
2. Turn it on in a course
3. Turn it back off in the root account
4. Return to the course and reload the feature settings page
5. The page should load without error
NOTE: the fact that "Post grades to SIS" is still enabled in
the course is the subject of CNVS-29319 and will be addressed
separately. tl;dr hidden features are weird
fixes CNVS-29365
Change-Id: Ia9958bb6d4a56dc45a717503e437816a82e89b0c
Reviewed-on: https://gerrit.instructure.com/79631
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
it's never used
keep it in the API response for back-compat reasons
test plan:
* regression test feature flags; nothing should be broken
Change-Id: I6b023c04148dc6bdb686199d1891e13fcdc8ffa8
Reviewed-on: https://gerrit.instructure.com/70442
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
instead of assuming [self, Account.site_admin]
refs CNVS-26291, CNVS-26292
Change-Id: I8c20a3e29f5af91d04e380794f21705706fd96a8
Reviewed-on: https://gerrit.instructure.com/69841
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs #CNVS-26056
Change-Id: Idee28041d97a6e8a7566ef922f3001906c617864
Reviewed-on: https://gerrit.instructure.com/69500
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
explicitly have one copy per node in a ring (instead of relying
on hashing of a different to hopefully evenly spread copies around
the ring).
test plan:
* configure a ring of redis servers for cache
* canvas should still work
Change-Id: I17e086aac28c1c095c9717a7625ca51c86d0598f
Reviewed-on: https://gerrit.instructure.com/48069
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
previously, this worked only in site admin context. this commit
makes it work in any context.
test plan:
1. as site admin user A, go to the Features tab of the
account settings for the Site Admin account and find a
feature with the 'hidden' tag, such as "Google Docs
Domain Restriction". toggle it on and off.
2. as a root account admin B with no site admin privileges,
confirm the feature is not visible on the Features tab
of the root account
3. as site admin user A, visit the root account's Features
tab and confirm the hidden feature is visible (with the
"hidden" tag). turn it on.
4. confirm that B sees the feature on the root account's
Features tab
5. as A, turn the feature back off in B's account settings
(not site admin settings)
6. confirm that, after a page reload, B can no longer see
the feature on the root account's Features tab
fixes CNVS-16251
Change-Id: I2e1bebe1e710471f2a0efeb8e744cabddee89df8
Reviewed-on: https://gerrit.instructure.com/45751
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
test plan:
- install the test_features plugin (since no real features exist yet)
- render and consult the feature flags documentation
- have a test environment with a root account,
sub-account, course in sub-account, and user
- Use the "list features" endpoint as a root account admin
(with no site admin privileges), on the root account context, and
confirm that hidden features do not show up
- Use the "list features" endpoint as a site admin user,
on the root account context, and confirm that hidden features
show up
- Use the "list features" endpoint on the site admin account
and confirm the hidden features show up
- Use the "set feature flag" endpoint on a hidden feature on site
admin and ensure the feature becomes visible in all root accounts
- Use the "set feature flag endpoint" on a hidden feature on a
single root account, and ensure the feature becomes visible to
that root account and not others
- Confirm that root_opt_in features appear "Off" by default
in root accounts, after being "Allowed" in code or site admin
- Confirm a feature flag that is set to "on" or "off" (vs. "allowed")
cannot be overridden in a lower context (and the API returns
locked=true for them)
- Confirm that setting locking_account_id requires admin rights
in the locking account
- Confirm that a feature flag with locking_account_id cannot be
changed without admin rights in the locking account (e.g.,
set a feature flag on a course, locked with the root account's id,
and make sure a teacher who is not an account admin can't change it)
- Confirm feature flags can be deleted with the "remove feature flag"
endpoint (and they are only deleted where they are defined, not
when called on an object that inherits a flag)
Change-Id: I3e12e23b4454889b6e8b263f1315e82d8f2ada52
Reviewed-on: https://gerrit.instructure.com/25502
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>