Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the initial input data of an execution run could be mutated during runtime execution. The fix adds a .copy() call to create a copy of the input data before passing it to the execution runtime.
Changes:
- Version bumped from 0.0.17 to 0.0.18 to reflect the bug fix
- Added
.copy()torun.input_datain the execute method to preserve the original input data
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Updated package version from 0.0.17 to 0.0.18 |
| uv.lock | Updated package version from 0.0.17 to 0.0.18 in lock file |
| src/uipath/dev/services/run_service.py | Added .copy() to preserve initial input data before passing to runtime |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self._add_info_log(run, f"Resuming execution: {run.entrypoint}") | ||
| else: | ||
| execution_input = run.input_data | ||
| execution_input = run.input_data.copy() |
There was a problem hiding this comment.
Using a shallow copy with .copy() may not fully preserve the initial input if it contains nested mutable structures (lists, dictionaries). If the runtime modifies nested objects within the input, those changes would still affect the original run.input_data. Consider using copy.deepcopy() instead to ensure complete isolation of the input data, or verify that the runtime never modifies nested structures.
No description provided.