-
Notifications
You must be signed in to change notification settings - Fork 105
Upload the crate and send Kafka messages under the new_profile build profile. #1372
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
Conversation
Signed-off-by: A-Mavericks <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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 PR updates the crate synchronization system to use a new build profile called "new_profile" with database integration and enhanced Kafka messaging. The changes include migrating from file-based processing tracking to PostgreSQL, restructuring the codebase into proper Python modules, and updating configuration endpoints for the development environment.
- Replaces file-based crate processing tracking with PostgreSQL database storage
- Refactors Python code into proper modules with database models and utility functions
- Updates Kafka broker endpoints and topic names for the new environment
- Adds enhanced Kafka message models with structured data formats
Reviewed Changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/update/sync.py | Main sync logic refactored to use database instead of JSON files, updated Kafka configuration |
| extensions/update/model.py | New SQLAlchemy models for database storage of sync results |
| extensions/update/kafka_message_model.py | Pydantic models for structured Kafka messages |
| extensions/update/do_utils.py | Database utility functions for CRUD operations |
| extensions/update/database.py | Database connection configuration |
| extensions/rag/index/src/main.rs | Added test module for Kafka message consumption |
| extensions/rag/index/src/lib.rs | Updated broker and topic default values |
| extensions/rag/index/requirements.txt | Added database and validation dependencies |
| extensions/rag/index/index.sh | Updated module import path and proxy configuration |
| extensions/rag/index/Dockerfile | Changed to copy entire extensions directory |
| extensions/rag/chat/src/main.rs | Updated collection name for vector search |
| extensions/rag/chat/src/lib.rs | Added new async functions for search and generation |
| extensions/rag/chat/Dockerfile | Fixed chat script path |
| extensions/rag/README.md | Added host mapping for git server |
| extensions/rag/.env | Updated broker and topic configuration |
| extensions/observatory/src/model/mod.rs | Updated data source enum values |
| extensions/observatory/src/model/crates_pro_message.rs | New message model definitions |
| extensions/agent/src/model.rs | New request/response models for code review |
| extensions/agent/src/main.rs | New HTTP server setup |
| extensions/agent/src/api.rs | Code review API implementation with diff parsing |
| extensions/agent/README.md | Documentation for agent service |
| extensions/agent/Cargo.toml | Dependencies for agent service |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| timestamp: datetime | ||
| extra_field: Optional[str] = None |
Copilot
AI
Aug 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timestamp field is defined as datetime type, but in sync.py it's being passed as a string. Either change this to str type or ensure the calling code passes a datetime object.
| timestamp: datetime | |
| extra_field: Optional[str] = None | |
| extra_field: Optional[str] = None | |
| @validator('timestamp', pre=True) | |
| def parse_timestamp(cls, value): | |
| if isinstance(value, str): | |
| # Try to parse ISO format string to datetime | |
| from datetime import datetime | |
| try: | |
| return datetime.fromisoformat(value) | |
| except ValueError: | |
| raise ValueError(f"Invalid datetime format for timestamp: {value}") | |
| return value |
| pub async fn search_context(query: &str) -> Result<String, Box<dyn std::error::Error>> { | ||
| let search_node = SearchNode::new(&vect_url(), &qdrant_url(), "test_test_code_items")?; |
Copilot
AI
Aug 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The collection name 'test_test_code_items' is hardcoded and appears to be a test value. This should be configurable through environment variables or constants.
| pub async fn search_context(query: &str) -> Result<String, Box<dyn std::error::Error>> { | |
| let search_node = SearchNode::new(&vect_url(), &qdrant_url(), "test_test_code_items")?; | |
| pub fn qdrant_collection_name() -> String { | |
| env::var("QDRANT_COLLECTION_NAME").unwrap_or_else(|_| "test_test_code_items".to_string()) | |
| } | |
| pub async fn search_context(query: &str) -> Result<String, Box<dyn std::error::Error>> { | |
| let search_node = SearchNode::new(&vect_url(), &qdrant_url(), &qdrant_collection_name())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
a74e29d
No description provided.