daria-malkova commented on a change in pull request #16593:
URL: https://github.com/apache/beam/pull/16593#discussion_r792457376



##########
File path: playground/backend/cmd/server/controller.go
##########
@@ -309,3 +309,15 @@ func (controller *playgroundController) 
GetPrecompiledObjectLogs(ctx context.Con
        response := pb.GetPrecompiledObjectLogsResponse{Output: logs}
        return &response, nil
 }
+
+// GetPrecompiledObjectGraph returns the graph of the compiled and run example
+func (controller *playgroundController) GetPrecompiledObjectGraph(ctx 
context.Context, info *pb.GetPrecompiledObjectGraphRequest) 
(*pb.GetPrecompiledObjectGraphResponse, error) {
+       cd := cloud_bucket.New()

Review comment:
       Why is it called _cd_, not a _cb_ for example?

##########
File path: playground/backend/internal/cloud_bucket/precompiled_objects.go
##########
@@ -128,6 +129,16 @@ func (cd *CloudStorage) GetPrecompiledObjectLogs(ctx 
context.Context, precompile
        return result, nil
 }
 
+// GetPrecompiledObjectGraph returns the graph of the example
+func (cd *CloudStorage) GetPrecompiledObjectGraph(ctx context.Context, 
precompiledObjectPath string) (string, error) {
+       data, err := cd.getFileFromBucket(ctx, precompiledObjectPath, 
GraphExtension)
+       if err != nil {
+               return "", err
+       }
+       result := string(data)
+       return result, nil

Review comment:
       ```suggestion
        return string(data), nil
   ```




-- 
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