Add dependency graph ingestion module for service topology analysis - #10
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Introduce a new dependency-graph module that parses infrastructure configuration files and normalizes them into a typed graph model with nodes (services, databases, message brokers, event stores, mail servers) and edges (HTTP, JDBC, AMQP, SMTP, Eureka registration, Gateway routing, Axon). Parsers included: - DockerComposeParser: extracts service topology, depends_on edges, and infers infrastructure nodes from environment variables - EurekaRegistrationParser: parses Spring application.properties/.yml to extract Eureka registration, datasource, mail, and Axon connections - GatewayRouteParser: parses Spring Cloud Gateway YAML for explicit routes (lb:// and http://) and discovery-first routing mode 59 tests covering valid inputs, malformed YAML, missing keys, null/blank content, map/list-style depends_on, and various infrastructure combinations. Co-Authored-By: Achal Channarasappa <achal.channarasappa@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Replace naive indexOf(':') with a regex that iteratively resolves all
${VAR:default} placeholders in a string. The previous implementation
broke on values like jdbc:mysql://${HOST:localhost}:${PORT:3306}/db
because it found the colon in 'jdbc:' instead of within the placeholder.
Add tests for JDBC URL placeholder resolution and multi-placeholder
Axon server values.
Co-Authored-By: Achal Channarasappa <achal.channarasappa@cognition.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a new
dependency-graphMaven module that parses the bank application's infrastructure configuration files and normalizes them into a typed graph model. This enables programmatic analysis of service dependencies for incident investigation, impact analysis, and change management.Graph Model
SERVICE,DATABASE,MESSAGE_BROKER,EVENT_STORE,MAIL_SERVER,GATEWAY,DISCOVERYHTTP,JDBC,AMQP,SMTP,EUREKA_REGISTER,GATEWAY_ROUTE,AXONParsers
DockerComposeParserdocker-compose.ymldepends_onedges, inferred DB/Axon/mail/RabbitMQ nodes from env varsEurekaRegistrationParserapplication.properties/application.ymlGatewayRouteParserapplication.ymllb://andhttp://routes, discovery-first routing mode, route predicatesHow this improves incident investigation
When a service fails or behaves unexpectedly, responders need to quickly answer: "What does this service depend on, and what depends on it?" Today, that requires reading Docker Compose files, application properties, and Feign client annotations across multiple modules.
This module automates that by building a queryable graph from the existing config files. With the graph, you can:
account-serviceis down, query incoming edges to see which gateway routes and Feign clients are affectedTest coverage
59 tests across 4 test classes covering:
depends_onReview & Testing Checklist for Human
docker-compose.ymlandapplication.propertiesfiles in this repo — runmvn test -pl dependency-graphNodeTypeandEdgeTypeenums to confirm they cover the infrastructure types relevant to your deploymentDockerComposeParsercorrectly infers MySQL, Axon, and mail connections from environment variable patterns in your compose fileNotes
DependencyGraph.merge()method allows combining graphs from multiple parsers into a unified view.authentication-serviceappears asuser-serviceindocker-compose.yml— both are captured correctly by their respective parsers.Link to Devin session: https://app.devin.ai/sessions/75cc02940ecf4523a51f2964865feee2
Requested by: @achalc
Devin Review