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

build: remove boto old version #31282

Merged
merged 3 commits into from
Feb 9, 2023
Merged

build: remove boto old version #31282

merged 3 commits into from
Feb 9, 2023

Conversation

mumarkhan999
Copy link
Member

@mumarkhan999 mumarkhan999 commented Nov 14, 2022

Upgrading boto to boto3

  • Replaced the boto classes with boto3 classes
  • Removed boto-related code which will not be needed

Related ticket

Related PRs

@mumarkhan999 mumarkhan999 force-pushed the umar/remove-old-boto branch 5 times, most recently from cf9cac7 to 90ecf82 Compare November 21, 2022 09:29
@mumarkhan999 mumarkhan999 force-pushed the umar/remove-old-boto branch 15 times, most recently from f74202f to 1ad90c2 Compare November 23, 2022 16:26
@mumarkhan999 mumarkhan999 force-pushed the umar/remove-old-boto branch 3 times, most recently from ba92381 to f893c42 Compare December 9, 2022 07:58
Copy link
Contributor

@iamsobanjaved iamsobanjaved left a comment

Choose a reason for hiding this comment

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

LGTM 👍

cms/djangoapps/contentstore/views/import_export.py Outdated Show resolved Hide resolved
@mumarkhan999 mumarkhan999 marked this pull request as ready for review February 3, 2023 16:44
@UsamaSadiq UsamaSadiq merged commit 14e6040 into master Feb 9, 2023
@UsamaSadiq UsamaSadiq deleted the umar/remove-old-boto branch February 9, 2023 10:21
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

UsamaSadiq added a commit that referenced this pull request Feb 9, 2023
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

UsamaSadiq added a commit that referenced this pull request Feb 9, 2023
@UsamaSadiq
Copy link
Member

Faced errors on edxapp-cms-worker related to Course Metadata failure with following stack trace

[2023-02-09 13:29:44,028: ERROR/ForkPoolWorker-15] Task cms.djangoapps.export_course_metadata.tasks.export_course_metadata_task[1978fb43-09a0-4973-9cd4-8635aca89aec] raised unexpected: TypeError('Unicode-objects must be encoded before hashing')
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/newrelic/hooks/application_celery.py", line 99, in wrapper
    return wrapped(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/export_course_metadata/tasks.py", line 31, in export_course_metadata_task
    course_metadata_export_storage.save(f'course_metadata_export/{course_key}.json', highlights_content)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/files/storage.py", line 54, in save
    name = self._save(name, content)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/storages/backends/s3boto3.py", line 495, in _save
    self._save_content(obj, content, parameters=parameters)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/storages/backends/s3boto3.py", line 510, in _save_content
    obj.upload_fileobj(content, ExtraArgs=put_parameters)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/boto3/s3/inject.py", line 511, in object_upload_fileobj
    return self.meta.client.upload_fileobj(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/boto3/s3/inject.py", line 431, in upload_fileobj
    return future.result()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/s3transfer/futures.py", line 73, in result
    return self._coordinator.result()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/s3transfer/futures.py", line 233, in result
    raise self._exception
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/s3transfer/tasks.py", line 126, in __call__
    return self._execute_main(kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/s3transfer/tasks.py", line 150, in _execute_main
    return_value = self._main(**kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/s3transfer/upload.py", line 692, in _main
    client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/botocore/client.py", line 317, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/botocore/client.py", line 591, in _make_api_call
    handler, event_response = self.meta.events.emit_until_response(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/botocore/hooks.py", line 242, in emit_until_response
    responses = self._emit(event_name, kwargs, stop_on_response=True)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/botocore/hooks.py", line 210, in _emit
    response = handler(**kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/botocore/handlers.py", line 209, in conditionally_calculate_md5
    calculate_md5(params, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/botocore/handlers.py", line 187, in calculate_md5
    binary_md5 = _calculate_md5_from_file(body)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/botocore/handlers.py", line 201, in _calculate_md5_from_file
    md5.update(chunk)
TypeError: Unicode-objects must be encoded before hashing

@UsamaSadiq
Copy link
Member

Merged the revert PR.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been rolled back from the production environment.

@awais786 awais786 restored the umar/remove-old-boto branch February 10, 2023 05:15
awais786 added a commit that referenced this pull request Feb 13, 2023
@timmc-edx timmc-edx deleted the umar/remove-old-boto branch March 6, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants