Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FC-0040] feat: update search index when object tags change #647

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8c4f669
feat: Upgrade Python dependency edx-bulk-grades
feanil Apr 17, 2024
f18629e
chore: update 2U teams in CODEOWNERS (#34352)
jristau1984 Apr 17, 2024
1ae052a
feat: Upgrade Python dependency edx-django-sites-extensions
feanil Apr 18, 2024
cec7969
feat!: Remove the django-splash app.
feanil Apr 17, 2024
83ace4d
chore: Run `make compile-requirements` to drop django-splash.
feanil Apr 17, 2024
9bd4474
test: Reduce query counts now that we dropped django-splash.
feanil Apr 17, 2024
90b253a
feat: update Studio search index when course content is updated (#34391)
rpenido Apr 18, 2024
16b82db
Merge pull request #34533 from openedx/feanil/upgrade-edx-bulk-grades…
Apr 18, 2024
f866545
temp: trace celery tasks in dd (#34537)
connorhaugh Apr 18, 2024
a24aa83
feat: Upgrade Python dependency edx-milestones
feanil Apr 18, 2024
ad00e35
feat: Upgrade Python dependency edx-drf-extensions
feanil Apr 18, 2024
b20ac9c
fix: Be able to clear the process_cache manually in Python 3.11
feanil Apr 2, 2024
87b9c75
fix: Provide a sequence to random.sample
feanil Mar 15, 2024
08b3f0b
fix: Create a bad unicode file differently.
feanil Mar 15, 2024
884fe8a
fix: Fix function mocking.
feanil Mar 15, 2024
6ea63da
fix: Don't use the deprecated location for Hashable
feanil Mar 15, 2024
6fb5963
fix: Remove deprecated getargspec call.
feanil Mar 15, 2024
bb6cff3
Merge pull request #34541 from openedx/feanil/upgrade-edx-django-site…
Apr 18, 2024
a106b02
Merge pull request #34542 from openedx/feanil/upgrade-edx-drf-extensi…
Apr 18, 2024
e3d83ea
chore: version bump
katrinan029 Apr 18, 2024
25c7832
Merge pull request #34544 from openedx/knguyen2/version-bump
katrinan029 Apr 18, 2024
de50f97
build: replace wget->curl, so make upgrade works in tutor
kdmccormick Apr 16, 2024
a17e2c0
refactor: remove requirements/edx-sandbox/shared.[in,txt]
kdmccormick Apr 16, 2024
7e96b32
feat!: expose per-release edx-sandbox dependency pins
kdmccormick Apr 16, 2024
8eb9ee7
feat: freeze edx-sandbox requirements for quince
kdmccormick Apr 16, 2024
f04532d
feat: link py38.txt->release/quince.txt for backwards compatibility
kdmccormick Apr 16, 2024
68b3753
Merge pull request #34543 from openedx/feanil/upgrade-edx-milestones-…
Apr 18, 2024
aabfb98
feat: Upgrade Python dependency edx-enterprise
hamzawaleed01 Apr 19, 2024
a08b7de
Merge pull request #34506 from openedx/feanil/fix_tests_for_python_3.11
Apr 19, 2024
9824938
Merge pull request #34546 from openedx/hamzawaleed01/upgrade-edx-ente…
hamzawaleed01 Apr 19, 2024
6ea123d
Merge pull request #34528 from openedx/feanil/remove_django_splash
Apr 19, 2024
1eb92a3
feat: Upgrade Python dependency Xblock (#34547)
github-actions[bot] Apr 19, 2024
fcf0461
feat: Upgrade Python dependency edx-proctoring
feanil Apr 19, 2024
bbbc6aa
feat: Upgrade Python dependency edx-rbac
feanil Apr 19, 2024
a7b4416
Revert "temp: trace celery tasks in dd (#34537)" (#34553)
connorhaugh Apr 19, 2024
2f4c33b
Merge pull request #34551 from openedx/feanil/upgrade-edx-proctoring-…
Apr 19, 2024
0603760
Merge pull request #34552 from openedx/feanil/upgrade-edx-rbac-1eb92a3
Apr 19, 2024
c549228
feat: Update search index when object tags updated
yusuf-musleh Mar 24, 2024
7c0d41b
feat: Update index when library block tags change
yusuf-musleh Mar 28, 2024
921c504
refactor: Remove extra params
yusuf-musleh Mar 28, 2024
28e9f58
docs: Add new event to hook events docs
yusuf-musleh Mar 31, 2024
fe4e174
feat: Add and use upsert_block_tags_index_docs
yusuf-musleh Apr 15, 2024
b4b7c7b
chore: Update openedx-events
yusuf-musleh Apr 15, 2024
ef6b2a7
fix: Update tests + include course block tags in reindex
yusuf-musleh Apr 15, 2024
4fe4e18
feat: Fix static-type issues + adjust tag_object
yusuf-musleh Apr 15, 2024
32d7d09
fix: bug retrieving the Meilisearch API key UID (first time only)
bradenmacdonald Apr 19, 2024
8fc6c45
docs: Update comments
yusuf-musleh Apr 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

# Ensure that the team responsible for upgrades sees any PRs that would
# add GitHub-hosted dependencies to that platform.
requirements/edx/github.in @openedx/arbi-bom
requirements/edx/github.in @openedx/2u-arbi-bom

# Core
common/djangoapps/student/
common/djangoapps/student/models/__init__.py @openedx/teaching-and-learning
common/djangoapps/student/models/course_enrollment.py @openedx/teaching-and-learning
common/djangoapps/student/models/__init__.py @openedx/2u-tnl
common/djangoapps/student/models/course_enrollment.py @openedx/2u-tnl
common/djangoapps/third_party_auth/
lms/djangoapps/course_api/blocks
lms/djangoapps/courseware/
Expand Down Expand Up @@ -47,8 +47,8 @@ openedx/features/discounts/

# Ping Axim On-call if someone uses the QuickStart
# https://docs.openedx.org/en/latest/developers/quickstarts/first_openedx_pr.html
lms/templates/dashboard.html @openedx/axim-oncall
lms/templates/dashboard.html @openedx/axim-oncall

# Ensure minimal.yml stays minimal, this could be a team in the future
# but it's just me for now, others can sign up if they care as well.
lms/envs/minimal.yml @feanil
lms/envs/minimal.yml @feanil
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ shell: ## launch a bash shell in a Docker container with all edx-platform depend
REQ_FILES = \
requirements/edx/coverage \
requirements/edx/paver \
requirements/edx-sandbox/py38 \
requirements/edx-sandbox/base \
requirements/edx/base \
requirements/edx/doc \
requirements/edx/testing \
Expand All @@ -130,7 +130,7 @@ endef
COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
curl -L https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt > "$(@)"
printf "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
Expand Down
3 changes: 3 additions & 0 deletions docs/hooks/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,6 @@ Content Authoring Events
- org.openedx.content_authoring.content_library.deleted.v1
- 2023-07-20

* - `CONTENT_OBJECT_TAGS_CHANGED <https://github.com/openedx/openedx-events/blob/c0eb4ba1a3d7d066d58e5c87920b8ccb0645f769/openedx_events/content_authoring/signals.py#L207>`_
- org.openedx.content_authoring.content.object.tags.changed.v1
- 2024-03-31
2 changes: 1 addition & 1 deletion lms/djangoapps/certificates/apis/v0/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def test_no_certificate(self):
def test_query_counts(self):
# Test student with no certificates
student_no_cert = UserFactory.create(password=self.user_password)
with self.assertNumQueries(21, table_ignorelist=WAFFLE_TABLES):
with self.assertNumQueries(20, table_ignorelist=WAFFLE_TABLES):
resp = self.get_response(
AuthType.jwt,
requesting_user=self.global_staff,
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/course_api/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def test_too_many_courses(self):
self.setup_user(self.audit_user)

# These query counts were found empirically
query_counts = [53, 46, 46, 46, 46, 46, 46, 46, 46, 46, 16]
query_counts = [52, 46, 46, 46, 46, 46, 46, 46, 46, 46, 16]
ordered_course_ids = sorted([str(cid) for cid in (course_ids + [c.id for c in self.courses])])

self.clear_caches()
Expand Down
8 changes: 4 additions & 4 deletions lms/djangoapps/courseware/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def test_index_query_counts(self):
self.client.login(username=self.user.username, password=self.user_password)
CourseEnrollment.enroll(self.user, course.id)

with self.assertNumQueries(178, table_ignorelist=QUERY_COUNT_TABLE_IGNORELIST):
with self.assertNumQueries(177, table_ignorelist=QUERY_COUNT_TABLE_IGNORELIST):
with check_mongo_calls(3):
url = reverse(
'courseware_section',
Expand Down Expand Up @@ -1496,8 +1496,8 @@ def test_view_certificate_link(self):
self.assertContains(resp, "earned a certificate for this course.")

@ddt.data(
(True, 54),
(False, 54),
(True, 53),
(False, 53),
)
@ddt.unpack
def test_progress_queries_paced_courses(self, self_paced, query_count):
Expand All @@ -1512,7 +1512,7 @@ def test_progress_queries(self):
ContentTypeGatingConfig.objects.create(enabled=True, enabled_as_of=datetime(2018, 1, 1))
self.setup_course()
with self.assertNumQueries(
54, table_ignorelist=QUERY_COUNT_TABLE_IGNORELIST
53, table_ignorelist=QUERY_COUNT_TABLE_IGNORELIST
), check_mongo_calls(2):
self._get_progress_page()

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/discussion/django_comment_client/base/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,15 @@ def inner(self, default_store, block_count, mongo_calls, sql_queries, *args, **k
return inner

@ddt.data(
(ModuleStoreEnum.Type.split, 3, 8, 43),
(ModuleStoreEnum.Type.split, 3, 8, 42),
)
@ddt.unpack
@count_queries
def test_create_thread(self, mock_request):
self.create_thread_helper(mock_request)

@ddt.data(
(ModuleStoreEnum.Type.split, 3, 6, 42),
(ModuleStoreEnum.Type.split, 3, 6, 41),
)
@ddt.unpack
@count_queries
Expand Down
13 changes: 7 additions & 6 deletions lms/djangoapps/instructor/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ def test_bad_file_upload_type(self):
"""
Try uploading some non-CSV file and verify that it is rejected
"""
uploaded_file = SimpleUploadedFile("temp.csv", io.BytesIO(b"some initial binary data: \x00\x01").read())
uploaded_file = SimpleUploadedFile("temp.csv", io.BytesIO(b"some initial binary data: \xC3\x01").read())
response = self.client.post(self.url, {'students_list': uploaded_file})
assert response.status_code == 200
data = json.loads(response.content.decode('utf-8'))
Expand Down Expand Up @@ -920,15 +920,16 @@ def test_users_created_and_enrolled_successfully_if_others_fail(self):
manual_enrollments = ManualEnrollmentAudit.objects.all()
assert manual_enrollments.count() == 2

@patch('lms.djangoapps.instructor.views.api', 'generate_random_string',
Mock(side_effect=['first', 'first', 'second']))
def test_generate_unique_password_no_reuse(self):
"""
generate_unique_password should generate a unique password string that hasn't been generated before.
"""
generated_password = ['first']
password = generate_unique_password(generated_password, 12)
assert password != 'first'
with patch('lms.djangoapps.instructor.views.api.generate_random_string') as mock:
mock.side_effect = ['first', 'first', 'second']

generated_password = ['first']
password = generate_unique_password(generated_password, 12)
assert password != 'first'

@patch.dict(settings.FEATURES, {'ALLOW_AUTOMATED_SIGNUPS': False})
def test_allow_automated_signups_flag_not_set(self):
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/instructor/tests/test_certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ def test_bad_file_upload_type(self):
"""
Try uploading CSV file with invalid binary data and verify that it is rejected
"""
uploaded_file = SimpleUploadedFile("temp.csv", io.BytesIO(b"some initial binary data: \x00\x01").read())
uploaded_file = SimpleUploadedFile("temp.csv", io.BytesIO(b"some initial binary data: \xC3\x01").read())
response = self.client.post(self.url, {'students_list': uploaded_file})
assert response.status_code == 200
data = json.loads(response.content.decode('utf-8'))
Expand Down
5 changes: 0 additions & 5 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2286,8 +2286,6 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
'openedx.core.djangoapps.cors_csrf.middleware.CorsCSRFMiddleware',
'openedx.core.djangoapps.cors_csrf.middleware.CsrfCrossDomainCookieMiddleware',

'splash.middleware.SplashMiddleware',

'openedx.core.djangoapps.geoinfo.middleware.CountryMiddleware',
'openedx.core.djangoapps.embargo.middleware.EmbargoMiddleware',

Expand Down Expand Up @@ -3162,9 +3160,6 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
# Notes
'lms.djangoapps.edxnotes',

# Splash screen
'splash',

# User API
'rest_framework',

Expand Down
Loading