Exemplo n.º 1
0
def fetch_failure_info(stage_index, pipeline_counter, pipeline_name, stage_id, stage_name, job_name):
    log_parser = get_log_parser(pipeline_name)

    failure_stage = get_failure_stage(pipeline_name, pipeline_counter, stage_index, stage_name, job_name)
    get_connection().insert_failure_information(stage_id, failure_stage)

    failures = log_parser(pipeline_name, pipeline_counter, stage_index, stage_name, job_name)
    failures.insert_info(stage_id)
Exemplo n.º 2
0
 def sync_failure_info(self, pipeline_counter, pipeline_name,
                       stage_id, stage_name, stage_counter, job_name):
     """
     Store failure information from go-server for a given job,
     as extracted from its log parser.
     """
     try:
         log_parser_class = get_log_parser(pipeline_name)
         log_parser = log_parser_class(pipeline_name, pipeline_counter, stage_counter, stage_name, job_name)
         failure_stage = log_parser.get_failure_stage()
         self.db.insert_failure_information(stage_id, failure_stage)
         log_parser.insert_info(stage_id)
     except LookupError as error:
         print("Failed to sync failure info for {}/{}/{}/{}/{}: {}".format(
             pipeline_counter, pipeline_name, stage_name, stage_counter, job_name, error)
         )
Exemplo n.º 3
0
 def sync_failure_info(self, pipeline_counter, pipeline_name, stage_id,
                       stage_name, stage_counter, job_name):
     """
     Store failure information from go-server for a given job,
     as extracted from its log parser.
     """
     try:
         log_parser_class = get_log_parser(pipeline_name)
         log_parser = log_parser_class(pipeline_name, pipeline_counter,
                                       stage_counter, stage_name, job_name)
         failure_stage = log_parser.get_failure_stage()
         self.db.insert_failure_information(stage_id, failure_stage)
         log_parser.insert_info(stage_id)
     except LookupError as error:
         print("Failed to sync failure info for {}/{}/{}/{}/{}: {}".format(
             pipeline_counter, pipeline_name, stage_name, stage_counter,
             job_name, error))
Exemplo n.º 4
0
def get_failure_stage(pipeline_name, pipeline_id, stage, stage_name, job_name):
    log_parser_class = get_log_parser(pipeline_name)
    log_parser = log_parser_class(pipeline_name, pipeline_id, stage, stage_name, job_name)
    return log_parser.get_failure_stage()
Exemplo n.º 5
0
def get_failure_stage(pipeline_name, pipeline_id, stage, stage_name, job_name):
    log_parser_class = get_log_parser(pipeline_name)
    log_parser = log_parser_class(pipeline_name, pipeline_id, stage,
                                  stage_name, job_name)
    return log_parser.get_failure_stage()