Skip to content

Commit 27a2cd7

Browse files
Merge branch 'main' into x-forward-for
2 parents db3b9ec + de3258c commit 27a2cd7

File tree

8 files changed

+47
-35
lines changed

8 files changed

+47
-35
lines changed

.github/alpine/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM ${BASE}
55
RUN apk update
66

77
# common
8-
RUN apk add bash build-base cmake curl git icu lsb-release-minimal sudo tar wget
8+
RUN apk add bash build-base cmake curl git icu lsb-release-minimal nodejs npm sudo tar wget
99

1010
# sentry-native
1111
RUN apk add curl-dev docker-cli libunwind-dev libunwind-static linux-headers openssl-dev zlib-dev xz-dev xz-static

.github/workflows/alpine.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ jobs:
3131
username: ${{ github.actor }}
3232
password: ${{ secrets.GITHUB_TOKEN }}
3333

34-
- name: Build ghcr.io/${{ github.repository_owner }}/sentry-dotnet-alpine:${{ matrix.version }}
35-
run: docker build --build-arg BASE=alpine:${{ matrix.version }} -t ghcr.io/${{ github.repository_owner }}/sentry-dotnet-alpine:${{ matrix.version }} .
36-
working-directory: .github/alpine
34+
- uses: docker/setup-qemu-action@v3
35+
- uses: docker/setup-buildx-action@v3
3736

38-
- name: Push ghcr.io/${{ github.repository_owner }}/sentry-dotnet-alpine:${{ matrix.version }}
39-
run: docker push ghcr.io/${{ github.repository_owner }}/sentry-dotnet-alpine:${{ matrix.version }}
40-
working-directory: .github/alpine
37+
- uses: docker/build-push-action@v6
38+
with:
39+
push: true
40+
platforms: linux/amd64,linux/arm64
41+
tags: ghcr.io/${{ github.repository_owner }}/sentry-dotnet-alpine:${{ matrix.version }}
42+
context: .github/alpine
43+
build-args: |
44+
BASE=alpine:${{ matrix.version }}

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
### Fixes
66

