Malarg commented on code in PR #25397:
URL: https://github.com/apache/beam/pull/25397#discussion_r1109397654
##########
playground/frontend/lib/pages/standalone_playground/screen.dart:
##########
@@ -37,6 +37,7 @@ import 'widgets/playground_page_footer.dart';
import 'widgets/playground_page_providers.dart';
class StandalonePlaygroundScreen extends StatelessWidget {
+ static const kAppBarButtonsWidth = 1105;
Review Comment:
done
##########
playground/frontend/playground_components/lib/src/repositories/code_client/grpc_code_client.dart:
##########
@@ -192,6 +196,9 @@ class GrpcCodeClient implements CodeClient {
try {
return await invoke();
} on GrpcError catch (error) {
+ if (error.code == StatusCode.unknown) {
+ throw RunCodeError(message: 'errors.unknownError'.tr());
+ }
Review Comment:
done
##########
playground/frontend/playground_components/lib/src/controllers/code_runner.dart:
##########
@@ -122,8 +135,23 @@ class CodeRunner extends ChangeNotifier {
}
Future<void> cancelRun() async {
+ final hasInternet = (await Connectivity().checkConnectivity()).isConnected;
+ if (!hasInternet) {
+ _result = RunCodeResult(
+ status: _result?.status ?? RunCodeStatus.unspecified,
+ output: _result?.output,
+ log: _result?.log ?? '',
+ errorMessage: 'errors.internetUnavailable'.tr(),
+ graph: _result?.graph,
+ );
+ notifyListeners();
+ return;
+ }
+
snippetEditingController = null;
- await _runSubscription?.cancel();
+ // Awaited cancelling subscription here blocks futrher method execution.
Review Comment:
fixed
--
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]