From 6c5dd0e3e7ed8e39d3c55265f6e459045b405676 Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Fri, 8 Nov 2024 22:16:33 +0530 Subject: [PATCH] Add docs for on_failure Signed-off-by: Keshav Priyadarshi --- docs/source/tutorial_add_importer_pipeline.rst | 6 +++++- docs/source/tutorial_add_improver_pipeline.rst | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/source/tutorial_add_importer_pipeline.rst b/docs/source/tutorial_add_importer_pipeline.rst index 8b9bf0e89..3f5b6b785 100644 --- a/docs/source/tutorial_add_importer_pipeline.rst +++ b/docs/source/tutorial_add_importer_pipeline.rst @@ -298,10 +298,14 @@ version management from `univers `_. **advisories_count** should never be directly added in steps. +.. attention:: + + Implement ``on_failure`` to handle cleanup in case of pipeline failure. + Cleanup of downloaded archives or cloned repos is necessary to avoid potential resource leakage. .. note:: - | Use ``make valid`` to format your code using black and isort automatically. + | Use ``make valid`` to format your new code using black and isort automatically. | Use ``make check`` to check for formatting errors. Register the Importer Pipeline diff --git a/docs/source/tutorial_add_improver_pipeline.rst b/docs/source/tutorial_add_improver_pipeline.rst index 6c8d90d25..feed3556b 100644 --- a/docs/source/tutorial_add_improver_pipeline.rst +++ b/docs/source/tutorial_add_improver_pipeline.rst @@ -187,6 +187,11 @@ methods. self.log(f"Successfully flagged {ghost_package_count:,d} ghost Packages") +.. attention:: + + Implement ``on_failure`` to handle cleanup in case of pipeline failure. + Cleanup of downloaded archives or cloned repos is necessary to avoid potential resource leakage. + .. note:: | Use ``make valid`` to format your new code using black and isort automatically.