Commit Graph

3568 Commits

Author SHA1 Message Date
David Ormsbee
22af9ff545 Merge pull request #23241 from open-craft/blockstore-runtime-bug-fix
Fix Blockstore XBlock Runtime's handling of occasional S3 errors
2020-03-12 09:17:09 -04:00
Awais Jibran
ebd6494af2 Merge pull request #23380 from edx/logs-cleanup
Remove unnecessary logs.
2020-03-12 16:38:54 +05:00
Awais Jibran
6a25ca800b ~200k instances in last 7 days. 2020-03-12 14:22:52 +05:00
Zainab Amir
ed25521f61 Enable testing pipeline for video uploads to s3 (#23375)
Add integration settings to enable upload of videos from from studio.
Settings enable user to connect to s3 bucket using mfa and assume role
functionality.

PROD-1214
2020-03-12 12:19:52 +05:00
Braden MacDonald
8b9594e7dd Improve caching of blockstore data
This includes an optimization to the get_bundle_version_files_cached method, which is used very often when loading blockstore data; it was previously being cached only in a process-local cache (lru_cache). My hunch is that in production, with many appservers and LMS workers and frequent deployments and a large number of bundles, the process-local cache is not being hit very often.

I also increased the MAX_BLOCKSTORE_CACHE_DELAY from 60s to 300s; this reduces the frequency with which we check if either (A) an external system modified the blockstore bundle and/or (B) we have a cache invalidation bug somewhere. I am increasing it because that check is more expensive than I thought (calling blockstore API to ascertain latest version of a particular bundle), and I haven't seen any cache invalidation errors that this would help to work around. (Plus, increasing this will make such bugs more obvious.)
2020-03-11 11:15:59 -07:00
Braden MacDonald
4ddb02eff8 Fix: transient S3 errors were not being reported properly
Also improve usefulness of some blockstore runtime logs for debugging

Context:

Sometimes when trying to load an XBlock's XML file from Amazon S3, AWS will return a 4xx or 5xx response along with error XML like:

    <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>foo/bar</Key>...</Error>

A bug in the get_bundle_file_data_with_cache method would cause this XML to be returned to the runtime anyways, as if it were the expected OLX. This would then (obviously) lead to strange parsing bugs, e.g. when trying to interpret <Code> as an <xblock-include>.

This fixes the bug and improves the logging, both to make this sort of issue easier to debug in the future and to return whatever detailed error code S3 provides (or Blockstore, if S3 is not being used).
2020-03-11 11:15:59 -07:00
Michael Terry
f56a01adbe Reset schedule when mode changes
This way if an audit user upgrades a self paced course to verified,
their schedule will reset to the current time.

AA-60
2020-03-11 11:53:49 -04:00
usamasadiq
84744fdf88 BOM-1277 Removed constraint on requests-oauthlib and updated oauthlib 2020-03-11 11:15:24 +05:00
Cory Lee
3816e1c474 DENG-17 Setting the start column on schedules to be nullable so that it (#23208)
Setting the start column on schedules to be nullable so that it can be dropped.
2020-03-10 10:26:32 -04:00
David Joy
fa7cae74e0 Merge pull request #23355 from edx/djoy/course_metadata_staff_access_field
Adding user_has_staff_access to course metadata response.
2020-03-09 16:13:39 -04:00
David Joy
13096ca586 Adding user_has_staff_access to course metadata response.
We use this value in the client to understand whether or not we should be showing staff-only parts of the UI to the user.

Related to: https://openedx.atlassian.net/browse/TNL-7109
2020-03-09 15:16:26 -04:00
Dave St.Germain
5a4d03b7b2 Add another attribute to CourseOverview to support the Teams tab 2020-03-09 15:12:44 -04:00
Cory Lee
e1c896f2fa DENG-17 Removing schedules history FK to auth_user so it can be ghost migrated alongside schedules since they are tied to the same model. (#23349) 2020-03-09 14:30:13 -04:00
Dave St.Germain
49c5d5194b Addressed review feedback 2020-03-09 11:28:48 -04:00
Dave St.Germain
b166788a8d Fixes TNL-7113 and TNL-7112, related to missing attributes in course tabs 2020-03-09 10:47:00 -04:00
Julia Eskew
4444ffbf1a Add migration to remove values from SiteConfiguration and unskip migration test. 2020-03-06 12:42:57 -05:00
Troy Sankey
5395a5e9f8 Merge pull request #23306 from edx/pwnage101/deng-18-rename_site_configuration_siteconfiguration_values_2.3
Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""  (attempt #3)
2020-03-05 09:35:48 -05:00
Dave St.Germain
db1b88611c Merge pull request #22258 from open-craft/content-library-permissions
Detailed Permissions for Content Libraries
2020-03-05 09:07:40 -05:00
Nick
0df2debd5b Merge pull request #23283 from edx/ndalfonso/AA-12-reset-deadlines
AA-12 reset self paced due dates
2020-03-04 15:42:46 -05:00
Calen Pennington
95ba1b6e88 Merge pull request #23301 from cpennington/install-schedules-app
Schedules is a core part of the LMS, install it by default, rather th…
2020-03-04 15:26:09 -05:00
Nicholas D'Alfonso
be3b150621 AA-12 reset self paced due dates
- for self paced courses, if a sequential's due date has passed
  and it is incomplete, allow the user to reset the start_date
  for the related schedule to now, thus shifting all due dates
  for all sequentials within the course by the pre determined
  due date offset.
- add historical table to the Schedule model.
2020-03-04 15:13:46 -05:00
Troy Sankey
d428f7530d Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""
This reverts commit e6f58b6d4c.

This is our third (3rd!) attempt to deploy stage 2 of this column rename.
2020-03-04 14:53:47 -05:00
Robert Raposa
d28889db1a delete oauth2.enforce_jwt_scopes waffle switch
The code for this switch was removed in:
https://github.com/edx/edx-platform/pull/23188

BOM-1324
2020-03-04 10:56:52 -05:00
Calen Pennington
d853444229 Schedules is a core part of the LMS, install it by default, rather than through the plugins mechanism 2020-03-04 10:52:17 -05:00
Manjinder Singh
7d2ff9cd3f Removing all settings that have OIDC in name (#23251)
* Removing all settings that have OIDC in name

* Removing ENABLE_DOP_ADAPTER

* changes JWT_ISSUER value in devstack
2020-03-04 09:06:29 -05:00
atesker
bf14bc97d2 EDUCATOR-4920 Control permission to REST endpoint
EDUCATOR-4920 Control permission to REST endpoint
CR1

EDUCATOR-4920 Control permission to REST endpoint
CR1
2020-03-03 16:04:31 -05:00
Calen Pennington
70800ae92b Merge pull request #23244 from edx/aj/update-edx-when
Upgrade edx-when
2020-03-03 12:03:14 -05:00
Troy Sankey
bfd45980c7 Merge pull request #23236 from edx/pwnage101/deng-18-rename_site_configuration_siteconfiguration_values_2.2
Add migration to populate site_values in SiteConfigurationHistory
2020-03-03 11:05:27 -05:00
Manjinder Singh
4399d13955 removing all of provider (#23269)
* Revert "Ran make migration on third_party_auth (#23253)"

This reverts commit 49be65cc58.

* Removing provider.util import

* Removing further provider things

* Adding hash tests
2020-03-03 10:42:18 -05:00
Awais Jibran
c6e0985812 Upgrade edx-when in edx-platform
Run `make upgrade` on edx-platform to update python packages.
PROD-1333
2020-03-03 20:01:09 +05:00
Braden MacDonald
af6cab86c3 Enforce permissions for content libraries, add REST API to edit perms 2020-03-02 18:17:46 -08:00
Dave St.Germain
c1a09ffcbb Merge pull request #23238 from edx/dcs/mode-info
Add verified mode to the courseware API
2020-03-02 18:16:12 -05:00
Cory Lee
4be35d9eca DENG-17 Dropping FK on schedules to enrollments to perform ghost migration (#23260) 2020-03-02 16:32:04 -05:00
Albert (AJ) St. Aubin
0721357e46 Create MB External ID on creation of a CourseEntitlement in MB Program 2020-03-02 13:44:20 -05:00
Troy Sankey
06b547057e Add migration to populate site_values in SiteConfigurationHistory
Right now the ORM is very unhappy about the JSONField `site_values`
in SiteConfigurationHistory containing non-JSON (empty strings).  We
cannot even write a data migration using the ORM to populate the field
because that causes a JSONDeserializationError.  Therefore, we must
bypass the ORM and populate the values with raw SQL.

DENG-18
2020-03-02 11:44:28 -05:00
Cory Lee
2c87aeddc3 DENG-17 Dropping the FK on schedulesexperience->schedule to apply change to schedule as a gh-ost migration (#23242) 2020-03-02 10:10:52 -05:00
Feanil Patel
5ec487452d Merge pull request #23188 from edx/robrap/BOM-1324-add-constraint
BOM-1324: remove oauth2.enforce_jwt_scopes toggle
2020-03-02 09:55:35 -05:00
Manjinder Singh
d08cd9ce04 Removing provider imports from edx-platform (#23229)
* Removing from provider imports from openedx

 * removed all uses of retire_dop_oauth2_models

* Removing provider library from lms, common, and cms

Created/copied function short_token(from django-oauth-provider) and create_hash256 to help with conversion
2020-03-02 08:56:54 -05:00
Bill DeRusha
c1ebdaf0c3 Fix Deprecation: log.warn -> log.warning 2020-02-28 15:04:07 -05:00
Dave St.Germain
84e854d22c Merge pull request #23205 from edx/dcs/fix-tabs
Add url_slug to the CourseOverviewTab, to support serializing StaticTabs
2020-02-28 12:43:36 -05:00
Dave St.Germain
7d94408132 Add verified mode to the courseware API 2020-02-28 12:42:26 -05:00
Feanil Patel
54d7743817 Don't iterate over an empty filters list. 2020-02-27 16:32:43 -05:00
Feanil Patel
781629d489 Correct docs and test of restricted JWTs.
The comment is misleading beacuse now that restricted JWTs are enforced
everywhere, we don't need to set the expiry to be in the past for JWT
tokens.
2020-02-27 15:53:48 -05:00
Calen Pennington
5cce110a91 Merge pull request #23217 from cpennington/edx-when-published-only
Only extract published dates into edx-when
2020-02-27 15:12:51 -05:00
Calen Pennington
5ea77433d3 Only extract published dates into edx-when 2020-02-27 14:10:12 -05:00
Troy Sankey
ac4fd6f91a Merge pull request #23224 from edx/revert-23214-pwnage101/rename_site_configuration_siteconfiguration_values_2.1
Revert "Rename values in SiteConfiguration (2/3) attempt #2"
2020-02-27 13:58:53 -05:00
Calen Pennington
6d2ad6aa2f Merge pull request #23219 from cpennington/fix-emails-no-weeks
Don't try and multiply None with a number when computing number of we…
2020-02-27 13:31:36 -05:00
Troy Sankey
e6f58b6d4c Revert "Rename values in SiteConfiguration (2/3) attempt #2" 2020-02-27 13:24:55 -05:00
Calen Pennington
70314cfa7b Don't try and multiply None with a number when computing number of weekly emails to send 2020-02-27 11:47:28 -05:00
jinder1s
295da79fe5 Remove DOP dispatching from oauth_dispatch.
https://openedx.atlassian.net/browse/BOM-1330
2020-02-27 10:47:06 -05:00