Skip to content

Commit f757e60

Browse files
committed
Add docs for on_failure
Signed-off-by: Keshav Priyadarshi <[email protected]>
1 parent a566e87 commit f757e60

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

docs/source/tutorial_add_importer_pipeline.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,14 @@ version management from `univers <https://github.com/aboutcode-org/univers>`_.
298298
**advisories_count** should never be directly added in steps.
299299

300300

301+
.. attention::
302+
303+
Implement ``on_failure`` to handle cleanup in case of pipeline failure.
304+
Cleanup of downloaded archives or cloned repos is necessary to avoid potential resource leakage.
301305

302306
.. note::
303307

304-
| Use ``make valid`` to format your code using black and isort automatically.
308+
| Use ``make valid`` to format your new code using black and isort automatically.
305309
| Use ``make check`` to check for formatting errors.
306310
307311
Register the Importer Pipeline

docs/source/tutorial_add_improver_pipeline.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ methods.
187187
self.log(f"Successfully flagged {ghost_package_count:,d} ghost Packages")
188188
189189
190+
.. attention::
191+
192+
Implement ``on_failure`` to handle cleanup in case of pipeline failure.
193+
Cleanup of downloaded archives or cloned repos is necessary to avoid potential resource leakage.
194+
190195
.. note::
191196

192197
| Use ``make valid`` to format your new code using black and isort automatically.

vulnerabilities/pipelines/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class VulnerableCodeBaseImporterPipeline(VulnerableCodePipeline):
104104
Base importer pipeline for importing advisories.
105105
106106
Uses:
107-
Subclass this Pipeline and implement ``advisories_count`` and ``collect_advisories`` method.
108-
Also override the ``steps`` and ``advisory_confidence`` as needed.
107+
Subclass this Pipeline and implement ``advisories_count`` and ``collect_advisories``
108+
method. Also override the ``steps`` and ``advisory_confidence`` as needed.
109109
"""
110110

111111
pipeline_id = None # Unique Pipeline ID, this should be the name of pipeline module.

0 commit comments

Comments
 (0)