Fix BOM Recursion Loop Causing Scheduler Timeout#85
Open
peregrine-2024 wants to merge 1 commit into
Open
Conversation
Implements a custom module that enhances BOM explosion with robust recursion guards to prevent infinite loops caused by circular dependencies in Bill of Materials structures. Key features: - Maximum recursion depth limit (100 levels) to prevent stack overflow - Early cycle detection using visited products set for O(1) lookup - Enhanced DFS-based cycle detection in BOM graph traversal - Detailed error messages showing exact product chains causing cycles - Comprehensive logging for debugging and monitoring - Zero core Odoo modifications (follows inheritance best practices) Technical implementation: - Inherits from mrp.bom model - Overrides explode() method with enhanced protection - Tracks product chains throughout recursion - Maintains visited products set to detect cycles early - Provides clear, actionable error messages to users Fixes: Damage Control QA server 504 Gateway Time-out issue Ticket: 67931 Module: mrp_bom_cycle_guard Version: 16.0.1.0.0
Author
🛠️ Automated Fix: MRP BOM Cycle Guard ImplementationThis pull request implements the MRP BOM Cycle Guard module to resolve the recurring 504 Gateway Time-out errors experienced on the Damage Control QA server during BOM explosion processes. ✅ Changes SummaryThe following files were added and modified to introduce robust cycle detection and recursion guards in the 🔧
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
: Resolves infinite loop in BOM computation that was causing 504 Gateway Time-out errors during scheduler execution. Implemented recursion guard mechanism to prevent circular dependency issues where products reference themselves directly or indirectly through component chains. This fix ensures scheduler completion without timeouts while maintaining BOM calculation accuracy. Related to ticket odoo#67931.