-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
severity: highCompletely breaks certain functions, or substantially degrades performance application-wideCompletely breaks certain functions, or substantially degrades performance application-widestatus: needs ownertype: bug
Milestone
Description
Plugin Version
v0.2.0
NetBox Version
v4.4.0-beta1
Python Version
v3.12.3
Steps to Reproduce
- Create two
CustomObjectTypeinstances (e.g., Service and ServiceEndpoint). - Add fields:
- In
Service, add an object type field pointing toServiceEndpoint. - In
ServiceEndpoint, add an object type field pointing back toService.
- In
- Access a NetBox page
- Observe the 500 Internal Server Error in logs.
Infinite recursion in the netbox_custom_objects plugin, specifically during template rendering for navigation. The recursion happens between CustomObjectType.get_model() and FieldType.get_model_field(), where each method repeatedly calls the other, leading to a stack overflow.
Expected Behavior
- Validation error when creating a circular dependency in custom object definitions.
- NetBox loads pages without errors, and custom objects resolve correctly without recursion.
Observed Behavior
RecursionErrorin Django logs, originating fromCustomObjectType.get_model()→_fetch_and_generate_field_attrs()→get_model_field().- nbshell scripts attempting to inspect or delete fields also fail with recursion
loubladi
Metadata
Metadata
Assignees
Labels
severity: highCompletely breaks certain functions, or substantially degrades performance application-wideCompletely breaks certain functions, or substantially degrades performance application-widestatus: needs ownertype: bug