alexeyinkin commented on code in PR #22735:
URL: https://github.com/apache/beam/pull/22735#discussion_r949870950


##########
playground/frontend/lib/pages/playground/states/examples_state.dart:
##########
@@ -173,31 +173,27 @@ class ExampleState with ChangeNotifier {
       return;
     }
 
-    List<MapEntry<SDK, ExampleModel>> defaultExamples = [];
-
-    for (var value in SDK.values) {
-      defaultExamples.add(
-        MapEntry(
-          value,
-          await _exampleRepository.getDefaultExample(
-            // First parameter is an empty string, because we don't need path 
to get the default example.
-            GetExampleRequestWrapper('', value),
-          ),
-        ),
-      );
+    try {
+      await Future.wait(SDK.values.map(_loadDefaultExample));
+    } catch (ex) {
+      if (defaultExamplesMap.isEmpty) {
+        rethrow;

Review Comment:
   We used to load the 4 default examples sequentially, and if any of them 
failed, nothing was loaded. Now go in parallel and allow failures in some of 
them.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to