overhangio / tutor-discovery

Course Discovery plugin for Tutor
GNU Affero General Public License v3.0
13 stars 42 forks source link

feat: upgrade to quince #50

Closed ziafazal closed 11 months ago

ziafazal commented 1 year ago

Changed related to quince upgrade.

cmltaWt0 commented 1 year ago

I'm trying to test it but getting the following error on launch. Has anybody experienced this?

2023-11-20 21:24:35,513 INFO 100 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /openedx/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py:134 - Command is not using threads to write data.
2023-11-20 21:24:35,515 INFO 100 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /openedx/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py:178 - Executing Loader CoursesApiDataLoader, url: http://local.overhang.io/api/courses/v1/
2023-11-20 21:24:36,325 INFO 100 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /openedx/venv/lib/python3.8/site-packages/backoff/_common.py:105 - Backing off run_loader(...) for 0.3s (course_discovery.apps.course_metadata.models.Source.DoesNotExist: Source matching query does not exist.)
2023-11-20 21:24:36,661 INFO 100 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /openedx/venv/lib/python3.8/site-packages/backoff/_common.py:105 - Backing off run_loader(...) for 56.8s (course_discovery.apps.course_metadata.models.Source.DoesNotExist: Source matching query does not exist.)
2023-11-20 21:25:33,459 ERROR 100 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /openedx/venv/lib/python3.8/site-packages/backoff/_common.py:120 - Giving up run_loader(...) after 3 tries (course_discovery.apps.course_metadata.models.Source.DoesNotExist: Source matching query does not exist.)
2023-11-20 21:25:33,459 ERROR 100 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /openedx/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py:40 - CoursesApiDataLoader failed!
Traceback (most recent call last):
  File "/openedx/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py", line 37, in execute_loader
    run_loader()
  File "/openedx/venv/lib/python3.8/site-packages/backoff/_sync.py", line 105, in retry
    ret = target(*args, **kwargs)
  File "/openedx/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py", line 34, in run_loader
    return loader_class(*loader_args).ingest()
  File "/openedx/discovery/course_discovery/apps/course_metadata/data_loaders/api.py", line 51, in __init__
    self.default_product_source = Source.objects.get(slug=settings.DEFAULT_PRODUCT_SOURCE_SLUG)
  File "/openedx/venv/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(
course_discovery.apps.course_metadata.models.Source.DoesNotExist: Source matching query does not exist.
CommandError: One or more of the data loaders above failed.
regisb commented 12 months ago

Yes, this issue is the reason why we temporarily disabled the discovery and ecommerce plugins on the quince demo server.

cmltaWt0 commented 12 months ago

@regisb I have a pending PR for discovery for Django 4.2 upgrade. What do you think about merging it now?

I can't verify the build before the merge but I feel like it's a bad idea to merge w/o at least local test.