dotnet / dotnet/arcade

RemoteExecutor Swallows Errors and Throws Invalid Exceptions

Open
#6,371 43 comments 0 reactions 0 assignees View on GitHub
area-Infrastructure-libraries help wanted
Dominant language
C#
Stars
729
Forks
397
Avg merge
3d 15m
Merged PRs (30d)
149

Description

- [x] This issue is blocking
- [x] This issue is causing unreasonable pain

I could be holding it wrong but it does not seem to be working as expected.

Microsoft.DotNet.RemoteExecutor Version 6.0.0-beta.20508.3 (_Are there non beta version available?_)

Installed via https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json

The following method runs without any assertation exceptions. I would expect it to fail.

``` c#
RemoteExecutor.Invoke(() =>
{
Assert.True(false);
}).Dispose();
```

The following code throws an exception. I would expect none.
``` c#
RemoteExecutor.Invoke(() =>
{
return RemoteExecutor.SuccessExitCode;
}).Dispose();
```
Message:
Exit code was -2147450749 but it should have been 42
Expected: True
Actual: False
Stack Trace:
RemoteInvokeHandle.Dispose(Boolean disposing) line 237
RemoteInvokeHandle.Dispose() line 58

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.