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

Reset file offsets before sending a request #115

Merged
merged 2 commits into from
Jun 4, 2024
Merged

Conversation

samamorgan
Copy link
Collaborator

With our request retry mechanism on HTTP 401 responses, the follow-up request that contains files to be uploaded will fail because the file has already been read by Requests to determine the file size.

This patch ensures that all files passed into a request are at offset 0 before sending the request.

Copy link

github-actions bot commented Jun 4, 2024

Coverage

Coverage Report (Python 3.8) •
FileStmtsMissCoverMissing
welkin
   client.py132993%181, 225–229, 242, 276, 288
   util.py111199%142
TOTAL10224895% 

Tests Skipped Failures Errors Time
230 3 💤 0 ❌ 0 🔥 3.362s ⏱️

Copy link

github-actions bot commented Jun 4, 2024

Coverage

Coverage Report (Python 3.10) •
FileStmtsMissCoverMissing
welkin
   client.py132993%181, 225–229, 242, 276, 288
   util.py111199%142
TOTAL10224895% 

Tests Skipped Failures Errors Time
230 3 💤 0 ❌ 0 🔥 3.431s ⏱️

Copy link

github-actions bot commented Jun 4, 2024

Coverage

Coverage Report (Python 3.9) •
FileStmtsMissCoverMissing
welkin
   client.py132993%181, 225–229, 242, 276, 288
   util.py111199%142
TOTAL10224895% 

Tests Skipped Failures Errors Time
230 3 💤 0 ❌ 0 🔥 3.542s ⏱️

Copy link

github-actions bot commented Jun 4, 2024

Coverage

Coverage Report (Python 3.11) •
FileStmtsMissCoverMissing
welkin
   client.py132993%181, 225–229, 242, 276, 288
   util.py111199%142
TOTAL10224895% 

Tests Skipped Failures Errors Time
230 3 💤 0 ❌ 0 🔥 3.327s ⏱️

Copy link

github-actions bot commented Jun 4, 2024

Coverage

Coverage Report (Python 3.12) •
FileStmtsMissCoverMissing
welkin
   client.py132993%181, 225–229, 242, 276, 288
   util.py111199%142
TOTAL10224895% 

Tests Skipped Failures Errors Time
230 3 💤 0 ❌ 0 🔥 4.132s ⏱️

@samamorgan samamorgan merged commit 4e35868 into develop Jun 4, 2024
7 checks passed
@samamorgan samamorgan deleted the feature/file-rewind branch June 4, 2024 23:07
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.

2 participants