askap-vast / vast-pipeline

This repository holds the code of the Radio Transient detection pipeline for the VAST project.
https://vast-survey.org/vast-pipeline/
MIT License
8 stars 3 forks source link

Fixed UI re-run from errored status #576

Closed ajstewart closed 2 years ago

ajstewart commented 3 years ago

Fixes #575. Fixes #578.

For example, before I applied the fix, the original error is now reported in the log and the pipeline run is set to Error status instead of being left hanging.

2021-09-08 12:44:51,354 runpipeline DEBUG Copying temp config file.
2021-09-08 12:44:51,414 runpipeline DEBUG config_prev.yaml exists: False
2021-09-08 12:44:51,414 runpipeline DEBUG Full re-run: False
2021-09-08 12:44:51,416 runpipeline ERROR Unexpected error occurred in pre-run steps!
2021-09-08 12:44:51,434 runpipeline ERROR Processing error:
[Errno 2] No such file or directory: '/Users/adam/GitHub/vast-pipeline/pipeline-runs/test-data-ui/config_prev.yaml'
Traceback (most recent call last):
  File "/Users/adam/GitHub/vast-pipeline/vast_pipeline/management/commands/runpipeline.py", line 228, in run_pipe
    config_diff = pipeline.config.check_prev_config_diff()
  File "/Users/adam/GitHub/vast-pipeline/vast_pipeline/pipeline/config.py", line 522, in check_prev_config_diff
    label="previous run config",
  File "/Users/adam/GitHub/vast-pipeline/vast_pipeline/pipeline/config.py", line 254, in from_file
    with open(yaml_path) as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/adam/GitHub/vast-pipeline/pipeline-runs/test-data-ui/config_prev.yaml'