Repository navigation
Fix/fix service object handling - #632
Conversation
Removed json_safe function to simplify AWSHandler class.
Removed test for EKS timestamps handling and related assertions.
Added information about S3 bucket tagging and its implications for inventory roles.
Add json_safe function to convert AWS timestamps to UTC ISO 8601 strings for NetBox JSON fields.
Add tests for AWS service metadata handling and legacy resource adoption.
Clarified the purpose of AWS metadata and timestamp handling.
|
had to add back in a fix for the timestamping. It got lost in the shuffle of revamping back to multiple PRs |
|
Thanks for splitting this out. The adoption is much narrower now, and the S3 collision cases are back with objects that don't carry the source tag, which is what I was after. Two of the three conditions have no test yet. If I drop Smaller things:
|
|
very difficult to recall the way these were adjusted and pulled apart because that's why the patch in the first place. I'll go back through and look at the items, but they'll be in context with the other changes more than likely. I don't think I'll get to it in the next few hours so will probably be tomorrow. The the missing resource id, it came apart from my original code. I couldn't pinpoint which situation created the issue but it did occur in multiple passes. One note is that it takes several hours to run each of my tests due to the volume of data but a small change like a doc update should be easy. |
Removed optional S3 tag synchronization details and clarified the behavior of current S3 discovery regarding bucket tags.
Refactor AWS service tests to improve timestamp handling and add new test for JSON safe normalization.
Updated json_safe function docstring to clarify its purpose and added comments for better understanding.
|
Thanks. I pushed one commit on top before merging. It puts back |
This adjusts a resource where it can't find an existing object by aws_resource_id. Adds a fallback if there is exactly one object with the same name and parent, it adopts that object only if it has no AWS resource id, its service is missing or matches, and is already owned by this AWS source (through source reference). the handler then updates it with the AWS data instead of treating it as a name collision and skipping the resource.
The intent was to recover existing AWS tagged obects missing the identity fields without accidentally taking over another source's object.