feat: add Stop-DeviceApp command - #55
Open
JoshuaMoelans wants to merge 2 commits into
Open
Conversation
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| Assert-DeviceSession |
There was a problem hiding this comment.
Bug: The Assert-DeviceSession health check may throw an exception on a crashed device, preventing the StopApplication() command from running and defeating the script's purpose.
Severity: HIGH
Suggested Fix
Either modify Stop-DeviceApp to skip or handle the exception from the Assert-DeviceSession check, or change Assert-DeviceSession to use a more robust health check that will not fail in post-crash scenarios.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: app-runner/Public/Stop-DeviceApp.ps1#L22
Potential issue: The `Stop-DeviceApp` script is intended to function after an
application crash. However, it calls `Assert-DeviceSession` on line 22, which performs a
health check by running a `getstatus` command. If a device becomes unresponsive to
`getstatus` after a crash—the exact scenario the script is designed for—the health check
will throw an exception. This exception prevents the script from ever reaching the
`$provider.StopApplication()` call on line 27, defeating the purpose of the new
functionality.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
As part of https://github.com/getsentry/sentry-switch/pull/165 where we noticed that Integration Test on Switch Ounce are failing, because the events stay
Pending.This is a more robust follow-up of what we introduced in https://github.com/getsentry/sentry-switch/pull/144 , where we invoked
terminatefor the unreal demo. Will follow up from this PR in the 165 revert³ one on sentry-switch.