Mark resource as unhealthy#6029
Open
npmenard wants to merge 1 commit into
Open
Conversation
cheukt
reviewed
May 22, 2026
Member
cheukt
left a comment
There was a problem hiding this comment.
change makes sense - will approve with ci checks passing
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.
When a resource declares a weak dependency there is a path where it remains in an healthy state in the resource graph after
Closewas called on it and the subsequent call to the resource Constructor fails. Allowing any clients to call APIs on a closed resourceTo illustrate better the bug here is a simple go module to reproduce the issue:
Associated config
{ "components": [ { "name": "myarm", "api": "rdk:component:arm", "model": "local:demo:singleton", "attributes": { "note": "v2" } }, { "name": "opt", "api": "rdk:component:arm", "model": "rdk:builtin:fake", "attributes": {} } ], "modules": [ { "type": "local", "name": "arm-singleton", "executable_path": "/tmp/arm-not-nice/bin/arm-singleton" } ] }When RDK comes up it will build the arm-singleton. If the optional resource changes or comes up RDK will close the resource and attempt to build it again which will fail. The closed resource will remain accessible in the resource graph
Leaving the resources in a broken state (use after Close) with no automatic recovery and a potentially opaque error message hard to decipher for an end user