Suppress logs with google.cloud.workflows client instantiation for grpcio==1.65.1
Closed this issue · 2 comments
Determine this is the right repository
- I determined this is the correct repository in which to report this bug.
Summary of the issue
Working with Spanner table produces alembic log errors that are hard to suppress.
The issue may be related to #12902
API client name and version
google-api-core==2.19.1, google-auth==2.32.0, google-cloud-core==2.4.1, google-cloud-spanner==3.47.0, googleapis-common-protos==1.63.2, grpc-google-iam-v1==0.13.1
Reproduction steps: code
from google.cloud import spanner
def test1(project_id: str, database_id: str, instance_id: str = "test-fcp-us-central1"):
_spanner_client = spanner.Client(project=project_id)
_instance = _spanner_client.instance(instance_id)
_database = _instance.database(database_id)
with _database.snapshot() as snapshot:
pass
Reproduction steps: supporting files
Just use some valid project_id
and database_id
.
Reproduction steps: actual results
Output:
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1721974994.323391 672338 config.cc:230] gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
Reproduction steps: expected results
No output at all. The message should be suppressed.
OS & version + platform
Ubuntu 22.04, 64bit
Python environment
Python 3.12.4 and Python 3.10.12
Python dependencies
No response
Hi @adamryczkowski, thanks for reporting this. It seems like this issue has continued to persist in grpico>=1.65.0
. As per grpc/grpc#37178 (comment), the gRPC team is aware of this issue and is working on it.
For the time being, I would suggest downgrading to grpcio==1.64.1
since the issue does not seem to exist there.
I'm going to close this issue as #12902 (comment), mentions that the issue was addressed in https://pypi.org/project/grpcio/1.66.0/. Please open a new issue if you still encounter the problem.