Skip to content

Commit 5598347

Browse files
committed
Fix
1 parent 8ba07bb commit 5598347

2 files changed

Lines changed: 26 additions & 12 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
- name: Build
3535
run: dotnet build --no-restore --configuration Release
3636
- name: Test
37-
continue-on-error: ${{ startsWith(matrix.os, 'macos') }}
3837
env:
3938
API_KEY: ${{ secrets.SPICE_CLOUD_API_KEY }}
4039
run: dotnet test --no-build --verbosity normal --configuration Release --framework ${{ matrix.dotnet-version == '8.0.x' && 'net8.0' || matrix.dotnet-version == '9.0.x' && 'net9.0' || 'net10.0' }}
@@ -65,15 +64,6 @@ jobs:
6564

6665
steps:
6766
- uses: actions/checkout@v5
68-
- name: Install root certificates (macOS)
69-
if: startsWith(matrix.os, 'macos')
70-
run: |
71-
# Update CA certificates
72-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || true
73-
brew install ca-certificates || true
74-
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain > /tmp/certs.pem
75-
security find-certificate -a -p /Library/Keychains/System.keychain >> /tmp/certs.pem
76-
export SSL_CERT_FILE=/tmp/certs.pem
7767
- name: Setup .NET
7868
uses: actions/setup-dotnet@v5
7969
with:
@@ -86,7 +76,7 @@ jobs:
8676
- name: Build
8777
run: dotnet build --no-restore --configuration Release
8878
- name: Test
79+
continue-on-error: ${{ startsWith(matrix.os, 'macos') }}
8980
env:
9081
API_KEY: ${{ secrets.SPICE_CLOUD_API_KEY }}
91-
SSL_CERT_FILE: ${{ startsWith(matrix.os, 'macos') && '/tmp/certs.pem' || '' }}
9282
run: dotnet test --no-build --verbosity normal --configuration Release --framework ${{ matrix.dotnet-version == '8.0.x' && 'net8.0' || matrix.dotnet-version == '9.0.x' && 'net9.0' || 'net10.0' }}

Spice/src/Flight/SpiceFlightClient.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,36 @@ private static GrpcChannelOptions GetGrpcChannelOptions(string? appId, string? a
5151
{
5252
options.Credentials = ChannelCredentials.Insecure;
5353
}
54+
else
55+
{
56+
// Configure HttpHandler for TLS on macOS
57+
var handler = new SocketsHttpHandler
58+
{
59+
EnableMultipleHttp2Connections = true
60+
};
61+
options.HttpHandler = handler;
62+
}
5463
return options;
5564
}
5665

5766
// Set TLS credentials for authenticated connections
5867
options.Credentials = useTls ? ChannelCredentials.SecureSsl : ChannelCredentials.Insecure;
59-
options.HttpClient = new HttpClient
68+
69+
// Configure HttpHandler for TLS on macOS
70+
HttpMessageHandler messageHandler;
71+
if (useTls)
72+
{
73+
messageHandler = new SocketsHttpHandler
74+
{
75+
EnableMultipleHttp2Connections = true
76+
};
77+
}
78+
else
79+
{
80+
messageHandler = new HttpClientHandler();
81+
}
82+
83+
options.HttpClient = new HttpClient(messageHandler)
6084
{
6185
DefaultRequestHeaders =
6286
{

0 commit comments

Comments
 (0)