[PR #540] [MERGED] Followup fixes for uv dependencies #537

Closed
opened 2026-02-16 02:15:32 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/llama_deploy/pull/540
Author: @adrianlyjak
Created: 6/16/2025
Status: Merged
Merged: 6/17/2025
Merged by: @masci

Base: mainHead: retain-repo


📝 Commits (5)

  • 68871e6 retain the full repo for workspaces
  • 0e8cb69 Fix rc_path not updating. Add fixes for non-local "local" sources:
  • 6778cc5 sync specifically to a ui dir
  • 06c9619 back out of that breaking change
  • 5e6001d Also merge in UI, so as to not blow away the previously synced workflow code

📊 Changes

6 files changed (+121 additions, -22 deletions)

View changed files

📝 docker/run_autodeploy.py (+3 -2)
📝 llama_deploy/apiserver/deployment.py (+16 -5)
📝 llama_deploy/apiserver/deployment_config_parser.py (+13 -2)
📝 llama_deploy/apiserver/source_managers/base.py (+9 -11)
📝 llama_deploy/apiserver/source_managers/local.py (+3 -0)
📝 tests/apiserver/test_deployment.py (+77 -2)

📄 Description

I had some trouble actually running code from installed uv dependencies. Part of the complexity here was attempting to install from a uv workspace, but there were also some bugs

  1. small fix: I noticed that run_autodeploy was not actually updating the rc_path setting,
  2. for some reason, in llamactl serve environments, after uv pip installing, new modules are available immediately. When testing in build container with package installed, a module reload was required
  3. Local and git sync have inconsistent sync path behavior. Local sync includes the source path as a subdir of the destination, while git does not, For example:
  • copying from ./foo/bar to /tmp/deployments/QuickStart will create /tmp/deployments/QuickStart/foo/bar. Now it just copies to /tmp/deployments/QuickStart
  • whereas a https://github.com/foo/bar will just copy the files to /tmp/deployments/QuickStart/

To account for this difference without introducing a change breaking the llama deploy deployment.yaml config, I added a relative_path method to the SourceManager as a workaround

I discovered this when attempting to sync a UI with a source of /app/ui (for workspace support reasons). The UI sync sort of has an assumption currently that the UI is only ever in /ui, and this local folder path copying was embedded into it. It's source path was somewhat ignored, and always attempted to run pnpm from a cwd of target_folder / "ui". This now instead resolves the cwd of pnpm commands to the target_folder / relative_path

  1. Finally, the UI file sync is currently overwriting the previously cloned python workflow code. This mostly works, as the code is already loaded into memory, so it doesn't seem to cause issues? However as a safeguard, I added the option to instead merge in the UI via a sync_policy (This is also a somewhat unstable way to get the UI pnpm workspace to work, but the sync policy option seems reasonable either way)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/llama_deploy/pull/540 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 6/16/2025 **Status:** ✅ Merged **Merged:** 6/17/2025 **Merged by:** [@masci](https://github.com/masci) **Base:** `main` ← **Head:** `retain-repo` --- ### 📝 Commits (5) - [`68871e6`](https://github.com/run-llama/llama_deploy/commit/68871e603838e65bb3492d3c1cdfadc78d018178) retain the full repo for workspaces - [`0e8cb69`](https://github.com/run-llama/llama_deploy/commit/0e8cb69602a7a96e77f193feadbe12e6544934d2) Fix rc_path not updating. Add fixes for non-local "local" sources: - [`6778cc5`](https://github.com/run-llama/llama_deploy/commit/6778cc56be8b933ee82605e6f55a31a9d69883c0) sync specifically to a ui dir - [`06c9619`](https://github.com/run-llama/llama_deploy/commit/06c9619053d5a08f8998410a74254321e318bc3e) back out of that breaking change - [`5e6001d`](https://github.com/run-llama/llama_deploy/commit/5e6001dbe0baeab7e97cc708b81699384935c59b) Also merge in UI, so as to not blow away the previously synced workflow code ### 📊 Changes **6 files changed** (+121 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `docker/run_autodeploy.py` (+3 -2) 📝 `llama_deploy/apiserver/deployment.py` (+16 -5) 📝 `llama_deploy/apiserver/deployment_config_parser.py` (+13 -2) 📝 `llama_deploy/apiserver/source_managers/base.py` (+9 -11) 📝 `llama_deploy/apiserver/source_managers/local.py` (+3 -0) 📝 `tests/apiserver/test_deployment.py` (+77 -2) </details> ### 📄 Description I had some trouble actually running code from installed uv dependencies. Part of the complexity here was attempting to install from a uv workspace, but there were also some bugs 1. small fix: I noticed that run_autodeploy was not actually updating the `rc_path` setting, 2. for some reason, in `llamactl serve` environments, after `uv pip install`ing, new modules are available immediately. When testing in build container with package installed, a module reload was required 3. Local and git sync have inconsistent sync path behavior. Local sync includes the source path as a subdir of the destination, while git does not, For example: - copying from `./foo/bar` to `/tmp/deployments/QuickStart` will create `/tmp/deployments/QuickStart/foo/bar`. Now it just copies to `/tmp/deployments/QuickStart` - whereas a `https://github.com/foo/bar` will just copy the files to `/tmp/deployments/QuickStart/` To account for this difference without introducing a change breaking the llama deploy deployment.yaml config, I added a `relative_path` method to the `SourceManager` as a workaround I discovered this when attempting to sync a UI with a source of `/app/ui` (for workspace support reasons). The UI sync sort of has an assumption currently that the UI is only ever in `/ui`, and this local folder path copying was embedded into it. It's `source` path was somewhat ignored, and always attempted to run `pnpm` from a cwd of `target_folder / "ui"`. This now instead resolves the cwd of `pnpm` commands to the `target_folder / relative_path` 4. Finally, the UI file sync is currently overwriting the previously cloned python workflow code. This mostly works, as the code is already loaded into memory, so it doesn't seem to cause issues? However as a safeguard, I added the option to instead merge in the UI via a `sync_policy` (This is also a somewhat unstable way to get the UI pnpm workspace to work, but the sync policy option seems reasonable either way) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 02:15:32 -05:00
yindo closed this issue 2026-02-16 02:15:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_deploy#537