Skip to content

Support auth/signing metadata for streaming upload calls #234

@Marenz

Description

@Marenz

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:

  1. For stream-to-unary: Attach metadata before starting the request stream
  2. For stream-to-stream: Attach metadata when starting the stream

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions