You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/11/27 23:07:18 UTC

[GitHub] KellenSunderland closed pull request #13425: Be more explicit about the exit status of the container

KellenSunderland closed pull request #13425: Be more explicit about the exit status of the container
URL: https://github.com/apache/incubator-mxnet/pull/13425
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ci/build.py b/ci/build.py
index 628f49e706c..acf277dd2c3 100755
--- a/ci/build.py
+++ b/ci/build.py
@@ -326,6 +326,10 @@ def container_run(platform: str,
                 wait_result = container.wait(timeout=container_wait_s)
                 logging.info("Container exit status: %s", wait_result)
                 ret = wait_result.get('StatusCode', 200)
+                if ret != 0:
+                    logging.error("Container exited with an error 😞")
+                else:
+                    logging.info("Container exited with success 👍")
             except Exception as e:
                 logging.exception(e)
                 ret = 150
@@ -384,11 +388,15 @@ def script_name() -> str:
     """:returns: script name with leading paths removed"""
     return os.path.split(sys.argv[0])[1]
 
-
-def main() -> int:
+def config_logging():
+    import time
     logging.getLogger().setLevel(logging.INFO)
     logging.getLogger("requests").setLevel(logging.WARNING)
-    logging.basicConfig(format='{}: %(asctime)-15s %(message)s'.format(script_name()))
+    logging.basicConfig(format='{}: %(asctime)sZ %(levelname)s %(message)s'.format(script_name()))
+    logging.Formatter.converter = time.gmtime
+
+def main() -> int:
+    config_logging()
 
     logging.info("MXNet container based build tool.")
     log_environment()


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services