Skip to content

Improve failed pipeline handling, fix config and fix logger backup - #15

Open
jlegrand62 wants to merge 4 commits into
devfrom
hotfix/romi_run_task
Open

Improve failed pipeline handling, fix config and fix logger backup#15
jlegrand62 wants to merge 4 commits into
devfrom
hotfix/romi_run_task

Conversation

@jlegrand62

Copy link
Copy Markdown
Member
  • Change subprocess.run(..., check=True) to check=False, handle non‑zero return codes manually, and archive the temporary working directory to a *_failed folder when a task fails.
  • After a successful run, move the temporary logging configuration file and the backup TOML files (scan.toml or pipeline.toml) into the created dataset directory, overwriting existing files and logging any errors.
  • Refine backup config generation to filter out only None values (if param is not None) instead of all falsy values, preserving valid falsy parameters.
  • Fix indentation on the local_config update line for consistency.

- Update `romi_run_task.py` to filter out parameters with `None` (`if param is not None`) instead of all falsy values when building `compat_cfg`. This fix the replacement by their default value of any falsy parameter.
…task execution

- Introduce `logfile_path` to hold the temporary log file path and pass it to `get_logging_config`.
- Update `get_logging_config` call to use the new `logfile_path` variable.
- After a successful subprocess run, copy `logging.cfg` and the backup configuration (`scan.toml` or `pipeline.toml`) into the created dataset directory, overwriting any existing files and logging errors if moves fail.
- Fix indentation on the `local_config` update line for consistency.
- Change `subprocess.run(..., check=True)` to `check=False` and add comment to manage failures manually.
- Remove the previous block that moved temporary logging config and backup TOML files to the dataset after a successful run.
- On non‑zero return code, copy the temporary working directory (`tmpd`) to a new `*_failed` directory (`failed_tmp_workdir`) and log the action.
@jlegrand62 jlegrand62 self-assigned this Jul 29, 2026
@jlegrand62 jlegrand62 added the bug Something isn't working label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant