Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-13639] [Playground] Add notification to Log/Output tabs about cached example #16519

Merged
merged 3 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class CodeRepository {
final log = responses[1];
final error = responses[2];
return RunCodeResult(
pipelineUuid: pipelineUuid,
status: status,
output: prevOutput + output.output + error.output,
log: prevLog + log.output,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const kTitle = 'Catalog';
const kExecutionCancelledText = '\nPipeline cancelled';
const kPipelineOptionsParseError =
'Failed to parse pipeline options, please check the format (example: --key1 value1 --key2 value2), only alphanumeric and ",*,/,-,:,;,\',. symbols are allowed';
const kCachedResultsLog =
'The results of this example are taken from the Apache Beam Playground cache.\n';

class PlaygroundState with ChangeNotifier {
late SDK _sdk;
Expand Down Expand Up @@ -180,10 +182,11 @@ class PlaygroundState with ChangeNotifier {
notifyListeners();
// add a little delay to improve user experience
await Future.delayed(kPrecompiledDelay);
String logs = _selectedExample!.logs ?? '';
_result = RunCodeResult(
status: RunCodeStatus.finished,
output: _selectedExample!.outputs,
log: _selectedExample!.logs,
log: kCachedResultsLog + logs,
);
_executionTime?.close();
notifyListeners();
Expand Down