frequenz-floss / frequenz-api-reporting

Frequenz Reporting API gRPC/protobuf specifications
MIT License
1 stars 6 forks source link

Change order of parameters in `StreamFilter` #54

Closed stefan-brus-frequenz closed 1 month ago

stefan-brus-frequenz commented 2 months ago

What's needed?

To be consistent with the other filter, time_filter and include_options should be switched around (time_filter = 2, include_options = 3)

Proposed solution

No response

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response

thomas-nicolai-frequenz commented 2 months ago

Here is the diff:

// Request message for receiving stream of metrics, such as electrical
// measurements, and other information for individual microgrid components.
//
// !!! note
//     In addition to the raw metrics, the API can also return additional information
//     like errors or operational states of the components during the specified time period.
//
message ReceiveMicrogridComponentsDataStreamRequest {
  // General filter criteria for querying microgrid components data.
  //
  // !!! note
  //     The filter criteria defined here are applied universally across all
  //     specified microgrids and their respective components.
  message StreamFilter {
    // Optional resampling options like resolution for the data, represented in seconds.
    // If omitted, data will be returned in its original representation.
    ResamplingOptions resampling_options = 1;

-    // Include options specifying additional fields to be included in the response.
+   // Optional time-based filter criteria.
+   // If omitted, data will start streaming from the timestamp that the request was received.
-   IncludeOptions include_options = 2;
+   TimeFilter time_filter = 2;

-   // Optional time-based filter criteria.
-   // If omitted, data will start streaming from the timestamp that the request was received.
+    // Include options specifying additional fields to be included in the response.
-   TimeFilter time_filter = 3;
+   IncludeOptions include_options = 3;

    // List of metric source filters
    // For the metrics present in this list, the data from only the specified
    // sources will be returned. If no sources are provided for a metric in this
    // list, then no data will be returned for the said metric.
    // For the metrics not present in this list, data from all of their sources will
    // be returned.
    repeated MetricSourceOptions metric_sources = 4;
  }

  // ...
stefan-brus-frequenz commented 2 months ago

Blocking this, we will be removing the list endpoints so there will only be one filter message going forward

stefan-brus-frequenz commented 1 month ago

Closing this, in case the list endpoints are introduced we can re-introduce the ListFilter