Add dependency graph module and outage investigation - #12
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
- New Maven module: dependency-graph - Parsers for Docker Compose topology, Eureka discovery metadata, and Spring Cloud Gateway routes - Graph model with typed nodes (SERVICE, DATABASE, MESSAGE_BROKER) and edges (HTTP, JDBC, AMQP, EUREKA) - OutageAnalyzer: traces dependency chains, computes blast radius, generates markdown investigation reports - 35 tests covering valid inputs, malformed inputs, and edge cases - OUTAGE-INVESTIGATION.md: notification-service failure analysis tracing discovery-service as single point of failure, with resilience config recommendations (HA Eureka, circuit breakers, health checks, extended leases) 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:
|
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
Adds a new
dependency-graphMaven module that parses the bank platform's infrastructure configuration into a typed dependency graph, and uses it to investigate a simulated outage scenario.Graph module (
dependency-graph/):Node(typed:SERVICE,DATABASE,MESSAGE_BROKER),Edge(typed:HTTP,JDBC,AMQP,EUREKA), andDependencyGraphwith BFS-based path tracing and blast radius computation.DockerComposeParser— extracts services,depends_onedges, JDBC/AMQP connections from environment variables, and classifies nodes by image/name keywords.EurekaConfigParser— parsesapplication.propertiesandapplication.ymlfor Eureka registration metadata and creates EUREKA-typed edges.GatewayRouteParser— parses Spring Cloud Gateway routes (explicitlb://routes and discovery-first routing) into HTTP edges.DependencyGraphBuilder— orchestrates all parsers from a project root directory.OutageAnalyzertraces dependency chains, computes transitive blast radius, gathers evidence, and generates markdown investigation reports.Tests (35 total, all passing):
DockerComposeParserTest(9 tests) — valid compose, broker/DB classification, JDBC edge extraction, malformed/empty inputs.EurekaConfigParserTest(9 tests) — properties and YAML parsing, register/no-register behavior, missing app name.GatewayRouteParserTest(7 tests) — discovery-first routing, explicit routes with predicate paths, malformed/empty configs.DependencyGraphBuilderTest(3 tests) — combined source building, null gateway handling, mixed edge types.OutageAnalyzerTest(7 tests) — dependency chain tracing, blast radius computation, evidence gathering, disconnected nodes, markdown report generation.Outage investigation (
OUTAGE-INVESTIGATION.md):notification-service → discovery-servicedependency chain via EUREKA registration and Docker Composedepends_on.depends_on.Review & Testing Checklist for Human
docker-compose.ymland serviceapplication.propertiesfilesOUTAGE-INVESTIGATION.mdresilience recommendations for applicability to your deployment environment (e.g., whether HA Eureka with peer replication is feasible)mvn test -pl dependency-graphto confirm all 35 tests pass locallyaccount-service)Recommended test plan: Run
mvn clean test -pl dependency-graphand verify 35/35 tests pass. Review the outage investigation document against your understanding of the system's actual runtime behavior.Notes
spring-boot-starter-testfor JUnit 5.DependencyGraphBuilder.buildFromProjectRoot()method can be used to generate a live graph from the actual repo on disk.MYSQL_HOST/MYSQL_DATABASEenv vars in addition to parsingjdbc:URLs directly.Link to Devin session: https://app.devin.ai/sessions/bf1182d4e6644e51ad40772ea5704e80
Requested by: @achalc
Devin Review