call shutdown in LifecycleNode dtor to avoid leaving the device in un…#2450
Merged
fujitatomoya merged 2 commits intorollingfrom Apr 6, 2024
Merged
call shutdown in LifecycleNode dtor to avoid leaving the device in un…#2450fujitatomoya merged 2 commits intorollingfrom
fujitatomoya merged 2 commits intorollingfrom
Conversation
…known state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
fujitatomoya
commented
Mar 14, 2024
Collaborator
Author
|
@Barry-Xu-2018 @alsora could you take a look as 1st review? |
Collaborator
|
I agree with adding tests for destructing LifecycleNode under different states of lifecycle node. However, the code added in this PR indeed is difficult to check by tests. Maybe we should register a callback function (register_on_shutdown) in the tests to confirm that the state transitions to 'Finalized' when LifecycleNode is destructed. |
alsora
reviewed
Mar 19, 2024
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Collaborator
Author
|
@alsora requesting another review! thanks in advance. |
alsora
approved these changes
Apr 5, 2024
Collaborator
Collaborator
Collaborator
Author
|
@Mergifyio backport iron humble |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Apr 6, 2024
#2450) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * add test to verify LifecycleNode::shutdown is called on destructor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 04ea0bb)
mergify bot
pushed a commit
that referenced
this pull request
Apr 6, 2024
#2450) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * add test to verify LifecycleNode::shutdown is called on destructor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 04ea0bb)
This was referenced Apr 6, 2024
Merged
fujitatomoya
added a commit
that referenced
this pull request
Apr 7, 2024
#2450) (#2490) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * add test to verify LifecycleNode::shutdown is called on destructor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 04ea0bb) Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
fujitatomoya
added a commit
that referenced
this pull request
Apr 7, 2024
#2450) (#2491) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * add test to verify LifecycleNode::shutdown is called on destructor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 04ea0bb) Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
clalancette
added a commit
that referenced
this pull request
May 9, 2024
fujitatomoya
added a commit
that referenced
this pull request
May 29, 2024
…known state (2nd) (#2528) * Revert "Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450)" (#2522)" This reverts commit 42b0b57. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * lifecycle node dtor shutdown should be called only in primary state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * adjust warning message if the node is still in transition state in dtor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
mergify bot
pushed a commit
that referenced
this pull request
May 29, 2024
…known state (2nd) (#2528) * Revert "Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450)" (#2522)" This reverts commit 42b0b57. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * lifecycle node dtor shutdown should be called only in primary state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * adjust warning message if the node is still in transition state in dtor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 3bc364a)
fujitatomoya
added a commit
that referenced
this pull request
Jun 7, 2024
…known state (2nd) (backport #2528) (#2542) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state (2nd) (#2528) * Revert "Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450)" (#2522)" This reverts commit 42b0b57. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * lifecycle node dtor shutdown should be called only in primary state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * adjust warning message if the node is still in transition state in dtor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 3bc364a) * LifecycleNode shutdown on dtor only with valid context. (#2545) Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
fujitatomoya
added a commit
that referenced
this pull request
Jun 11, 2024
* Revert "lifecycle node dtor shutdown should be called only in primary state. (#2543)" This reverts commit dceb612. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450) (#2490)" This reverts commit f41a353. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
fujitatomoya
added a commit
that referenced
this pull request
Jun 12, 2024
* Revert "lifecycle node dtor shutdown should be called only in primary state. (#2544)" This reverts commit 595badb. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450) (#2491)" This reverts commit 0f9604d. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
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.
…known state.
address #997