Abacn commented on PR #31999:
URL: https://github.com/apache/beam/pull/31999#issuecomment-2253037656

   after #31838 now portable runners can see stringset metrics, however, the 
result is different from non-portable ones and still failing the assert
   
   Previous:
   
   ```
   java.lang.AssertionError: 
   Expected: iterable with items [
        MetricResult{inNamespace="org.apache.beam.sdk.metrics.MetricsTest", 
name="sources", step="MyStep1", attempted=<StringSetResult{stringSet=[gcs]}>},
        MetricResult{inNamespace="org.apache.beam.sdk.metrics.MetricsTest", 
name="sinks", step="MyStep2", attempted=<StringSetResult{stringSet=[kafka, 
bq]}>},
        MetricResult{inNamespace="org.apache.beam.sdk.metrics.MetricsTest", 
name="sideinputs", step="MyStep1", 
attempted=<StringSetResult{stringSet=[bigtable, spanner]}>},
        MetricResult{inNamespace="org.apache.beam.sdk.metrics.MetricsTest", 
name="sideinputs", step="MyStep2", attempted=<StringSetResult{stringSet=[sql, 
bigtable]}>}
   ] in any order
        but: no item matches: ... in []
   ```
   
   now:
   
   ```
   but: not matched: <
   
MetricResult{key=MyStep1-ParMultiDo-Anonymous-:org.apache.beam.sdk.metrics.MetricsTest:sources,
 committedOrNull=null, attempted=StringSetResult{stringSet=[gcs]}}>
   ```
   
   checked that `metrics.getStringSets()` now returns
   
   ```
   [
   MetricResult{key=MyStep2:org.apache.beam.sdk.metrics.MetricsTest:sinks, 
committedOrNull=null, attempted=StringSetResult{stringSet=[kafka, bq]}},
   
MetricResult{key=MyStep1-ParMultiDo-Anonymous-:org.apache.beam.sdk.metrics.MetricsTest:sources,
 committedOrNull=null, attempted=StringSetResult{stringSet=[gcs]}},
   MetricResult{key=MyStep2:org.apache.beam.sdk.metrics.MetricsTest:sideinputs, 
committedOrNull=null, attempted=StringSetResult{stringSet=[bigtable, sql]}},
   
MetricResult{key=MyStep1-ParMultiDo-Anonymous-:org.apache.beam.sdk.metrics.MetricsTest:sideinputs,
 committedOrNull=null, attempted=StringSetResult{stringSet=[spanner, 
bigtable]}},
   MetricResult{key=MyStep2:org.apache.beam.sdk.metrics.MetricsTest:sinks, 
committedOrNull=null, attempted=StringSetResult{stringSet=[kafka, bq]}},
   
MetricResult{key=MyStep1-ParMultiDo-Anonymous-:org.apache.beam.sdk.metrics.MetricsTest:sources,
 committedOrNull=null, attempted=StringSetResult{stringSet=[gcs]}},
   MetricResult{key=MyStep2:org.apache.beam.sdk.metrics.MetricsTest:sideinputs, 
committedOrNull=null, attempted=StringSetResult{stringSet=[bigtable, sql]}},
   
MetricResult{key=MyStep1-ParMultiDo-Anonymous-:org.apache.beam.sdk.metrics.MetricsTest:sideinputs,
 committedOrNull=null, attempted=StringSetResult{stringSet=[spanner, bigtable]}}
   ]
   ```
   
   the problem is each result duplicated one more time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to