Problem
Currently, the base client only attaches auth and signing metadata (key, timestamp, nonce, signature) for:
- Unary-to-unary calls
- Unary-to-stream calls
It does not attach this metadata for stream-to-unary or stream-to-stream calls (streaming uploads).
Impact
Clients that use streaming upload calls (e.g., UpsertMarketLocationSamplesStream in the market-metering client) need to manually attach the auth/signing metadata, leading to code duplication and potential bugs.
See workaround in frequenz-client-marketmetering-python PR #48: frequenz-floss/frequenz-client-marketmetering-python#48
Proposed Solution
Extend the base client to automatically attach auth/signing metadata for all call types:
- Unary-to-unary ✓ (already supported)
- Unary-to-stream ✓ (already supported)
- Stream-to-unary (needs support)
- Stream-to-stream (needs support)
This would require handling the metadata injection differently for streaming calls, possibly:
- For stream-to-unary: Attach metadata before starting the request stream
- For stream-to-stream: Attach metadata when starting the stream
References
Problem
Currently, the base client only attaches auth and signing metadata (key, timestamp, nonce, signature) for:
It does not attach this metadata for stream-to-unary or stream-to-stream calls (streaming uploads).
Impact
Clients that use streaming upload calls (e.g.,
UpsertMarketLocationSamplesStreamin the market-metering client) need to manually attach the auth/signing metadata, leading to code duplication and potential bugs.See workaround in frequenz-client-marketmetering-python PR #48: frequenz-floss/frequenz-client-marketmetering-python#48
Proposed Solution
Extend the base client to automatically attach auth/signing metadata for all call types:
This would require handling the metadata injection differently for streaming calls, possibly:
References