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: add rpc request object to debug logging #696

Merged
merged 2 commits into from
Jul 29, 2021

Conversation

chrisrossi
Copy link
Contributor

Fixes #695

@chrisrossi chrisrossi requested a review from andrewsg as a code owner July 27, 2021 19:51
@chrisrossi chrisrossi requested a review from a team July 27, 2021 19:51
@chrisrossi chrisrossi requested a review from a team as a code owner July 27, 2021 19:51
@product-auto-label product-auto-label bot added the api: datastore Issues related to the googleapis/python-ndb API. label Jul 27, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 27, 2021
@@ -89,6 +89,7 @@ def rpc_call():
rpc = _remote.RemoteCall(call, rpc_name)
utils.logging_debug(log, rpc)
utils.logging_debug(log, "timeout={}", timeout)
utils.logging_debug(log, request)
Copy link
Contributor

Choose a reason for hiding this comment

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

My only concern here is potential overhead -- the request protobuf message could be arbitrarily large, especially for write operations. If that isn't a concern (becasue utils.logging_debug does a short-curcuit), then this should be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

utils.logging_debug does nothing unless the NDB_DEBUG environment variable is set to something truthy.

@tseaver
Copy link
Contributor

tseaver commented Jul 28, 2021

The failed docs job can be fixed by pinning Sphinx==4.0.1 in noxfile.py -- we are doing that uniformly in other repositories.

Given the error emitted:

Warning, treated as error:
/home/tseaver/projects/agendaless/Google/src/python-ndb/google/cloud/ndb/model.py:docstring of google.cloud.ndb.model.BlobKeyProperty:1:py:obj reference target not found: google.cloud.ndb.model.None

I suspect that sphinx-doc/sphinx#9246 is the culprit, but don't have the context to be sure.

@tseaver
Copy link
Contributor

tseaver commented Jul 28, 2021

Merging master after the merge of PR #698 should fix the build.

@tseaver
Copy link
Contributor

tseaver commented Jul 28, 2021

The test_query_default_namespace_when_context_namespace_is_other systest seems flaky. It failed slightly differently for #685.

@chrisrossi
Copy link
Contributor Author

The test_query_default_namespace_when_context_namespace_is_other systest seems flaky. It failed slightly differently for #685.

Yep, probably. I'll try and make it less flakey, tomorrow.

@chrisrossi
Copy link
Contributor Author

chrisrossi commented Jul 29, 2021

Created an issue for the Kokoro failure for posterity. Going to try to just rerun for now, as it seems transient. #703

@chrisrossi chrisrossi added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 29, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 29, 2021
@tseaver tseaver merged commit 45e590a into googleapis:master Jul 29, 2021
@chrisrossi chrisrossi deleted the fix-695 branch July 30, 2021 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/python-ndb API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug logging fails to capture RPC request details
3 participants