[
https://issues.apache.org/jira/browse/BEAM-13633?focusedWorklogId=709102&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-709102
]
ASF GitHub Bot logged work on BEAM-13633:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jan/22 15:18
Start Date: 14/Jan/22 15:18
Worklog Time Spent: 10m
Work Description: pavel-avilov commented on a change in pull request
#16484:
URL: https://github.com/apache/beam/pull/16484#discussion_r784926745
##########
File path: playground/backend/cmd/server/controller.go
##########
@@ -294,3 +294,28 @@ func (controller *playgroundController)
GetPrecompiledObjectLogs(ctx context.Con
response := pb.GetPrecompiledObjectLogsResponse{Output: logs}
return &response, nil
}
+
+// GetDefaultPrecompiledObject returns the default precompile object for sdk.
+func (controller *playgroundController) GetDefaultPrecompiledObject(ctx
context.Context, info *pb.GetDefaultPrecompiledObjectRequest)
(*pb.GetDefaultPrecompiledObjectResponse, error) {
+ switch info.Sdk {
+ case pb.Sdk_SDK_UNSPECIFIED, pb.Sdk_SDK_SCIO:
+ logger.Errorf("GetDefaultPrecompiledObject(): unimplemented
sdk: %s\n", info.Sdk)
+ return nil, errors.InvalidArgumentError("Error during
preparing", "Sdk is not implemented yet: %s", info.Sdk.String())
+ }
+
+ bucket := cloud_bucket.New()
+ precompiledObject, err := bucket.GetDefaultPrecompileObject(ctx,
info.Sdk, controller.env.ApplicationEnvs.WorkingDir())
+ if err != nil {
+ logger.Errorf("GetDefaultPrecompileObject(): cloud storage
error: %s", err.Error())
+ return nil, errors.InternalError("Error during getting default
Precompiled Object", "Error with cloud connection")
+ }
+
+ response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject:
&pb.PrecompiledObject{
+ CloudPath: precompiledObject.CloudPath,
+ Name: precompiledObject.Name,
+ Description: precompiledObject.Description,
+ Type: precompiledObject.Type,
+ PipelineOptions: precompiledObject.PipelineOptions,
+ }}
Review comment:
Yes, this information will be enough for frontend.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 709102)
Time Spent: 2.5h (was: 2h 20m)
> Implement method to get a default example for each SDKs
> -------------------------------------------------------
>
> Key: BEAM-13633
> URL: https://issues.apache.org/jira/browse/BEAM-13633
> Project: Beam
> Issue Type: Sub-task
> Components: beam-playground
> Reporter: Pavel Avilov
> Assignee: Pavel Avilov
> Priority: P2
> Labels: beam-playground-backend, beam-playground-sprint-7
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> Need to implement a method that will return a default example for each SDKs.
> Store the description of default examples in the config.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)