feat: uv migration (#3493)

* uv migration

smaller runners, freeze test runs, remove dev, ruff,hatchling, previw,
poetry, generates wheel, installs wheel, docker

* fix tests and dependency groups

* test fixes

* test fixing and main

* resolve merge conflict

* dev + test dependency group

* Test

* trigger CI

* trigger CI

* add debugging info

* trigger CI

* uv for reusable and sdk preview

* resolve mc and reformat black

* staged-api

* mypy

* fix fern

* prod Dockerfile

* model sweep, and project.toml and uvlock

* --group test -> --extra dev

* remove redundant --extra dev and rename tests to dev

* sdk backwards compat install sqlite

* install sqlite group for sdk-backwards-compat

* install uv on gh runner for cloud-api-integration-tests

* stage+publish

* pytest asyncio

* bug causing pytest package to get removed

* try to fix async event loop issues

* migrate to --with google-cloud-secret-manager

---------

Co-authored-by: Kian Jones <kian@letta.com>
This commit is contained in:
Andy Li
2025-08-26 18:11:09 -07:00
committed by GitHub
parent 3d62f14bac
commit acfdab2ced
34 changed files with 670 additions and 9855 deletions

View File

@@ -733,6 +733,7 @@ def validate_id_format(schema: AgentFileSchema) -> bool:
class TestFileExport:
"""Test file export functionality with comprehensive validation"""
@pytest.mark.asyncio(loop_scope="session")
async def test_basic_file_export(self, default_user, agent_serialization_manager, agent_with_files):
"""Test basic file export functionality"""
agent_id, source_id, file_id = agent_with_files
@@ -755,6 +756,7 @@ class TestFileExport:
assert file_agent.file_id == exported.files[0].id
assert file_agent.source_id == exported.sources[0].id
@pytest.mark.asyncio(loop_scope="session")
async def test_multiple_files_per_source(self, server, default_user, agent_serialization_manager):
"""Test export with multiple files from the same source"""
source = await create_test_source(server, "multi-file-source", default_user)
@@ -781,6 +783,7 @@ class TestFileExport:
assert file_agent.file_id in file_ids
assert file_agent.source_id == source_id
@pytest.mark.asyncio(loop_scope="session")
async def test_multiple_sources_export(self, server, default_user, agent_serialization_manager):
"""Test export with files from multiple sources"""
source1 = await create_test_source(server, "source-1", default_user)
@@ -802,6 +805,7 @@ class TestFileExport:
for file_schema in exported.files:
assert file_schema.source_id in source_ids
@pytest.mark.asyncio(loop_scope="session")
async def test_cross_agent_file_deduplication(self, server, default_user, agent_serialization_manager):
"""Test that files shared across agents are deduplicated in export"""
source = await create_test_source(server, "shared-source", default_user)
@@ -825,6 +829,7 @@ class TestFileExport:
assert file_agent.file_id == file_id
assert file_agent.source_id == source_id
@pytest.mark.asyncio(loop_scope="session")
async def test_file_agent_relationship_preservation(self, server, default_user, agent_serialization_manager):
"""Test that file-agent relationship details are preserved"""
source = await create_test_source(server, "test-source", default_user)
@@ -841,6 +846,7 @@ class TestFileExport:
assert file_agent.is_open is True
assert hasattr(file_agent, "last_accessed_at")
@pytest.mark.asyncio(loop_scope="session")
async def test_id_remapping_consistency(self, server, default_user, agent_serialization_manager):
"""Test that ID remapping is consistent across all references"""
source = await create_test_source(server, "consistency-source", default_user)
@@ -859,6 +865,7 @@ class TestFileExport:
assert file_agent.file_id == file_schema.id
assert file_agent.source_id == source_schema.id
@pytest.mark.asyncio(loop_scope="session")
async def test_empty_file_relationships(self, server, default_user, agent_serialization_manager):
"""Test export of agent with no file relationships"""
agent_create = CreateAgent(
@@ -877,6 +884,7 @@ class TestFileExport:
agent_schema = exported.agents[0]
assert len(agent_schema.files_agents) == 0
@pytest.mark.asyncio(loop_scope="session")
async def test_file_content_inclusion_in_export(self, default_user, agent_serialization_manager, agent_with_files):
"""Test that file content is included in export"""
agent_id, source_id, file_id = agent_with_files
@@ -985,6 +993,7 @@ class TestAgentFileExport:
with pytest.raises(AgentFileExportError): # Should raise AgentFileExportError for non-existent agent
await agent_serialization_manager.export(["non-existent-id"], default_user)
@pytest.mark.asyncio(loop_scope="session")
async def test_revision_id_automatic_setting(self, agent_serialization_manager, test_agent, default_user):
"""Test that revision_id is automatically set to the latest alembic revision."""
agent_file = await agent_serialization_manager.export([test_agent.id], default_user)