You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/12/22 20:18:54 UTC

[GitHub] [beam] KonradJanica commented on a change in pull request #16183: [BEAM-13427] [Playground] show logs for precompiled objects

KonradJanica commented on a change in pull request #16183:
URL: https://github.com/apache/beam/pull/16183#discussion_r774150100



##########
File path: playground/frontend/lib/pages/playground/states/examples_state.dart
##########
@@ -54,11 +54,22 @@ class ExampleState with ChangeNotifier {
     return source;
   }
 
+  Future<String> getExampleLogs(String id, SDK sdk) async {
+    String source = await _exampleRepository.getExampleLogs(
+      GetExampleRequestWrapper(id, sdk),
+    );
+    return source;

Review comment:
       Nit: return the await statement directly instead of saving it into a variable.

##########
File path: playground/frontend/lib/modules/editor/parsers/run_options_parser.dart
##########
@@ -16,7 +16,8 @@
  * limitations under the License.
  */
 
-RegExp regExp = RegExp(r'\-\-([A-z0-9]*)\s*([A-z0-9]*)\s*');
+RegExp pipelineOptionsRegExp =
+    RegExp(r"""--([A-z0-9]*)\s+([A-z0-9\/\"\'\*\-\:\;\.]*)""");

Review comment:
       nit: use single quotes instead for better readability => r'''--([A-z0-9]*)\s+([A-z0-9\/\"\'\*\-\:\;\.]*)'''

##########
File path: playground/frontend/lib/modules/examples/repositories/example_repository.dart
##########
@@ -47,4 +47,11 @@ class ExampleRepository {
     final result = await _client.getExampleOutput(request);
     return result.output;
   }
+
+  Future<String> getExampleLogs(
+    GetExampleRequestWrapper request,
+  ) async {
+    final result = await _client.getExampleLogs(request);

Review comment:
       nit: replace with `return await _client.getExampleLogs(request).output;`




-- 
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-unsubscribe@beam.apache.org

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