diff --git a/releasenotes/notes/dont-deepcopy-components-tools-b1be7ef7b4365116.yaml b/releasenotes/notes/dont-deepcopy-components-tools-b1be7ef7b4365116.yaml index 2cda6b584..ec6b8507b 100644 --- a/releasenotes/notes/dont-deepcopy-components-tools-b1be7ef7b4365116.yaml +++ b/releasenotes/notes/dont-deepcopy-components-tools-b1be7ef7b4365116.yaml @@ -1,7 +1,7 @@ --- enhancements: - | - Updated pipeline execution logic to use a new utility method `deepcopy_with_fallback`, - which skips deep-copying of `Component`, `Tool`, and `Toolset` instances when used as - runtime parameters. This prevents errors and unintended behavior caused by trying to - deepcopy objects that contain non-copyable attributes (e.g. Jinja2 templates, clients). + Updated pipeline execution logic to use a new utility method `_deepcopy_with_exceptions`, which attempts to deep copy an object and safely falls back to the original object if copying fails. + Additionally `_deepcopy_with_exceptions` skips deep-copying of `Component`, `Tool`, and `Toolset` instances when used as runtime parameters. + This prevents errors and unintended behavior caused by trying to deepcopy objects that contain non-copyable attributes (e.g. Jinja2 templates, clients). + Previously, standard `deepcopy` was used on inputs and outputs which occasionally lead to errors since certain Python objects cannot be deepcopied. diff --git a/releasenotes/notes/fix-deepcopy-in-pipeline-run-2b575c7b860f642f.yaml b/releasenotes/notes/fix-deepcopy-in-pipeline-run-2b575c7b860f642f.yaml deleted file mode 100644 index 315766c0b..000000000 --- a/releasenotes/notes/fix-deepcopy-in-pipeline-run-2b575c7b860f642f.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Introduced `deepcopy_with_fallback` to improve robustness in the `Pipeline.run` method. - Previously, standard `deepcopy` was used on inputs and outputs to avoid unintended side effects from shared mutable data structures, as these values are accessed in multiple parts of the pipeline. However, certain Python objects cannot be deepcopied, which could lead to runtime errors. - The new `deepcopy_with_fallback` function attempts to deep copy an object and safely falls back to the original object if copying fails. This ensures pipeline execution remains stable while maintaining the protective behavior against shared-state modification.