Commit Graph

64980 Commits

Author SHA1 Message Date
github-actions[bot]
1eb92a3949 feat: Upgrade Python dependency Xblock (#34547)
feat: re-expose deprecated fragments as passthrough

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: connorhaugh <connorhaugh@users.noreply.github.com>
Co-authored-by: connorhaugh <49422820+connorhaugh@users.noreply.github.com>
2024-04-19 14:13:14 -04:00
Feanil Patel
6ea123db4d Merge pull request #34528 from openedx/feanil/remove_django_splash
feat!: Remove the django-splash app.
2024-04-19 10:53:46 -04:00
Hamza Waleed
9824938075 Merge pull request #34546 from openedx/hamzawaleed01/upgrade-edx-enterprise-68b3753
feat: Upgrade Python dependency edx-enterprise
2024-04-19 19:26:23 +05:00
Feanil Patel
a08b7de26d Merge pull request #34506 from openedx/feanil/fix_tests_for_python_3.11
Make Tests Python 3.11 Compatible
2024-04-19 10:07:16 -04:00
hamzawaleed01
aabfb98a5e feat: Upgrade Python dependency edx-enterprise
fix: SSO self-serve tool invalid entityId parsing

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-19 05:38:27 +00:00
Feanil Patel
68b3753948 Merge pull request #34543 from openedx/feanil/upgrade-edx-milestones-16b82db
feat: Upgrade Python dependency edx-milestones
2024-04-18 15:44:08 -04:00
Kyle D. McCormick
f04532de12 feat: link py38.txt->release/quince.txt for backwards compatibility 2024-04-18 15:35:45 -04:00
Kyle D. McCormick
8eb9ee7b5c feat: freeze edx-sandbox requirements for quince
We ran:

    cp requirements/edx-sandbox/base.txt \
       requirements/edx-sandbox/releases/quince.txt
2024-04-18 15:35:45 -04:00
Kyle D. McCormick
7e96b32f6a feat!: expose per-release edx-sandbox dependency pins
See requirements/edx-sandbox/README.rst for more info

BREAKING CHANGE: edx-sandbox/py38.txt will not longer
be updated. Please install from either edx-sandbox/base.txt or
edx-sandbox/releases/*.txt instead.
2024-04-18 15:35:45 -04:00
Kyle D. McCormick
a17e2c06fa refactor: remove requirements/edx-sandbox/shared.[in,txt]
These files were used to assist the Python 3.5 -> 3.8 upgrade,
but they are no longer needed nor referened anywhere. They haven't
been updated for years.
2024-04-18 15:35:45 -04:00
Kyle D. McCormick
de50f97d90 build: replace wget->curl, so make upgrade works in tutor
tutor's containers don't have wget installed, and curl -L works
just as well and is installed into basically everything
2024-04-18 15:35:45 -04:00
Katrina Nguyen
25c78324d1 Merge pull request #34544 from openedx/knguyen2/version-bump
chore: version bump
2024-04-18 11:56:50 -07:00
katrinan029
e3d83eaccb chore: version bump 2024-04-18 18:28:23 +00:00
Feanil Patel
a106b02658 Merge pull request #34542 from openedx/feanil/upgrade-edx-drf-extensions-16b82db
feat: Upgrade Python dependency edx-drf-extensions
2024-04-18 13:56:09 -04:00
Feanil Patel
bb6cff3a25 Merge pull request #34541 from openedx/feanil/upgrade-edx-django-sites-extensions-f18629e
feat: Upgrade Python dependency edx-django-sites-extensions
2024-04-18 13:29:17 -04:00
Feanil Patel
6fb59639af fix: Remove deprecated getargspec call.
This function was removed by python 3.11 so update to the alternate
call that is the current recommended replacement.

https://docs.python.org/3.11/library/inspect.html#inspect.getfullargspec
2024-04-18 13:28:31 -04:00
Feanil Patel
6ea63da969 fix: Don't use the deprecated location for Hashable
The Hashable object was moved in python 3.3 and support for the old
location is dropped in python 3.10 the new location is available in
python 3.8 so we can just update this and it should work with both
python 3.8 and 3.11

https://docs.python.org/3.8/library/collections.html
2024-04-18 13:28:30 -04:00
Feanil Patel
884fe8ace9 fix: Fix function mocking.
The way the patch decorator was being used is not supported in python
3.11.  Use the patch decorator to auto generate the correct mock and
make the test a bit more readabale.  The new change is both 3.8 and
3.11 compatible.
2024-04-18 13:28:30 -04:00
Feanil Patel
08b3f0bf32 fix: Create a bad unicode file differently.
In Python 3.11 CSV files are allowed to have null characters so the test
data is no longer a valid. We update it to not have a valid unicode
character to still test this code path correctly.

I'm not concerned about the fact that the files with null will get past
this test beacause there are other checks on the content of the file
that catch if it doesn't have enough or the right fields so this should
be a safe change to make to the tests.

Relevant Change in Python: https://github.com/python/cpython/issues/71767
2024-04-18 13:28:30 -04:00
Feanil Patel
87b9c759f0 fix: Provide a sequence to random.sample
The sample function used to automatically convert sets to sequences but
that is no longer supported starting in 3.11 so we have to do it
manually.

Reference: https://docs.python.org/3/library/random.html#random.sample
2024-04-18 13:28:30 -04:00
Feanil Patel
b20ac9c515 fix: Be able to clear the process_cache manually in Python 3.11
Given code like the following

```
class Foo:
    @process_cached
    def bar(self):
        pass
```

In Python 3.8 referencing `bar` would not call its `__get__` method.

```
x = Foo().bar
```

However in Python 3.11, making the same call would call the `__get__`
method, permanently replacing the underlying `process_cached` object
with the partial function that references it.

This meant that code to clear the cache would work in Python 3.8 but
would break in 3.11

```
Foo().bar.cache.clear()  # Works in 3.8 but not in 3.11
```

In 3.11 this results in the following error:
```
E       AttributeError: 'functools.partial' object has no attribute 'cache'
```

To make this compatible in both version, we just add the cache as an
accessible attribute on the partial we generate for our wrapped
function.
2024-04-18 13:28:30 -04:00
feanil
ad00e35266 feat: Upgrade Python dependency edx-drf-extensions
Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-18 13:21:17 -04:00
feanil
a24aa83f19 feat: Upgrade Python dependency edx-milestones
Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-18 17:10:39 +00:00
connorhaugh
f866545bb9 temp: trace celery tasks in dd (#34537) 2024-04-18 13:08:25 -04:00
Feanil Patel
16b82dbb31 Merge pull request #34533 from openedx/feanil/upgrade-edx-bulk-grades-890aa15
feat: Upgrade Python dependency edx-bulk-grades
2024-04-18 12:53:58 -04:00
Rômulo Penido
90b253a38a feat: update Studio search index when course content is updated (#34391) 2024-04-18 09:53:21 -07:00
Feanil Patel
9bd4474f7d test: Reduce query counts now that we dropped django-splash. 2024-04-18 12:43:33 -04:00
Feanil Patel
83ace4d925 chore: Run make compile-requirements to drop django-splash. 2024-04-18 12:43:26 -04:00
Feanil Patel
cec7969ce8 feat!: Remove the django-splash app.
DEPR: https://github.com/openedx/public-engineering/issues/224

The django-splash repo was created 11 years ago to let the LMS redirect
users to a splash screen when a user comes to the site for the first
time. It works by looking for a configurable cookie value and
redirecting from the middleware.

This feature was never documented, has some edx.org hardcoded defaults,
and is not compatible with MFEs.

BREAKING CHANGE: The django splash feature will no longer be available.
2024-04-18 12:43:26 -04:00
feanil
1ae052aad3 feat: Upgrade Python dependency edx-django-sites-extensions
Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-18 15:35:07 +00:00
Jeremy Ristau
f18629e132 chore: update 2U teams in CODEOWNERS (#34352) 2024-04-17 16:42:05 -04:00
Jillian
d67211051b feat: restrict Studio search results based on user permissions (#34471)
* feat: adds SearchAccess model

Stores a numeric ID for each course + library, which will generally be
shorter than the full context_key, so we can pack more of them into the
the Meilisearch search filter.

Also:

* Adds data migration pre-populates the SearchAccess model from the existing
  CourseOverview and ContentLibrary records
* Adds signal handlers to add/remove SearchAccess entries when content
  is created or deleted.
* Adds get_access_ids_for_request() helper method for use in views.
* Adds tests.

* test: can't import content.search in lms tests

* feat: use SearchAccess in documents and views

* Adds an access_id field to the document, which stores the
  SearchAccess.id for the block's context.
* Use the requesting user's allowed access_ids to filter search results
  to documents with those access_ids.
* Since some users have a lot of individual access granted, limit the
  number of access_ids in the filter to a large number (1_000)
* Updates tests to demonstrate.

* test: can't import content.search or content_staging in lms tests

* fix: make access_id field filterable

* fix: use SearchAccess.get_or_create in signal handlers

In theory, we shouldn't have to do this, because the CREATE and DELETE
events should keep the SearchAccess table up-to-date.

But in practice, signals can be missed (or in tests, they may be
disabled). So we assume that it's ok to re-use a SearchAccess.id created
for a given course or library context_key.

* refactor: refactors the view tests to make them clearer

Uses helper methods and decorators to wrap the settings and patches used
by multiple view tests.

* feat: adds org filters to meilisearch filter

* Uses content_tagging.rules.get_user_orgs to fetch the user's
  content-related orgs for use in the meilisearch filter.
* Limits the number of orgs used to 1_000 to keep token size down

* refactor: removes data migration

Users should use the reindex_studio management command to populate SearchAccess.

* refactor: adds functions to common.djangoapps.student.role_helpers

to allow general access to the user's RoleCache without having to access
private attributes of User or RoleCache.

Related changes:

* Moves some functionality from openedx.core.djangoapps.enrollments.data.get_user_roles
  to this new helper method.
* Use these new helper method in content_tagging.rules

* fix: get_access_ids_for_request only returns individual access

instead of all course keys that the user can read.

Org- and GlobalStaff access checks will handle the rest.

* fix: use org-level permissions when generating search filter

Also refactors tests to demonstrate this change for OrgStaff and
OrgInstructor users.

* refactor: remove SearchAccess creation signal handlers

Lets SearchAccess entries be created on demand during search indexing.

* feat: omit access_ids from the search filter that are covered by the user's org roles

---------

Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
2024-04-17 11:21:34 -07:00
feanil
8c4f6692da feat: Upgrade Python dependency edx-bulk-grades
Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-17 12:53:32 -04:00
Feanil Patel
96f634937a Merge pull request #34532 from openedx/feanil/upgrade-edx-ace-890aa15
feat: Upgrade Python dependency edx-ace
2024-04-17 12:49:51 -04:00
Feanil Patel
ab0ae506bb Merge pull request #34531 from openedx/feanil/upgrade-openedx-django-wiki-890aa15
feat: Upgrade Python dependency openedx-django-wiki
2024-04-17 12:48:38 -04:00
feanil
9bb3b10930 feat: Upgrade Python dependency edx-ace
Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-17 15:23:27 +00:00
feanil
cf484b8e52 feat: Upgrade Python dependency openedx-django-wiki
Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-17 15:04:33 +00:00
Feanil Patel
890aa15fdf Merge pull request #33905 from openedx/dependabot/github_actions/aws-actions/amazon-ecr-login-2
build(deps): bump aws-actions/amazon-ecr-login from 1 to 2
2024-04-17 10:43:15 -04:00
github-actions[bot]
262b8a7f2b chore: upgrade XBlock version to 3.0.0 2024-04-17 09:43:12 -04:00
Kyle D. McCormick
3447cbcb90 chore: tweak tests to work with XBlock==3.0.0 2024-04-17 09:43:12 -04:00
Kyle D. McCormick
3c5e1f5769 chore: remove reference to deprecated HierarchyMixin
This has been a no-op for a long time anyway, since HierarchyMixin
has been explicitly mixed into XBlock for as long as I remember.

Ref: https://github.com/openedx/XBlock/issues/714
2024-04-17 09:43:12 -04:00
Kyle D. McCormick
38d350f48c docs: document XBLOCK_MIXINS and XBLOCK_EXTRA_MIXINS 2024-04-17 09:43:12 -04:00
Feanil Patel
28a105b1d2 Merge pull request #34522 from openedx/feanil/upgrade-edx-ccx-keys-8d8ff29
feat: Upgrade Python dependency edx-ccx-keys
2024-04-17 08:37:07 -04:00
Saad Yousaf
6dd5157fee fix: fix cadence value for instant cadence and update version 2024-04-17 14:16:50 +05:00
MueezKhan246
a057ed44c1 Merge pull request #34525 from openedx/MueezKhan246/upgrade-edx-enterprise-9d29595
feat: Upgrade Python dependency edx-enterprise
2024-04-17 07:54:29 +05:00
MueezKhan246
983afc7c92 feat: Upgrade Python dependency edx-enterprise
replaced non encrypted fields of degreed config model with encrypted ones

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-17 02:22:39 +00:00
Feanil Patel
9d29595602 Merge pull request #34520 from openedx/feanil/upgrade-edx-completion-8d8ff29
feat: Upgrade Python dependency edx-completion
2024-04-16 14:47:04 -04:00
feanil
09ffb94845 feat: Upgrade Python dependency edx-ccx-keys
Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-16 18:35:33 +00:00
feanil
06182d978e feat: Upgrade Python dependency edx-completion
Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-04-16 16:15:18 +00:00
Jansen Kantor
8d8ff29d4c fix: don't urljoin empty string (#34516) 2024-04-16 11:30:15 -04:00