Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

revert: Make blockstore an installable package - #138

Merged
kdmccormick merged 1 commit into
masterfrom
revert-135-symbolist/package-app
Nov 8, 2021
Merged

revert: Make blockstore an installable package#138
kdmccormick merged 1 commit into
masterfrom
revert-135-symbolist/package-app

Conversation

@kdmccormick

@kdmccormick kdmccormick commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

Reverts #135

We noticed a spike in BundleNotFound errors from LMS shortly after that PR was released.

Example stack trace:

Nov  8 15:15:38 ip-x-x-x-x [service_variant=lms][django.request][env:prod-edx-edxapp] ERROR [ip-x-x-x-x  xxxx] [user None] [ip x.x.x.x] [log.py:224] - Internal Server Error: /api/xblock/v2/xblocks/lb:LabXchange:631f3623:video:1/handler/25274342-fbe56f2245550b55a88c/yt_video_metadata/
Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/openedx/core/lib/blockstore_api/methods.py", line 170, in get_bundle
    data = api_request('get', api_url('bundles', str(bundle_uuid)))
  File "/edx/app/edxapp/edx-platform/openedx/core/lib/blockstore_api/methods.py", line 48, in api_request
    raise NotFound
openedx.core.lib.blockstore_api.exceptions.NotFound
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/newrelic/hooks/framework_django.py", line 562, in wrapper
    return wrapped(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/views/decorators/clickjacking.py", line 50, in wrapped_view
    resp = view_func(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/xblock/rest_api/views.py", line 152, in xblock_handler
    block = load_block(usage_key, user)
  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/xblock/api.py", line 76, in load_block
    if user is not None and not context_impl.can_view_block(user, usage_key):
  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/content_libraries/library_context.py", line 72, in can_view_block
    def_key = self.definition_for_usage(usage_key)
  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/content_libraries/library_context.py", line 96, in definition_for_usage
    return bundle.definition_for_usage(usage_key)
  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/content_libraries/library_bundle.py", line 151, in definition_for_usage
    version_arg = {"bundle_version": get_bundle_version_number(self.bundle_uuid)}
  File "/edx/app/edxapp/edx-platform/openedx/core/djangolib/blockstore_cache.py", line 139, in get_bundle_version_number
    bundle_metadata = blockstore_api.get_bundle(bundle_uuid)
  File "/edx/app/edxapp/edx-platform/openedx/core/lib/blockstore_api/methods.py", line 172, in get_bundle
    raise BundleNotFound(f"Bundle {bundle_uuid} does not exist.")  # lint-amnesty, pylint: disable=raise-missing-from
openedx.core.lib.blockstore_api.exceptions.BundleNotFound: Bundle 7255a2cc-facd-45ac-ba96-58f0f1d4d0de does not exist.

@kdmccormick
kdmccormick marked this pull request as ready for review November 8, 2021 15:59

@connorhaugh connorhaugh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the revert matches, should be good to go.

@kdmccormick
kdmccormick merged commit 902ba71 into master Nov 8, 2021
@kdmccormick
kdmccormick deleted the revert-135-symbolist/package-app branch November 8, 2021 16:02
girish946 pushed a commit to open-craft/blockstore that referenced this pull request Dec 23, 2021
)

We noticed a spike in BundleNotFound errors from LMS shortly after that
PR was released to blockstore.edx.org.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants