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

[AWS S3] Use local session #7067

Merged

Conversation

Marishka17
Copy link
Contributor

@Marishka17 Marishka17 commented Oct 26, 2023

Motivation and context

Try to fix the issue described in cart 322

File \"/opt/venv/lib/python3.10/site-packages/botocore/session.py\", line 941, in get_component\n del self._deferred[name]\nKeyError: 'endpoint_resolver'\n","status_code":500

Generally, this approach increases the time of creating clients but it does not affect us much because we create a client once or twice times for some operations (cloud storage creating, task creating with cloud storage data, retrieving a chunk, etc)
image

https://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html#multithreading-or-multiprocessing-with-resources
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/session.html#multithreading-or-multiprocessing-with-sessions

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #7067 (73a4fd4) into develop (ba3db01) will increase coverage by 0.03%.
Report is 2 commits behind head on develop.
The diff coverage is 88.88%.

@@             Coverage Diff             @@
##           develop    #7067      +/-   ##
===========================================
+ Coverage    82.31%   82.35%   +0.03%     
===========================================
  Files          361      361              
  Lines        39263    39264       +1     
  Branches      3588     3588              
===========================================
+ Hits         32321    32336      +15     
+ Misses        6942     6928      -14     
Components Coverage Δ
cvat-ui 77.37% <ø> (+0.08%) ⬆️
cvat-server 86.91% <88.88%> (-0.01%) ⬇️

Co-authored-by: Andrey Zhavoronkov <andrey@cvat.ai>
@nmanovic
Copy link
Contributor

Please add changelog

@nmanovic nmanovic merged commit 623476e into develop Nov 2, 2023
34 checks passed
@nmanovic nmanovic deleted the mk/fix_parallel_downloading_of_cloud_storage_files branch November 2, 2023 14:27
@cvat-bot cvat-bot bot mentioned this pull request Nov 3, 2023
bsekachev pushed a commit that referenced this pull request Nov 6, 2023
Try to fix the issue described in cart 322
```
File \"/opt/venv/lib/python3.10/site-packages/botocore/session.py\", line 941, in get_component\n del self._deferred[name]\nKeyError: 'endpoint_resolver'\n","status_code":500
``` 
Generally, this approach increases the time of creating clients but it
does not affect us much because we create a client once or twice times
for some operations (cloud storage creating, task creating with cloud
storage data, retrieving a chunk, etc)

![image](https://github.com/opencv/cvat/assets/49038720/5adb4434-4d05-4882-b70c-ea760852b367)


https://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html#multithreading-or-multiprocessing-with-resources

https://boto3.amazonaws.com/v1/documentation/api/latest/guide/session.html#multithreading-or-multiprocessing-with-sessions

Co-authored-by: Andrey Zhavoronkov <andrey@cvat.ai>
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.

None yet

3 participants