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 2020/06/01 11:42:56 UTC

[GitHub] [incubator-mxnet-ci] mseth10 commented on a change in pull request #26: Update latest build selection and log when one build fails

mseth10 commented on a change in pull request #26:
URL: https://github.com/apache/incubator-mxnet-ci/pull/26#discussion_r433186961



##########
File path: services/jenkins-pipeline-monitor/handler.py
##########
@@ -78,20 +86,53 @@ def get_release_job_type(build):
     return build.get_params()['RELEASE_JOB_TYPE']
 
 
-def filter_by_desired_release_job_type(latest_day_builds, desired_release_job_type):
+def filter_by_release_job_type(latest_day_builds):
     filtered_builds = []
     for build in latest_day_builds:
-        if get_release_job_type(build) in desired_release_job_type:
+        if get_release_job_type(build) in release_job_type:
             filtered_builds.append(build)
     return filtered_builds
 
 
 def status_check(builds):
+    """
+    Check the status of the filtered builds
+    i.e. Check if all the required release job types are present in the pipeline
+    If there is not a single build from the list of desired release job types, log the failures
+    else check the status via Jenkins API and report accordingly
+    :param builds
+    """
+    # dictionary of the type release_job_type: count
+    # e.g. {'mxnet_lib/static':0, 'python/pypi':0}
+    global release_job_type
+    success_count = 0
+    release_job_type_dict = {el : 0 for el in release_job_type}
+
+    # iterate over the builds to count number of the desirect release job types
     for build in builds:
-        if build.get_status() == 'SUCCESS':
-            logging.info(f'Successful build {get_release_job_type(build)} {build.get_number()}')
+        build_release_job_type = get_release_job_type(build)
+        if build_release_job_type in release_job_type_dict:

Review comment:
       isn't this always true?




----------------------------------------------------------------
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:
users@infra.apache.org