Uploaded image for project: 'Nuxeo Python Client'
  1. Nuxeo Python Client
  2. NXPY-154

Fix S3 client instanciation not thread-safe

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.3
    • Component/s: Upload

      Description

      Issue

      As highlighted by this issue: KeyError: 'endpoint_resolver', the client instanciation is not thread-safe.

      We need to find a workaround as setting a global client is not doable. (Not sure, maybe can we pass AWS credentials as attributes, and then it would be possible, to check)

      Sentry Issues: NUXEO-DRIVE-2SM, NUXEO-DRIVE-2T7.

      Error:

      KeyError: 'endpoint_resolver'
        File "nxdrive/engine/processor.py", line 277, in _execute
        File "nxdrive/engine/processor.py", line 610, in _synchronize_locally_modified
        File "nxdrive/client/remote_client.py", line 887, in stream_update
        File "nxdrive/client/remote_client.py", line 424, in upload
        File "nxdrive/client/remote_client.py", line 520, in upload_chunks
        File "site-packages/nuxeo/models.py", line 182, in get_uploader
        File "site-packages/nuxeo/uploads.py", line 339, in get_uploader
        File "site-packages/nuxeo/handlers/s3.py", line 46, in __init__
        File "__init__.py", line 91, in client
        File "site-packages/boto3/session.py", line 263, in client
        File "site-packages/botocore/session.py", line 824, in create_client
        File "site-packages/botocore/session.py", line 697, in _get_internal_component
        File "site-packages/botocore/session.py", line 923, in get_component
      

      Fix

      We will follow the documentation, even if there is still a need for clarification.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h