Build: #72 failed

Job: Test ManyLinux 2.28 Python 3.12 failed

Stages & jobs

  1. Test

2022 1 00207 s uid a001 x2d20 x373d PPr regression: Test case result

The below summarizes the result of the test " 2022 1 00207 s uid a001 x2d20 x373d PPr regression" in build 72 of PIPESPECS - Test Pipeline main with Casa master - Test ManyLinux 2.28 Python 3.12.
Description
2022 1 00207 s uid a001 x2d20 x373d PPr regression
Test class
tests.regression.fast.alma_if_fast_test
Method
test_2022_1_00207_S__uid___A001_X2d20_X373d__PPR__regression
Duration
34 mins
Status
Failed (New Failure)

Error Log

pipeline.infrastructure.exceptions.PipelineException: Traceback (most recent call last):
  File "/lustre/cv/sw/casa/casaci/cvpost128/bamboohome/xml-data/build-dir/PIPESPECS-TESTPIPEMAINCASAMASTER-ML228PY312TEST/casa-build-utils/pipeline/workdir/pipeline/pipeline/infrastructure/executeppr.py", line 280, in executeppr
    results = pipeline_task(**task_args)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lustre/cv/sw/casa/casaci/cvpost128/bamboohome/xml-data/build-dir/PIPESPECS-TESTPIPEMAINCASAMASTER-ML228PY312TEST/casa-build-utils/pipeline/workdir/pipeline/pipeline/h/cli/utils.py", line 83, in wrapper
    results = execute_task(context, task_name, all_inputs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lustre/cv/sw/casa/casaci/cvpost128/bamboohome/xml-data/build-dir/PIPESPECS-TESTPIPEMAINCASAMASTER-ML228PY312TEST/casa-build-utils/pipeline/workdir/pipeline/pipeline/h/cli/utils.py", line 165, in execute_task
    raise exceptions.PipelineException(previous_tracebacks_as_string)
pipeline.infrastructure.exceptions.PipelineException: Online flux catalog unavailable; fell back to local Source.xml fluxes. Stopping after weblog export.
@pytest.mark.seven
    @pytest.mark.mpi
    def test_2022_1_00207_S__uid___A001_X2d20_X373d__PPR__regression():
        """Run ALMA polcal+image regression on a multi-EB 7m test dataset with a PPR file.
    
        PPR:                        pl-regressiontest/2022.1.00207.S/PPR.xml
        Project:                    2022.1.00207.S
        MOUS:                       uid___A001_X2d20_X373d
        EBs:                        uid___A002_X10b6f7c_X41d1
                                    uid___A002_X10b6f7c_X46cc
        """
        ref_directory = 'pl-regressiontest/2022.1.00207.S'
    
        pt = PipelineTester(
            visname=['uid___A002_X10b6f7c_X41d1',
                     'uid___A002_X10b6f7c_X46cc'],
            ppr=f"{ref_directory}/PPR.xml",
            input_dir=ref_directory,
            expectedoutput_dir=ref_directory,
            )
    
>       pt.run()

tests/regression/fast/alma_if_fast_test.py:123: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/testing_utils.py:335: in run
    self.__run_ppr(input_vis, telescope)
tests/testing_utils.py:523: in __run_ppr
    executeppr.executeppr(ppr_local, importonly=False)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pprXmlFile = '../PPR.xml', importonly = False, breakpoint = 'breakpoint'
bpaction = 'ignore', loglevel = 'info', plotlevel = 'default'
interactive = True

    def executeppr(pprXmlFile: str, importonly: bool = True, breakpoint: str = 'breakpoint', bpaction: str = 'ignore',
                   loglevel: str = 'info', plotlevel: str = 'default', interactive: bool = True) -> None:
        """
        Runs Pipeline Processing Request (PPR).
    
        Executes pipeline tasks based on instructions described in pprXmlFile.
    
        Args:
            pprXmlFile: A path to PPR file.
            importonly: Whether or not to indicate to stop processing after
                importing data. If True, execution of PPR stops after
                h*_importdata stage. The parameter has no effect if there is no
                h*_importdata stage in PPR.
            breakpoint: A name of command that should be considered as a break point.
            bpaction: An action to be taken at the breakpoint.
                Available actions are,
                'ignore': ignores breakpoint in pprXmlFile.
                'break': stop execution at the breakpoint in pprXmlFile.
                'resume': resume the last context and restart processing after the
                    breakpoint in pprXmlFile.
            loglevel: A logging level. Available levels are, 'critical', 'error',
                'warning', 'info', 'debug', 'todo', and 'trace'.
            plotlevel: A plot level. Available levels are, 'all', 'default', and
                'summary'
            interactive: If True, print pipeline log to STDOUT.
    
        Examples:
           Only import EBs.
           >>> executeppr('PPR_uid___A001_X14c3_X1dd.xml')
    
           Full execution of PPR.
           >>> executeppr('PPR_uid___A001_X14c3_X1dd.xml', importonly=False)
    
           Run pipeline tasks up to the 'breakpoint' in PPR and save context.
           >>> executeppr('PPR_uid___A001_X14c3_X1dd.xml', importonly=False, bpaction='break')
    
           Resume execution from the 'breakpoint' in PPR.
           >>> executeppr('PPR_uid___A001_X14c3_X1dd.xml', importonly=False, bpaction='resume')
        """
        # save existing context to disk
        save_existing_context()
    
        # Useful mode parameters
        echo_to_screen = interactive
        workingDir = None
    
        try:
            # Decode the processing request
            casa_tools.post_to_log("Analyzing pipeline processing request ...", echo_to_screen=echo_to_screen)
            info, structure, relativePath, intentsDict, asdmList, procedureName, commandsList = \
                _getFirstRequest(pprXmlFile)
            processing_intents = _getProcessingIntents(intentsDict, procedureName)
    
            # Set the directories
            if 'SCIPIPE_ROOTDIR' in os.environ:
                workingDir = os.path.join(os.path.expandvars('$SCIPIPE_ROOTDIR'), relativePath, 'working')
                rawDir = os.path.join(os.path.expandvars('$SCIPIPE_ROOTDIR'), relativePath, 'rawdata')
            else:
                # PIPE-2093: if $SCIPIPE_ROOTDIR doesn't exist, we likely run in a local dev/test environment.
                # Then we will override the typical production workingDir/rawDIR values that are traditionally
                # constructed from $SCIPIPE_ROOTDIR and the PPR <RelativePath> field. Note that we assume that
                # any executeppr call here happens inside the "working/" directory.
                workingDir = os.path.abspath(os.path.join('..', 'working'))
                rawDir = os.path.abspath(os.path.join('..', 'rawdata'))
    
            # Check for the breakpoint
            bpset = False
            if breakpoint != '':
                for command in commandsList:
                    if command[0] == breakpoint:
                        casa_tools.post_to_log("    Found break point: " + breakpoint, echo_to_screen=echo_to_screen)
                        casa_tools.post_to_log("    Break point action is: " + bpaction, echo_to_screen=echo_to_screen)
                        bpset = True
                        break
    
            # Get the pipeline context
            #     Resumes from the last context. Consider adding name
            if bpset and bpaction == 'resume':
                context = cli.h_resume(filename='last')
                context.processing_intents.update(processing_intents)
                casa_tools.post_to_log("    Resuming from last context", echo_to_screen=echo_to_screen)
            else:
                context = cli.h_init(loglevel=loglevel, plotlevel=plotlevel, processing_intents=processing_intents)
                casa_tools.post_to_log("    Creating new pipeline context", echo_to_screen=echo_to_screen)
    
        except Exception:
            casa_tools.post_to_log("Beginning pipeline run ...", echo_to_screen=echo_to_screen)
            casa_tools.post_to_log("For processing request: " + pprXmlFile, echo_to_screen=echo_to_screen)
            traceback.print_exc(file=sys.stdout)
            errstr = traceback.format_exc()
            casa_tools.post_to_log(errstr, echo_to_screen=echo_to_screen)
            casa_tools.post_to_log("Terminating procedure execution ...", echo_to_screen=echo_to_screen)
            errorfile = utils.write_errorexit_file(workingDir, 'errorexit', 'txt')
            return
    
        # Request decoded, starting run.
        casa_tools.post_to_log("Beginning pipeline run ...", echo_to_screen=echo_to_screen)
        casa_tools.post_to_log("For processing request: " + pprXmlFile, echo_to_screen=echo_to_screen)
    
        # Check for common error conditions.
        if relativePath == "":
            casa_tools.post_to_log("    Undefined relative data path", echo_to_screen=echo_to_screen)
            casa_tools.post_to_log("Terminating pipeline execution ...", echo_to_screen=echo_to_screen)
            errorfile = utils.write_errorexit_file(workingDir, 'errorexit', 'txt')
            return
        elif len(asdmList) < 1:
            casa_tools.post_to_log("    Empty ASDM list", echo_to_screen=echo_to_screen)
            casa_tools.post_to_log("Terminating pipeline execution ...", echo_to_screen=echo_to_screen)
            errorfile = utils.write_errorexit_file(workingDir, 'errorexit', 'txt')
            return
        elif len(commandsList) < 1:
            casa_tools.post_to_log("    Empty commands list", echo_to_screen=echo_to_screen)
            casa_tools.post_to_log("Terminating pipeline execution ...", echo_to_screen=echo_to_screen)
            errorfile = utils.write_errorexit_file(workingDir, 'errorexit', 'txt')
            return
    
        # List project summary information
        casa_tools.post_to_log("Project summary", echo_to_screen=echo_to_screen)
        for item in info:
            casa_tools.post_to_log("    " + item[1][0] + item[1][1], echo_to_screen=echo_to_screen)
        ds = dict(info)
        context.project_summary = project.ProjectSummary(
            proposal_code=ds['proposal_code'][1],
            proposal_title='unknown',
            piname='unknown',
            observatory=ds['observatory'][1],
            telescope=ds['telescope'][1])
    
        # List project structure information
        casa_tools.post_to_log("Project structure", echo_to_screen=echo_to_screen)
        for item in structure:
            casa_tools.post_to_log("    " + item[1][0] + item[1][1], echo_to_screen=echo_to_screen)
        ds = dict(structure)
        context.project_structure = project.ProjectStructure(
            ous_entity_id=ds['ous_entity_id'][1],
            ous_part_id=ds['ous_part_id'][1],
            ous_title=ds['ous_title'][1],
            ous_type=ds['ous_type'][1],
            ps_entity_id=ds['ps_entity_id'][1],
            ousstatus_entity_id=ds['ousstatus_entity_id'][1],
            ppr_file=pprXmlFile,
            recipe_name=procedureName)
    
        # Create performance parameters object
        context.project_performance_parameters = _getPerformanceParameters(intentsDict)
    
        # Get the session info from the intents dictionary
        if len(intentsDict) > 0:
            sessionsDict = _getSessions(intentsDict)
        else:
            sessionsDict = {}
    
        # Print the relative path
        casa_tools.post_to_log("Directory structure", echo_to_screen=echo_to_screen)
        casa_tools.post_to_log("    Working directory: " + workingDir, echo_to_screen=echo_to_screen)
        casa_tools.post_to_log("    Raw data directory: " + rawDir, echo_to_screen=echo_to_screen)
    
        # Construct the ASDM list
        casa_tools.post_to_log("Number of ASDMs: " + str(len(asdmList)), echo_to_screen=echo_to_screen)
        files = []
        sessions = []
        defsession = 'session_1'
        for asdm in asdmList:
            session = defsession
    
            for key, value in sessionsDict.items():
                if filenamer.sanitize_for_ms(asdm[1]) in value:
                    session = key.lower()
                    break
    
            sessions.append(session)
            files.append(os.path.join(rawDir, asdm[1]))
            casa_tools.post_to_log("    Session: " + session + "  ASDM: " + asdm[1], echo_to_screen=echo_to_screen)
    
        # Paths for all these ASDM should be the same
        #     Add check for this ?
    
        # Beginning execution
        casa_tools.post_to_log("\nStarting procedure execution ...\n", echo_to_screen=echo_to_screen)
        casa_tools.post_to_log("Procedure name: " + procedureName + "\n", echo_to_screen=echo_to_screen)
    
        # Names of import tasks that need special treatment:
        import_tasks = ('h_importdata', 'hifa_importdata', 'hifv_importdata',
                        'hsd_importdata', 'hsdn_importdata')
        restore_tasks = ('h_restoredata', 'hifa_restoredata', 'hifv_restoredata',
                         'hsd_restoredata')
        restore_tasks_no_session = ('hsdn_restoredata',)
    
        # Loop over the commands
        errstr = ''
        foundbp = False
        tracebacks = []
        results = None
        for command in commandsList:
    
            # Get task name and arguments lists.
            pipeline_task_name = command[0]
            task_args = command[1]
            casa_tools.set_log_origin(fromwhere=pipeline_task_name)
    
            # Handle break point if one is set
            if bpset:
                # Found the break point
                #    Set the found flag
                #    Ignore it  or
                #    Break the loop or
                #    Resume execution
                if pipeline_task_name == breakpoint:
                    foundbp = True
                    if bpaction == 'ignore':
                        casa_tools.post_to_log("Ignoring breakpoint " + pipeline_task_name, echo_to_screen=echo_to_screen)
                        continue
                    elif bpaction == 'break':
                        casa_tools.post_to_log("Terminating execution at breakpoint " + pipeline_task_name,
                                               echo_to_screen=echo_to_screen)
                        break
                    elif bpaction == 'resume':
                        casa_tools.post_to_log("Resuming execution after breakpoint " + pipeline_task_name,
                                               echo_to_screen=echo_to_screen)
                        continue
                # Not the break point so check the resume case
                elif not foundbp and bpaction == 'resume':
                    casa_tools.post_to_log("Skipping task " + pipeline_task_name, echo_to_screen=echo_to_screen)
                    continue
    
            # Execute the command
            casa_tools.post_to_log("Executing command ..." + pipeline_task_name, echo_to_screen=echo_to_screen)
            try:
                pipeline_task = cli.get_pipeline_task_with_name(pipeline_task_name)
    
                # List parameters
                for keyword, value in task_args.items():
                    casa_tools.post_to_log("    Parameter: " + keyword + " = " + repr(value), echo_to_screen=echo_to_screen)
    
                # For import/restore tasks, set vis and session explicitly (not inferred from context).
                if pipeline_task_name in import_tasks or pipeline_task_name in restore_tasks:
                    task_args['vis'] = files
                    task_args['session'] = sessions
                elif pipeline_task_name in restore_tasks_no_session:
                    task_args['vis'] = files
    
                results = pipeline_task(**task_args)
                casa_tools.post_to_log('Results ' + str(results), echo_to_screen=echo_to_screen)
    
                if importonly and pipeline_task_name in import_tasks:
                    casa_tools.post_to_log("Terminating execution after running " + pipeline_task_name,
                                           echo_to_screen=echo_to_screen)
                    break
    
            except Exception:
                # Log message if an exception occurred that was not handled by
                # standardtask template (not turned into failed task result).
                casa_tools.post_to_log("Unhandled error in executeppr while running pipeline task {}"
                                       "".format(pipeline_task_name), echo_to_screen=echo_to_screen)
                errstr = traceback.format_exc()
                casa_tools.post_to_log(errstr, echo_to_screen=echo_to_screen)
    
            # Check whether any exceptions were raised either during the task
            # (shown as traceback in task results) or after the task during results
            # acceptance.
            if results:
                tracebacks.extend(utils.get_tracebacks(results))
            if errstr:
                tracebacks.append(errstr)
            # If we have a traceback from an exception, then create local error
            # exit file, and export both error file and weblog to the products
            # directory.
            if len(tracebacks) > 0:
                errorfile = utils.write_errorexit_file(workingDir, 'errorexit', 'txt')
                export_on_exception(context, errorfile)
    
                # Save the context
                cli.h_save()
                casa_tools.post_to_log("Terminating procedure execution ...", echo_to_screen=echo_to_screen)
                casa_tools.set_log_origin(fromwhere='')
    
                previous_tracebacks_as_string = "{}".format("\n".join([tb for tb in tracebacks]))
>               raise exceptions.PipelineException(previous_tracebacks_as_string)
E               pipeline.infrastructure.exceptions.PipelineException: Traceback (most recent call last):
E                 File "/lustre/cv/sw/casa/casaci/cvpost128/bamboohome/xml-data/build-dir/PIPESPECS-TESTPIPEMAINCASAMASTER-ML228PY312TEST/casa-build-utils/pipeline/workdir/pipeline/pipeline/infrastructure/executeppr.py", line 280, in executeppr
E                   results = pipeline_task(**task_args)
E                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
E                 File "/lustre/cv/sw/casa/casaci/cvpost128/bamboohome/xml-data/build-dir/PIPESPECS-TESTPIPEMAINCASAMASTER-ML228PY312TEST/casa-build-utils/pipeline/workdir/pipeline/pipeline/h/cli/utils.py", line 83, in wrapper
E                   results = execute_task(context, task_name, all_inputs)
E                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E                 File "/lustre/cv/sw/casa/casaci/cvpost128/bamboohome/xml-data/build-dir/PIPESPECS-TESTPIPEMAINCASAMASTER-ML228PY312TEST/casa-build-utils/pipeline/workdir/pipeline/pipeline/h/cli/utils.py", line 165, in execute_task
E                   raise exceptions.PipelineException(previous_tracebacks_as_string)
E               pipeline.infrastructure.exceptions.PipelineException: Online flux catalog unavailable; fell back to local Source.xml fluxes. Stopping after weblog export.

pipeline/infrastructure/executeppr.py:316: PipelineException