[PR #450] [MERGED] refact: support absolute paths in local source manager #471

Closed
opened 2026-02-16 01:17:29 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/llama_deploy/pull/450
Author: @masci
Created: 2/6/2025
Status: Merged
Merged: 2/7/2025
Merged by: @masci

Base: mainHead: massi/source_manager_refact


📝 Commits (3)

  • e755f4d refact: support absolute paths in local source manager
  • dedbd9e remove workaround from tests now that local source works ok
  • 7a712b6 add unit tests for absolute paths

📊 Changes

11 files changed (+117 additions, -34 deletions)

View changed files

📝 e2e_tests/apiserver/rc/deployment.yml (+1 -1)
📝 llama_deploy/apiserver/deployment.py (+5 -5)
📝 llama_deploy/apiserver/deployment_config_parser.py (+2 -1)
📝 llama_deploy/apiserver/source_managers/__init__.py (+2 -16)
llama_deploy/apiserver/source_managers/base.py (+20 -0)
📝 llama_deploy/apiserver/source_managers/git.py (+3 -1)
📝 llama_deploy/apiserver/source_managers/local.py (+6 -3)
tests/apiserver/data/local.yaml (+13 -0)
📝 tests/apiserver/source_managers/test_git.py (+13 -6)
tests/apiserver/source_managers/test_local.py (+51 -0)
📝 tests/apiserver/test_deployment.py (+1 -1)

📄 Description

This PR introduced the concept that the path for a service with a local source is relative to the deployment file. For example, if you have a deployment file /foo/bar/deployment.yml containing the following:

services:
  dummy_workflow:
    name: Dummy Workflow
    source:
      type: local
      name: src  # Relative to what?
    path: workflow:echo_workflow

the local source manager will look for src in /foo/bar/src.

This change required a refactoring of the source managers:

  • managers now take a DeploymentConfig instance in the constructor, hence the protocol was changed into an abstract class
  • the deployment config has a new field base_path that's automatically populated when from_yaml is used.

🔄 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/450 **Author:** [@masci](https://github.com/masci) **Created:** 2/6/2025 **Status:** ✅ Merged **Merged:** 2/7/2025 **Merged by:** [@masci](https://github.com/masci) **Base:** `main` ← **Head:** `massi/source_manager_refact` --- ### 📝 Commits (3) - [`e755f4d`](https://github.com/run-llama/llama_deploy/commit/e755f4dbd511d8df7d6bd7f93328534e45b8531d) refact: support absolute paths in local source manager - [`dedbd9e`](https://github.com/run-llama/llama_deploy/commit/dedbd9e82ae0fbbf9ba54f6bb865d4eb6e0c352a) remove workaround from tests now that local source works ok - [`7a712b6`](https://github.com/run-llama/llama_deploy/commit/7a712b6eb17e504618f6db806d89c2d21dc7f19b) add unit tests for absolute paths ### 📊 Changes **11 files changed** (+117 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `e2e_tests/apiserver/rc/deployment.yml` (+1 -1) 📝 `llama_deploy/apiserver/deployment.py` (+5 -5) 📝 `llama_deploy/apiserver/deployment_config_parser.py` (+2 -1) 📝 `llama_deploy/apiserver/source_managers/__init__.py` (+2 -16) ➕ `llama_deploy/apiserver/source_managers/base.py` (+20 -0) 📝 `llama_deploy/apiserver/source_managers/git.py` (+3 -1) 📝 `llama_deploy/apiserver/source_managers/local.py` (+6 -3) ➕ `tests/apiserver/data/local.yaml` (+13 -0) 📝 `tests/apiserver/source_managers/test_git.py` (+13 -6) ➕ `tests/apiserver/source_managers/test_local.py` (+51 -0) 📝 `tests/apiserver/test_deployment.py` (+1 -1) </details> ### 📄 Description This PR introduced the concept that the path for a service with a local source is relative to the deployment file. For example, if you have a deployment file `/foo/bar/deployment.yml` containing the following: ```yaml services: dummy_workflow: name: Dummy Workflow source: type: local name: src # Relative to what? path: workflow:echo_workflow ``` the local source manager will look for `src` in `/foo/bar/src`. This change required a refactoring of the source managers: - managers now take a `DeploymentConfig` instance in the constructor, hence the protocol was changed into an abstract class - the deployment config has a new field `base_path` that's automatically populated when `from_yaml` is used. --- <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 01:17:29 -05:00
yindo closed this issue 2026-02-16 01:17:29 -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#471