Skip to content

Silence benign grpc.aio noise#1127

Open
acroca wants to merge 2 commits into
dapr:mainfrom
acroca:silence-grpc-noise
Open

Silence benign grpc.aio noise#1127
acroca wants to merge 2 commits into
dapr:mainfrom
acroca:silence-grpc-noise

Conversation

@acroca

@acroca acroca commented Jul 3, 2026

Copy link
Copy Markdown
Member

The async DaprClient can emit noisy ERROR logs from grpc.aio's poller under load (BlockingIOError: [Errno 11] in PollerCompletionQueue._handle_events, upstream grpc/grpc#42357). The error is harmless, the poller retries the read and nothing is lost, and the workflow extension already suppresses it via a targeted asyncio-logger filter, but only when an async workflow client is created (#1053/#1102).

This PR moves that filter to a shared home in dapr/common/logging.py and installs it from DaprGrpcClientAsync as well, so core async client users get the suppression too. The previously duplicated copy in _durabletask/aio/internal/shared.py now imports the shared helper. The filter drops only records whose exception is a BlockingIOError and whose message references the poller callback; everything else on the asyncio logger passes through.

  • Filter definition moved to dapr/common/logging.py; behavior tests moved to tests/common/test_logging.py
  • DaprGrpcClientAsync.__init__ installs the filter (idempotent) before channel creation
  • Workflow ext unchanged in behavior; its AGENTS.md note updated

Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca acroca requested review from a team as code owners July 3, 2026 08:44
@acroca acroca requested a review from Copilot July 3, 2026 08:44
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.13%. Comparing base (bffb749) to head (c21cfbc).
⚠️ Report is 175 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1127      +/-   ##
==========================================
- Coverage   86.63%   82.13%   -4.50%     
==========================================
  Files          84      117      +33     
  Lines        4473     9612    +5139     
==========================================
+ Hits         3875     7895    +4020     
- Misses        598     1717    +1119     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR centralizes suppression of a known-benign grpc.aio poller BlockingIOError: [Errno 11] log line by moving the targeted asyncio-logger filter into a shared dapr.common.logging helper and installing it in the core async gRPC client, while keeping workflow behavior unchanged via reuse of the shared helper.

Changes:

  • Add GrpcAioPollerNoiseFilter + silence_grpc_aio_poller_noise() in dapr/common/logging.py and install it from DaprGrpcClientAsync.__init__.
  • Replace the workflow extension’s duplicated filter implementation with an import of the shared helper.
  • Move/adjust tests so filter behavior + idempotency live in tests/common/test_logging.py, and add a core async-client installation test.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/ext/workflow/durabletask/test_grpc_aio_log_filter.py Updates workflow durabletask test to assert the shared filter is installed (behavior tests moved elsewhere).
tests/common/test_logging.py New unit tests for filter behavior and idempotent installation in the shared helper.
tests/common/init.py Adds package marker for the new tests/common test module.
tests/clients/test_dapr_grpc_client_async.py Adds a test verifying the core async gRPC client installs the filter once.
dapr/ext/workflow/AGENTS.md Updates workflow agent guidance to reference the shared helper and core async client behavior.
dapr/ext/workflow/_durabletask/aio/internal/shared.py Removes duplicated filter code and calls the shared silence_grpc_aio_poller_noise().
dapr/common/logging.py Introduces the shared filter and idempotent installer on the asyncio logger.
dapr/aio/clients/grpc/client.py Installs the shared filter during async client initialization prior to channel creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants