Skip to content

Nested resources not discovered when all parent resources already exist #72

@browdues

Description

@browdues

Version

0.75.1

Formae configuration

amends "formae:/Config.pkl"

agent {
    discovery {
        enabled = true
    }
    logging {
        consoleLogLevel = "debug"
    }
}

Steps to reproduce

1. Run initial discovery - VPCs and their subnets are discovered successfully

2. Create new subnets in your AWS account within the existing VPCs (outside of formae)

3. Wait for the next scheduled discovery run, or trigger discovery manually (restart the agent)

4. Check the discovered resources

Actual behavior

New subnet (nested resource) not discovered

Examining the code flow:
- `processListing` receives the VPC listing
- All VPCs are deduplicated (no new parent/root resources)
- Since `len(newResources) == 0` the function returns
- `discoverNestedResources` is never called

Expected behavior

Discovery should find + synchronize the new subnets even though their parent VPCs already exist in the db

Impact

High - Major functionality broken

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions