Skip to content

Commit

Permalink
Add some logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Lewi committed Jun 15, 2020
1 parent 5c5cf7b commit 07a74af
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions py/kubeflow/testing/tekton_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
from multiprocessing import Pool
import re
import traceback
from xml.etree import ElementTree as ET
import yaml

Expand Down Expand Up @@ -245,7 +246,8 @@ def run(self):
logging.error("Could not create workflow: %s", e)
raise

self.name = result.metadata["name"]
self.name = result.get("metadata", {}).get("name")
logging.info("Submitted Tekton Pipeline %s.%s", self.namespace, self.name)
return result

def append_teardown(self, runner):
Expand Down Expand Up @@ -317,7 +319,8 @@ def run(self, tekton_cluster_info, current_cluster_info):
urls[w.teardown_runner.name] = w.teardown_runner.ui_url
logging.info("URL for workflow: %s", w.ui_url)
except Exception as e: # pylint: disable=broad-except
logging.error("Error when starting Tekton workflow: %s", e)
logging.error("Error when starting Tekton workflow: %s;\nstacktrace:\n%s",
e, traceback.format_exc())
finally:
# Restore kubectl
util.configure_kubectl(current_cluster_info.project,
Expand Down

0 comments on commit 07a74af

Please sign in to comment.