Uh oh!
There was an error while loading. Please reload this page.
Remove deepcopy of client._http - #3954
Conversation
| http = copy.deepcopy(client._http) | ||
| self.client = client.__class__( | ||
| client.project, client._credentials, http) | ||
| self.client = client |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
lukesneeringer
commented
Sep 14, 2017
Side note: CODEOWNERS does not seem to work quite right. :-( |
lukesneeringer
commented
Sep 14, 2017
On the merits of this actual PR -- this does look sane to me, but hoping @tseaver or @jonparrott will make sure I am not missing something obvious. |
waprin
commented
Sep 14, 2017
The original deepcopy was a race condition for the async long handler, but it's covered in the system test, being a race condition it didn't always appear but it did frequently enough that if there's any problem with the PR you'd probably know soon. LGTM if jon think it look right. |
liyanhui1228
commented
Sep 14, 2017
Thanks @waprin! I have run the system tests for several times locally and it works fine. Though the race condition does not always appear as Bill said. If thread-safety is the only reason for deepcopy, sounds like we can safely remove it. Can we go ahead and merge this? |
liyanhui1228
commented
Sep 14, 2017
The system test |
lukesneeringer
commented
Sep 15, 2017
@liyanhui1228 Go ahead and fix that here. Happy to merge once tests pass. |
liyanhui1228
commented
Sep 15, 2017
Ready for merging, system tests passed locally. |
Fixes#3931.
When GOOGLE_CLOUD_DISABLE_GRPC=true, the logging will have
'AuthorizedSession' object has no attribute 'credentials'exception.The line
http = copy.deepcopy(client._http)is a relic when httplib2 was used. Removing it and directly use theclientpassed in instead of re-initialize with the deepcopied http object solved the problem.