[ 
https://issues.apache.org/jira/browse/BEAM-7668?focusedWorklogId=273517&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-273517
 ]

ASF GitHub Bot logged work on BEAM-7668:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Jul/19 20:26
            Start Date: 08/Jul/19 20:26
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on pull request #8977: [BEAM-7668] 
Add GetPipeline method to gRPC JobService
URL: https://github.com/apache/beam/pull/8977#discussion_r301284544
 
 

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/jobsubmission/InMemoryJobService.java
 ##########
 @@ -234,6 +237,26 @@ public void getState(
     }
   }
 
+  @Override
+  public void getPipeline(
+      GetJobPipelineRequest request, StreamObserver<GetJobPipelineResponse> 
responseObserver) {
+    LOG.trace("{} {}", GetJobPipelineRequest.class.getSimpleName(), request);
+    String invocationId = request.getJobId();
+    try {
+      JobInvocation invocation = getInvocation(invocationId);
+      RunnerApi.Pipeline pipeline = invocation.getPipeline();
 
 Review comment:
   We are handling the exception but are doing it incorrectly since 
getInvocation() throws a Status.NOT_FOUND exception but since we are catching 
it and then rethrowing it as an `INTERNAL` exception we are losing the 
`NOT_FOUND`.
   
   The logic needs to be updated to be:
   ```
   try {
     ... do stuff ...
   } catch (StatusException e) {
     responseObserver.onError(e);
   } catch (Exception e) {
     ... original exception handling that converts the status to INTERNAL ...
   }
   ```
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 273517)
    Time Spent: 2h 10m  (was: 2h)

> Add ability to query a pipeline from a gRPC JobService
> ------------------------------------------------------
>
>                 Key: BEAM-7668
>                 URL: https://issues.apache.org/jira/browse/BEAM-7668
>             Project: Beam
>          Issue Type: Improvement
>          Components: beam-model
>            Reporter: Chad Dombrova
>            Assignee: Chad Dombrova
>            Priority: Major
>              Labels: portability
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> As a developer I want to query the pipeline definition of jobs that have 
> already been submitted to the Job Service, so that I can write a UI to view 
> and monitor Beam pipelines via the portability model. 
>  
> PR is coming soon!
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to