77
- Native AOT: don't load SentryNative on unsupported platforms ([#4347](https://github.com/getsentry/sentry-dotnet/pull/4347))
8+
- Fixed issue introduced in release 5.12.0 that might prevent other middleware or user code from reading request bodies ([#4373](https://github.com/getsentry/sentry-dotnet/pull/4373))
89
- SentryTunnelMiddleware overwrites the X-Forwarded-For header ([#4375](https://github.com/getsentry/sentry-dotnet/pull/4375))
910

1011
### Dependencies
1112

12-
- Bump CLI from v2.47.0 to v2.50.0 ([#4348](https://github.com/getsentry/sentry-dotnet/pull/4348), [#4370](https://github.com/getsentry/sentry-dotnet/pull/4370))
13-
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2500)
14-
- [diff](https://github.com/getsentry/sentry-cli/compare/2.47.0...2.50.0)
13+
- Bump CLI from v2.47.0 to v2.50.2 ([#4348](https://github.com/getsentry/sentry-dotnet/pull/4348), [#4370](https://github.com/getsentry/sentry-dotnet/pull/4370), [#4378](https://github.com/getsentry/sentry-dotnet/pull/4378))
14+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2502)
15+
- [diff](https://github.com/getsentry/sentry-cli/compare/2.47.0...2.50.2)
1516

1617
## 5.12.0
1718

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
<!-- Set the version and local path for Sentry CLI (downloaded in the restore phase of Sentry.csproj) -->
8888
<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
89-
<SentryCLIVersion>2.50.0</SentryCLIVersion>
89+
<SentryCLIVersion>2.50.2</SentryCLIVersion>
9090
<SentryCLIDirectory>$(MSBuildThisFileDirectory)tools\sentry-cli\$(SentryCLIVersion)\</SentryCLIDirectory>
9191
</PropertyGroup>
9292

samples/Sentry.Samples.AspNetCore.Mvc/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
// You can also register as many ISentryEventProcessor as you need.
7676
builder.Services.AddTransient<ISentryEventProcessor, ExampleEventProcessor>();
7777

78+
// Add tunneling middleware.
79+
// Note that UseSentryTunneling also needs to be called on the IApplicationBuilder
7880
builder.Services.AddSentryTunneling();
7981

8082
// Everything after this is just the boilerplate code generated by dotnet new mvc
@@ -83,6 +85,10 @@
8385

8486
var app = builder.Build();
8587

88+
// Configure a tunneling endpoint to forward Sentry envelopes to a Sentry server.
89+
// Note that AddSentryTunneling() must also be called on the IServiceCollection
90+
app.UseSentryTunneling();
91+
8692
if (!app.Environment.IsDevelopment())
8793
{
8894
app.UseExceptionHandler("/Home/Error");

src/Sentry/Extensibility/BaseRequestPayloadExtractor.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@ public abstract class BaseRequestPayloadExtractor : IRequestPayloadExtractor
1818
return null;
1919
}
2020

21-
if (request.Body is not { CanRead: true } || !IsSupported(request))
21+
if (request.Body == null
22+
|| !request.Body.CanSeek
23+
|| !request.Body.CanRead
24+
|| !IsSupported(request))
2225
{
2326
return null;
2427
}
2528

26-
if (!request.Body.CanSeek)
27-
{
28-
// When RequestDecompression is enabled, the RequestDecompressionMiddleware will store a SizeLimitedStream
29-
// in the request body after decompression. Seek operations throw an exception, but we can still read the stream
30-
return DoExtractPayLoad(request);
31-
}
32-
3329
var originalPosition = request.Body.Position;
3430
try
3531
{

src/Sentry/Sentry.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@
113113
<_OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</_OSArchitecture>
114114
</PropertyGroup>
115115
<ItemGroup>
116-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Darwin-arm64" FileHash="e06af6e72fd23b6d5a6b7baaab61767cb71fc6fea486c7f5498a08bfcd58eedd" />
117-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Darwin-x86_64" FileHash="a055429e5e671d35ccc020934dd0a2ec0572efc47656be29b4315f388653ec98" />
118-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Linux-aarch64" FileHash="d9bc23158a30b4987dfc36494375aa86f1adcf1fb3dd2acb1245d3a4fae4179c" />
119-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Linux-i686" FileHash="29a843be810a8987216ce46c41edffe2e21813999888a4bdf5034ed3223ba541" />
120-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Linux-x86_64" FileHash="89b1b1cd10c16d817a70ee5bb6673ccdcc48936648f6f281b8d576a3044430c9" />
121-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Windows-i686.exe" FileHash="724eeacac294d2e902ec0f9444f47e1454d7d3743931a9af1bac298f908d6afc" />
122-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) != 'X86')" Include="sentry-cli-Windows-x86_64.exe" FileHash="090fdd6d59c88436c0de98d91d930b4be2905e60f4f948396750fd33340fa62b" />
116+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Darwin-arm64" FileHash="421ddd9d6efb690502af1ae4e7a55dffa7b0f8469f43083cd1aa8cf21d96ae8f" />
117+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Darwin-x86_64" FileHash="0fc5dbb6403e61641e979d3f6cac9b98051c30cd8891a4e2bf1d84d207cb8c47" />
118+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Linux-aarch64" FileHash="872afe27ff00c71f1c346931d625e8fa2897bd1543d31be16075cc97f5ea99ab" />
119+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Linux-i686" FileHash="d272ba5b1655ef0c851d9a74b574bcc3de1554ae26a94649045a215821c55bed" />
120+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Linux-x86_64" FileHash="d003d220e2fe07c84297f9586682fc2fbd848357833ae13de5e214ff42a62f16" />
121+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Windows-i686.exe" FileHash="309d91881dd9c798c3744aecb6f1b61dd7fa837818a9989f8cd69ad9080fe848" />
122+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) != 'X86')" Include="sentry-cli-Windows-x86_64.exe" FileHash="022d1e14fb76612a80cd209af4387ffeb0c02374910de5b61b0ecf3822b50947" />
123123
</ItemGroup>
124124

125125
<!-- Download the files -->

test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,20 @@
3131
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_InnerBuildTestAPKs" Properties="TargetFramework=net9.0-android" Condition="$(TargetFramework) == 'net9.0'" />
3232
</Target>
3333
<Target Name="_InnerBuildTestAPKs">
34-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="_Aot=False;_Store=False;_Compressed=False" />
35-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="_Aot=False;_Store=False;_Compressed=True" />
36-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="_Aot=False;_Store=True;_Compressed=False" />
37-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="_Aot=False;_Store=True;_Compressed=True" />
38-
39-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=False;_Compressed=False" />
40-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=False;_Compressed=True" />
41-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=True;_Compressed=False" />
42-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=True;_Compressed=True" />
34+
<!-- https://learn.microsoft.com/visualstudio/msbuild/msbuild-batching -->
35+
<ItemGroup>
36+
<_TestAPK Include="1" Properties="_Aot=False;_Store=False;_Compressed=False" />
37+
<_TestAPK Include="2" Properties="_Aot=False;_Store=False;_Compressed=True" />
38+
<_TestAPK Include="3" Properties="_Aot=False;_Store=True;_Compressed=False" />
39+
<_TestAPK Include="4" Properties="_Aot=False;_Store=True;_Compressed=True" />
40+
41+
<_TestAPK Include="5" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=False;_Compressed=False" />
42+
<_TestAPK Include="6" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=False;_Compressed=True" />
43+
<_TestAPK Include="7" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=True;_Compressed=False" />
44+
<_TestAPK Include="8" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=True;_Compressed=True" />
45+
</ItemGroup>
46+
47+
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="%(_TestAPK.Properties)" BuildInParallel="false" />
4348
</Target>
4449
<Target Name="_BuildTestAPK">
4550
<PropertyGroup>

0 commit comments

Comments
 (0)