Skip to content

Commit fa2adbf

Browse files
committed
docs: Improve coderadius.yaml and cr doctor explanation
1 parent f197102 commit fa2adbf

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

docs/guide/coderadius-yaml.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `coderadius.yaml`
1+
# coderadius.yaml Reference
22

33
`coderadius.yaml` is a per-repository config file that tells CodeRadius things static analysis can't figure out on its own: what your internal SDKs do, which physical database a table belongs to, which broker a DSN points to. It's optional. Without it, CodeRadius still analyzes your repo using built-in heuristics. You add the file only where those heuristics guess wrong.
44

@@ -203,6 +203,8 @@ cr:datacontainer:acme/payment-service:orders
203203

204204
Scoped to the repo. Safe, but if `inventory-service` also queries `orders` against the same physical MySQL instance, you get two disconnected nodes. CodeRadius has no way to know it's one database.
205205

206+
You don't have to find these cases by hand: after an analysis, `cr doctor` scans the graph for cross-repo tables it could not weld on its own and prints a ready-to-paste `databases[]` block for each candidate (see [CLI Reference](./cli-commands.md#doctor)).
207+
206208
```yaml
207209
databases:
208210
- id: main-mysql
@@ -658,7 +660,9 @@ hints:
658660

659661
## Finding shared databases
660662

661-
Once `databases` is declared consistently across repos, two `DataContainer` nodes with the same `scope` but different `sourceRepo` mean two services are hitting the same physical table. Query it directly in Memgraph Lab:
663+
**Before declaring**: run `cr doctor` after an analysis. It surfaces cross-repo same-named tables whose database endpoints resolve the same database name — the candidates worth declaring — each with the exact `databases[]` block to paste.
664+
665+
**After declaring**: once `databases` is declared consistently across repos, two `DataContainer` nodes with the same `scope` but different `sourceRepo` mean two services are hitting the same physical table. Query it directly in Memgraph Lab:
662666

663667
```cypher
664668
MATCH (dc1:DataContainer), (dc2:DataContainer)

0 commit comments

Comments
 (0)