Skip to content

refactor: update launch.json and Tiltfile for service paths; modify f… #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 15, 2025

Conversation

a-klos
Copy link
Member

@a-klos a-klos commented Jul 8, 2025

This pull request includes changes to improve the organization of backend services, enhance debugging capabilities, and refactor asynchronous handling in the admin-api-lib. The most significant updates involve restructuring file paths for services, adding debugging arguments, and transitioning from threads to asyncio tasks for better concurrency management.

Backend Service Path Updates:

  • .vscode/launch.json: Updated localRoot and remoteRoot paths to reflect the new organization under the services directory for rag-backend, document-extractor, and admin-backend. [1] [2] [3]
  • Tiltfile: Adjusted sync paths in live_update for backend services to align with the new directory structure. [1] [2] [3] [4]
  • infrastructure/rag/values.yaml: Changed --reload-dir paths for backend services to match the updated directory structure. [1] [2] [3]

Debugging Enhancements:

Async Refactoring:

Test Updates:

@huhn511 huhn511 requested a review from Copilot July 10, 2025 08:10
Copilot

This comment was marked as outdated.

@huhn511 huhn511 requested a review from Copilot July 10, 2025 12:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors backend service organization and improves asynchronous handling in the admin-api-lib. The changes involve restructuring file paths from root-level service directories to a unified services/ directory structure, and transitioning from thread-based to asyncio-based background processing for better concurrency management.

  • Path updates for backend services moved to services/ directory structure
  • Asyncio refactoring replacing Thread usage with asyncio tasks and asyncio.to_thread for blocking operations
  • Enhanced debugging capabilities with frozen modules disabled

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.vscode/launch.json Updated debug configuration paths to reflect new services/ directory structure
Tiltfile Modified live update sync paths for backend services under new directory organization
infrastructure/rag/values.yaml Updated reload directories and added debugging arguments for better development experience
libs/admin-api-lib/src/admin_api_lib/impl/api_endpoints/default_file_uploader.py Refactored from Thread to asyncio tasks for background processing with proper exception handling
libs/admin-api-lib/src/admin_api_lib/impl/api_endpoints/default_source_uploader.py Applied asyncio.to_thread for blocking API calls to prevent event loop blocking
libs/admin-api-lib/tests/default_file_uploader_test.py Updated tests to verify asyncio task creation instead of thread management
Comments suppressed due to low confidence (1)

libs/admin-api-lib/tests/default_file_uploader_test.py:137

  • The test assertion uploader._background_tasks[0].get_name() only verifies that the task has a name, but doesn't validate the task's actual functionality or state. Consider asserting that the task is not done yet or checking its specific name/type to ensure the correct background task was created.
    assert uploader._background_tasks[0].get_name()  # Task was created

@a-klos a-klos merged commit 6e77100 into refactor/gha Jul 15, 2025
@a-klos a-klos deleted the refactor/make-debugable branch July 15, 2025 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants