You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: key detectors by config ID to support multiple resources of same type (#21)
## Problem
`aurora-postgresql` and `aurora-mysql` both have `type: aurora` in
`config/resources.yaml`. The detectors map was keyed by resource type,
so the second entry overwrote the first — only 4 detectors were
initialized instead of 5.
## Fix
Key `invSources`, `eolProviders`, and `detectors` maps by **config ID**
(e.g., `aurora-mysql`) instead of resource type (e.g., `aurora`). Update
the orchestrator's default resource list to use config IDs. Remove the
now-unnecessary type verification check in `ListResources`.
## Changes
- `cmd/server/main.go` — key maps by `resourceCfg.ID` instead of
`resourceCfg.Type`
- `pkg/workflow/orchestrator/workflow.go` — default fan-out uses config
IDs
- `pkg/inventory/wiz/generic.go` — remove type check in `ListResources`
(source knows its own type)
- `pkg/inventory/wiz/generic_test.go` — remove obsolete test
## Result
Before: `✓ Total detectors initialized: 4` (aurora collision)
After: `✓ Total detectors initialized: 5` (aurora-postgresql +
aurora-mysql)
Co-authored-by: Amp <amp@ampcode.com>
0 commit comments