RSDK-12103: Add failing modules to error for failed API Model #5461
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.
Whenever a module fails to startup, add it to the failing modules map
When a module is failing, it doesn't get stored in mgr.modules, so when you compare config diffs it won't find the difference between the previous config and the newConfig (where you removed a failing module). So to be able to tell when the failing module has been removed, I compare my failing modules list directly to the newConfig and remove any difference in the failing modules list.
Testing:
Original state: No failing modules and some working modules:
11/10/2025, 1:02:53 PM error rdk.resource_manager.rdk:component:board/board-1 resource/graph_node.go:308 resource build error: unknown resource type: API rdk:component:board with model s:s:s not registered; There may be no module in config that provides this model resource rdk:component:board/board-1 model s:s:sAdd 2 failing modules:
11/10/2025, 1:20:53 PM error rdk.resource_manager.rdk:component:board/board-1 resource/graph_node.go:308 resource build error: unknown resource type: API rdk:component:board with model s:s:s not registered; May be in failing module: [failingmodule-tofix failingmodule-todel]; There may be no module in config that provides this model resource rdk:component:board/board-1 model s:s:sDelete a failing module:
11/10/2025, 1:22:23 PM error rdk.resource_manager.rdk:component:board/board-1 resource/graph_node.go:308 resource build error: unknown resource type: API rdk:component:board with model s:s:s not registered; May be in failing module: [failingmodule-tofix]; There may be no module in config that provides this model resource rdk:component:board/board-1 model s:s:sFix a failing module: