Skip to content

Turn Sync into Async#116

Merged
dcloud347 merged 4 commits into
mainfrom
dev
Aug 27, 2025
Merged

Turn Sync into Async#116
dcloud347 merged 4 commits into
mainfrom
dev

Conversation

@dcloud347

Copy link
Copy Markdown
Contributor

This pull request primarily refactors the codebase to remove the PROMETHEUS_MAX_TOKEN_PER_NEO4J_RESULT configuration and all related code, and to make the knowledge graph and Neo4j services fully asynchronous. It also improves repository status tracking during issue processing and updates service initialization and usage patterns accordingly.

Key changes include:

Configuration and Environment Cleanup:

  • Removed the PROMETHEUS_MAX_TOKEN_PER_NEO4J_RESULT environment variable and all references to it from configuration files (.github/workflows/pytest_and_coverage.yml, docker-compose.yml, docker-compose.win_mac.yml, example.env, prometheus/configuration/config.py). [1] [2] [3] [4] [5]

Knowledge Graph and Neo4j Service Refactor:

  • Refactored KnowledgeGraphService to make all major methods asynchronous, including get_knowledge_graph, clear_kg, and build_and_save_knowledge_graph. Added logging and a new start async method. [1] [2] [3]
  • Updated Neo4jService to use AsyncGraphDatabase and made its close method asynchronous.

Repository and Issue Handling Improvements:

  • Updated the issue handling route (answer_issue) to use the asynchronous knowledge graph methods and to set the repository status to "working" before processing and reset it afterward. [1] [2]
  • Changed the repository deletion route to await the asynchronous clear_kg method.

Issue Service and LangGraph Refactoring:

  • Removed all usage and references to max_token_per_neo4j_result and neo4j_driver from IssueService, its initialization, and from all relevant langgraph node and graph constructors (issue_graph.py, bug_get_regression_tests_subgraph_node.py, bug_reproduction_subgraph_node.py). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

Logging Updates:

  • Removed logging of the now-deleted MAX_TOKEN_PER_NEO4J_RESULT setting from the application startup log.

These changes simplify configuration, improve async handling, and remove obsolete parameters, making the codebase cleaner and more maintainable.

@dcloud347 dcloud347 merged commit aea3316 into main Aug 27, 2025
2 checks passed
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.

1 participant