Skip to content

Commit 64f77b8

Browse files
authored
feat: remove lockfile fallback for remote templates (#255)
Removes the behavior of falling back to a base lockfile if the remote template does not contain one. This is a breaking change for remote templates that were relying on the fallback behavior. With this change: - If a remote template has a file, it's copied over. - If it does not, no is created, and the user is expected to generate one. The documentation has been updated to reflect this new behavior.
1 parent 11aa4af commit 64f77b8

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

docs/guide/remote-templating.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ You have full control over the Python dependencies. Both `pyproject.toml` and `u
134134
* **`pyproject.toml`**: Required file that replaces the base template's version. Must include all dependencies for your agent.
135135
136136
* **`uv.lock`**: Strongly recommended to ensure reproducibility.
137-
* If present, guarantees exact dependency versions.
138-
* If missing, falls back to base template's lock file. A new lock file will be generated by the user when performing installation.
137+
* If present, it will be copied to the generated agent, guaranteeing exact dependency versions.
138+
* If missing, the generated agent will **not** include a `uv.lock` file. The user is expected to generate one by running `make install` or `uv pip sync` after the agent is created.
139139
140140
**Best Practice:** Always run `uv lock` after changing dependencies and commit the resulting lock file.
141141

src/cli/utils/template.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -696,19 +696,6 @@ def process_template(
696696
if remote_uv_lock.exists():
697697
shutil.copy2(remote_uv_lock, final_destination / "uv.lock")
698698
logging.debug("Used uv.lock from remote template")
699-
elif deployment_target:
700-
# Fallback to base template lock file
701-
base_template_name = get_base_template_name(remote_config or {})
702-
lock_path = (
703-
pathlib.Path(__file__).parent.parent.parent.parent
704-
/ "src"
705-
/ "resources"
706-
/ "locks"
707-
/ f"uv-{base_template_name}-{deployment_target}.lock"
708-
)
709-
if lock_path.exists():
710-
shutil.copy2(lock_path, final_destination / "uv.lock")
711-
logging.debug(f"Used fallback lock file from {lock_path}")
712699
elif deployment_target:
713700
# For local templates, use the existing logic
714701
lock_path = (

0 commit comments

Comments
 (0)