Repository navigation
fix(cli): stop uipath push from deleting the remote project.uiproj - #1980
Open
vldcmp-uipath wants to merge 3 commits into
Open
vldcmp-uipath wants to merge 3 commits into
vldcmp-uipath wants to merge 3 commits into
Conversation
Studio Web creates project.uiproj with every project. `uipath push` never includes it in the local upload set (the .uiproj extension is not a packed extension), so the deletion pass treated the remote copy as an orphan and removed it on every push. Add it to the deletion ignore list next to studio_metadata.json and cover the behaviour with a regression test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014t9fy5hvBnH5DbBSbfoMBR
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014t9fy5hvBnH5DbBSbfoMBR
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The negative test uses a Function fixture that validation explicitly accepts without package.json, so the expected rejection never occurs and the test fails; keep the fixture as Agent.
1 open issue
What changed in this PR
This PR protects Studio Web’s project.uiproj during uipath push, while preserving deletion of genuinely orphaned remote files.
Changes:
- Adds
project.uiprojto the deletion ignore list without changing upload or packaging behavior. - Adds a regression test verifying that push preserves the project file while deleting a stale remote file.
- Changes the mocked project type in an existing validation test.
| File | Description |
|---|---|
packages/uipath/tests/cli/test_push.py |
Adds preservation coverage and modifies an existing validation fixture. |
packages/uipath/src/uipath/_cli/_push/sw_file_handler.py |
Excludes project.uiproj from remote-file deletion. |
Review effort: Balanced
…ject A search-and-replace meant for the new project.uiproj test also rewrote this test's project type to Function, which ensure_coded_project accepts, so the negative test no longer exercised rejection. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014t9fy5hvBnH5DbBSbfoMBR
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Details
uipath pushdeletedproject.uiprojfrom the Studio Web project on every run. Studio Web creates that file with every project and its packagers read it, so each push left the project without it.Cause. The upload set comes from
files_to_include, which picks files by extension or an explicit include list..uiprojis in neither, soproject.uiprojis never uploaded. The deletion pass then saw a remote file with no local match and removed it.Fix.
project.uiprojis now on the deletion ignore list inSwFileHandler, next tostudio_metadata.json. Genuinely orphaned remote files are still deleted.🤖 Generated with Claude Code
https://claude.ai/code/session_014t9fy5hvBnH5DbBSbfoMBR