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

fix 400 errors on retries in _call #380

Merged
merged 2 commits into from
Apr 28, 2021
Merged

Conversation

nbren12
Copy link
Contributor

@nbren12 nbren12 commented Apr 28, 2021

The kwargs was being overwritten by ._get_args. If any retries are
needed, then on the second iteration datain will always be 'None'. This
will cause uploading steps to return with exit code 400.

This commit fixes this bug by refactoring the _call method to minimize
the number of variabes in the scope.

Resolves #290

The kwargs was being overwritten by ._get_args. If any retries are
needed, then on the second iteration datain will always be 'None'.  This
will cause uploading steps to return with exit code 400.

This commit fixes this bug by refactoring the _call method to minimize
the number of variabes in the scope.

Resolves fsspec#290
@@ -507,26 +528,9 @@ async def _call(
try:
if retry > 0:
await asyncio.sleep(min(random.random() + 2 ** (retry - 1), 32))
self.maybe_refresh()
path, jsonin, datain, headers, kwargs = self._get_args(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note that kwargs is overwritten here. This is the bug.

@martindurant
Copy link
Member

Perfect, thank you!

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.

Retry after HttpError code 400
2 participants