<#1253 fix: support connectrpc 0.11 property-form ...
# flyte-github
a
#1253 fix: support connectrpc 0.11 property-form request_headers (FLYTE-SDK-5T) Pull request opened by EngHabu Problem (FLYTE-SDK-5T) connectrpc 0.11 changed
RequestContext.request_headers
(and the other accessors) from methods into
@property
attributes. Our auth interceptors call
ctx.request_headers()
as a method, so any user who resolved
connectrpc>=0.11
— which is permitted by our
connectrpc>=0.9.0,<1.0.0
pin — crashes with:
Copy code
TypeError: 'Headers' object is not callable
  at flyte/remote/_client/auth/_interceptors/default_metadata.py:36 on_start
Because the failure is in the metadata/auth interceptor that runs on every outgoing control-plane RPC, the user can't
SelectCluster
, upload, or run anything — it surfaces in Sentry as
RuntimeSystemError: Upload failed ... SelectCluster failed
. Seen on the latest release 2.5.4. Fix Add a tiny
_compat.request_headers(ctx)
accessor that resolves both API shapes: headers = ctx.request_headers return headers() if callable(headers) else headers • connectrpc `<0.11`:
request_headers
is a bound method → callable → invoked. • connectrpc `>=0.11`:
request_headers
is a
Headers
property → not callable → used directly. All four interceptor call sites (
default_metadata.py
×2,
auth.py
×2) now route through it. This keeps the SDK working across the entire pinned connectrpc range rather than betting on one API shape. Tests `tests/flyte/remote/test_connectrpc_interceptors.py`: •
TestRequestHeadersCompat
— unit tests for both method-form and property-form contexts. •
TestConnectrpc011PropertyForm
— DefaultMetadata + Auth interceptors against a property-form context (regression guard for 5T). 47/47 pass locally. fixes FLYTE-SDK-5T flyteorg/flyte-sdk