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

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

                Author: ASF GitHub Bot
            Created on: 01/Dec/20 00:35
            Start Date: 01/Dec/20 00:35
    Worklog Time Spent: 10m 
      Work Description: y1chi commented on a change in pull request #13399:
URL: https://github.com/apache/beam/pull/13399#discussion_r532995065



##########
File path: sdks/python/apache_beam/runners/portability/sdk_container_builder.py
##########
@@ -236,10 +235,21 @@ def invoke_docker_build_and_push(self, 
container_image_name):
     build.timeout = Duration().FromSeconds(seconds=1800)
 
     now = time.time()
-    _LOGGER.info('Building sdk container, this may take a few minutes...')
+    _LOGGER.info(
+        'Building sdk container with google cloud build, this may '
+        'take a few minutes...')
     operation = client.create_build(project_id=project_id, build=build)
     # if build fails exception will be raised and stops the job submission.
-    result = operation.result()
+    try:
+      result = operation.result()
+    except Exception as e:
+      build_lists = client.list_builds(

Review comment:
       get_build requires a build id that is not returned from calling 
client.create_build(), this may be a usability issue from the python client but 
I didn't find any thing simpler




----------------------------------------------------------------
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: 518200)
    Time Spent: 2h 10m  (was: 2h)

> When prebuilding workflow on CloudBuild fails, we should tell the user where 
> to look for build logs, ideally a link, or a pointer where the build logs are.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-11312
>                 URL: https://issues.apache.org/jira/browse/BEAM-11312
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Yichi Zhang
>            Priority: P2
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Current error does not have context:
> ...
> /apache_beam/runners/portability/sdk_container_builder.py", line 242, in 
> invoke_docker_build_and_push                                           
>     result = operation.result()                                               
>                     File 
> "/usr/local/google/home/valentyn/.pyenv/versions/py37prebuild/lib/python3.7/site-packages/google/api_core/future/polling.py",
>  line 134, in result
>     raise self._exception                                                     
>                   google.api_core.exceptions.Unknown: None Build failed; 
> check build logs for details



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to