Commit Graph

5003 Commits

Author SHA1 Message Date
Alex Dusenbery
3292104470 enterprise_customer_uuid_for_request() should not return a __CACHE_MISS__. 2020-09-29 12:03:33 -04:00
Nimisha Asthagiri
bc1d1bc2c5 Merge pull request #23731 from open-craft/alanoe/move_celery_check_to_high_priority_queue_upstream
Move Celery check task to the high priority queue
2020-09-29 06:37:06 -04:00
uzairr
b1d321374f Refactor third party auth msg generation 2020-09-29 06:52:02 +05:00
Michael Terry
6f69fd7dc2 Merge pull request #25105 from edx/mikix/public-outline
AA-253: don't send outline if not enrolled
2020-09-28 11:46:22 -04:00
Tim McCormack
ec65018306 Rename more "custom metric" references to "custom attribute" (#25018)
* Rename CookieMetricsMiddleware to CookingMonitoringMiddleware

This fixes a misuse of New Relic terminology. Here we are in fact using
custom attributes; custom metrics are a different thing that we may start
using in the future.

* Rename metric -> attribute in courseware New Relic code

* Fix my weird typo

* Replace `s/metric/attribute/g` in waffle_utils and in caller

This changes:

- `WAFFLE_FLAG_CUSTOM_METRICS`
- `WaffleFlagNamespace._set_waffle_flag_metric`
- `_get_waffle_flag_custom_metrics_set` and some other unreferenced
  internals

* Avoid direct use of newrelic (while we're in there)

* Fix existing typo in line I touched

* A few other "metric" names in files touched in previous renaming PRs

* Make dependency constraint note terse, and add description
2020-09-28 11:35:44 -04:00
Fox Piacenti
2c15bbba2d Add type field/constraint to to libraries v2. (#24861) 2020-09-28 10:58:27 -04:00
Michael Terry
100018081d AA-253: don't send outline if not enrolled
This is for the learning MFE outline endpoint.

Also clean up some related permissions issues.
2020-09-28 10:45:07 -04:00
Tim McCormack
5b331b2d4d Merge branch 'master' into timmc/misc-metric-attribute
# Conflicts:
#	cms/envs/common.py
#	lms/envs/common.py
2020-09-28 13:56:08 +00:00
Tim McCormack
f29e418264 Revert "Revert "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)" (#25025)" (#25055)
This reverts commit 986a448d9e.
2020-09-28 13:53:57 +00:00
Tim McCormack
705ad07524 A few other "metric" names in files touched in previous renaming PRs 2020-09-25 19:11:30 +00:00
Robert Raposa
1cc4ae2080 ARCHBOM-1339: add ADRs for extracting waffle_utils (#24798)
- Add ADR for the extraction of waffle_utils to
edx-toggles to reuse across IDAs.
- Add ADR for temporarily leaving CourseWaffleFlag
in edx-platform in order to simplify extraction.
- Add ADR for simplifying the interface for
WaffleFlag and WaffleSwitch by removing the
Namespace classes.

ARCHBOM-1339

Co-authored-by: Feanil Patel <feanil@edx.org>
2020-09-25 15:02:46 -04:00
Kyle McCormick
ef845ebc43 Fully qualify remaining edxnotes imports 2020-09-25 14:13:30 -04:00
Robert Raposa
9c6ee54258 remove flaky test_login_ratelimited 2020-09-25 11:24:47 -04:00
Fox Piacenti
7bc10e0464 Adjustments to library user access API endpoints required by frontend needs. (#24919) 2020-09-25 09:33:32 -04:00
Alan Evangelista
b9559fc934 Move Celery check task to the high priority queue
Currently, LMS uses 3 Celery workers: lms_default_1, lms_high_1 and
lms_high_mem_1. Each Celery worker sends messages to a single queue:
edx.core.default, edx.core.high and edx.core.high_mem, respectively.
The number of child processes per Celery worker is set to 1. Due to
this configuration, any task in a queue blocks all other tasks.

Currently, the Celery check task submitted by the /heartbeat?extended
LMS HTTP API endpoint runs in the default queue. When some slow task
(eg course grades creation) is sent to the default queue, it will
block the Celery check task, which will expire and the heartbeat endpoint
will fail. This patch moves the task to another queue which has
only shorter tasks and in which this problem will not occur.

Use a Django setting for the Celery check task routing key so that
it can be overriden by individual OpenEDX instances via JSON
env files.
2020-09-24 01:27:08 -07:00
Calen Pennington
dc884c2166 Fix a test that relied on incorrect mocking.
We fully hide authorization denied blocks from the mobile app (until the
latest version of the mobile app rolls out).
2020-09-23 10:05:37 -04:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
Tim McCormack
89032577ae Fix existing typo in line I touched 2020-09-23 13:18:20 +00:00
Tim McCormack
92135ad567 Avoid direct use of newrelic (while we're in there) 2020-09-22 23:25:50 +00:00
Tim McCormack
c71c9d4984 Replace s/metric/attribute/g in waffle_utils and in caller
This changes:

- `WAFFLE_FLAG_CUSTOM_METRICS`
- `WaffleFlagNamespace._set_waffle_flag_metric`
- `_get_waffle_flag_custom_metrics_set` and some other unreferenced
  internals
2020-09-22 23:19:23 +00:00
Tim McCormack
0f33afc20a Fix my weird typo 2020-09-22 22:59:28 +00:00
Alex Dusenbery
de277ce46b Prevent an unbound local variable exception in enterprise_support.api. Add more unit tests for same. 2020-09-22 11:15:17 -04:00
Hammad Ahmad Waqas
3b23a9b227 Merge pull request #25003 from edx/hammad/ENT-3337
catch signal UNENROLL_DONE signal and call /api/v2/enterprise/coupons…
2020-09-22 19:51:35 +05:00
Soban Javed
b7ca6d5619 Upgrade celery to 4.4.7
Replace django-celery with django-celery-results
Upgrade redis to latest
2020-09-22 16:20:45 +05:00
Alex Dusenbery
4ad2df083d Ensure that get_enterprise_learner_portal_enabled_message() returns None when there is no associated enterprise customer for the given request. Add unit tests for this function. 2020-09-21 12:47:00 -04:00
Feanil Patel
ddcf31c5ad Merge pull request #25009 from edx/feanil/fix_flaky_test
Fix a flaky test by freezing time in the right spot.
2020-09-21 12:15:28 -04:00
Omar Al-Ithawi
fc0eb71918 Add USER_ACCOUNT_ACTIVATED signal (#23296)
Plugins can listen to USER_ACCOUNT_ACTIVATED signal to perform custom logic.
2020-09-21 09:57:32 -04:00
Ahtisham Shahid
986a448d9e Revert "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)" (#25025)
This reverts commit ba9ee4e151.

Fixed Style lint issue
2020-09-21 13:48:00 +05:00
Troy Sankey
b111d05149 Merge pull request #25011 from edx/pwnage101/email-optin-treats-course-list-as-override
email opt-in mgmt command: Disable the course lookup if a list is provided
2020-09-18 13:28:28 -04:00
Sid Verma
72b4afe465 Add ADR for content library indexes 2020-09-18 10:25:59 -04:00
Sid Verma
67f3c0343f Simplify and optimize index searching 2020-09-18 10:25:59 -04:00
Sid Verma
f2ed54d72c Add filtering support for list_library_blocks API 2020-09-18 10:25:59 -04:00
Sid Verma
3233fa92d4 Index xblocks in elasticsearch 2020-09-18 10:25:59 -04:00
Sid Verma
735bc412d4 Add elasticsearch tests 2020-09-18 10:25:59 -04:00
Sid Verma
78045115ab Add filtering and search support to library APIs 2020-09-18 10:25:59 -04:00
Tim McCormack
328e790e8a Rename CookieMetricsMiddleware to CookingMonitoringMiddleware
This fixes a misuse of New Relic terminology. Here we are in fact using
custom attributes; custom metrics are a different thing that we may start
using in the future.
2020-09-18 14:25:50 +00:00
Alex Dusenbery
4bb1914ec6 ENT-3367 | Show at most 1 Enterprise Learner Portal dashboard link in the header user-menu. Also, guard against no branding config when getting learner portal data. 2020-09-18 10:23:32 -04:00
Tim McCormack
ba9ee4e151 ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)
This uses the new names introduced in edx-django-utils
3.8.0 (edx/edx-django-utils#59), which we're already using, as
well as updating a few other locations where we incorrectly refer
to New Relic custom metrics instead of custom attributes.

Includes a couple of unrelated lint fixes in a file I modified.
2020-09-18 13:33:50 +00:00
Troy Sankey
212d17bbf3 email opt-in mgmt command: Disable the course lookup if a list is provided
This is cherry-picked verbatim from
zafft/analytics-exporter-settings-hotfix (#18530).  I'm fear that
without merging these changes upstream, a larger set of courses will be
consdiered for processing, and that would alter the behavior of the
analytics-email-optin-* jobs.
2020-09-17 17:34:24 -04:00
Feanil Patel
90bc2ffdab Merge pull request #24815 from regisb/regisb/document-feature-toggles
[BD-21] Document feature toggles
2020-09-17 13:46:46 -04:00
Feanil Patel
5e56621aeb Fix a flaky test by freezing time in the right spot.
The test was only freezing time for the first two calls to password reset
which meant that sometimes the last call to reset password was far enough
in the future to not be affected by the rate limiting.

We move the freeze_time context manager to outside of all the password
reset calls to make things more reliable.
2020-09-17 13:43:30 -04:00
Michael Terry
8e1ea3e536 Merge pull request #24987 from edx/mikix/subsection-ora-cutoff
AA-335: Avoid due dates for ORA subsections
2020-09-17 10:57:56 -04:00
Michael Terry
0c9efb793c AA-335: Avoid due dates for ORA subsections
Previously, we'd been avoiding PLS due dates for ORA *sections*.
That is, if a section had only ORA content, we'd not set a PLS
due date for anything in that section.

If any content in that section had non-ORA graded content however,
we would set dates on all subsections, including the ORA one.

This resulted in some ORA-only subsections showing up twice on the
dates tab. So this patch simply brings down the ORA-only check
to a *subsection* level, not a section one.
2020-09-17 10:10:06 -04:00
HammadAhmadWaqas
30edb7ef50 catch signal UNENROLL_DONE signal and call /api/v2/enterprise/coupons/create_refunded_voucher/ API. 2020-09-17 15:39:13 +05:00
Régis Behmo
a4ba4ae45e Clarify many feature toggle annotations across all applications 2020-09-16 15:20:43 +02:00
Régis Behmo
fee9279e6c Fix unused imports in video pipeline 2020-09-16 15:19:16 +02:00
Régis Behmo
e4fc7e86b5 Fix indentation of waffle flag annotation 2020-09-16 15:19:16 +02:00
Régis Behmo
7d93715880 Rename toggle_expiration_date to toggle_target_removal_date
This is part of the changes brought by code-annotations==0.7.0
2020-09-16 15:19:16 +02:00
Régis Behmo
98a13d6a7e Remove deprecated toggle_status annotation
This annotation is deprecated since code-annotations==0.7.0
2020-09-16 15:19:15 +02:00
Régis Behmo
d1f9e769d0 Simplify the toggle_use_case annotation
Since code-annotations==0.7.0, incremental_release, launch_date,
monitored_rollout, graceful_degradation, beta_testing are all considered
as "temporary" use cases.
2020-09-16 15:16:13 +02:00