From db1add5364334c458e784bc07cafd06be11babe9 Mon Sep 17 00:00:00 2001 From: Daniel McAssey Date: Tue, 20 Jan 2026 12:08:54 +0000 Subject: [PATCH 1/5] fix(targets): fix #4849 by adding support for SENTRY_ALLOW_FAILURE --- src/Sentry/buildTransitive/Sentry.targets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sentry/buildTransitive/Sentry.targets b/src/Sentry/buildTransitive/Sentry.targets index aec5ce411b..5f72d620ef 100644 --- a/src/Sentry/buildTransitive/Sentry.targets +++ b/src/Sentry/buildTransitive/Sentry.targets @@ -130,6 +130,8 @@ $(SentryCLIDebugFilesUploadCommand) $(SentryCLIUploadOptions.Trim()) $(SentryCLIBaseCommand) upload-proguard $(_SentryCLIProGuardOptions) $(SentryCLIProGuardMappingUploadCommand) $(SentryCLIUploadOptions.Trim()) + + true @@ -141,7 +143,7 @@ - + <_SentryCLIRequestFailed Condition="$(_SentryCLIOutput.Contains('API request failed'))">true Date: Tue, 20 Jan 2026 12:19:15 +0000 Subject: [PATCH 2/5] fix(targets): add allow failure in propose-version --- src/Sentry/buildTransitive/Sentry.targets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sentry/buildTransitive/Sentry.targets b/src/Sentry/buildTransitive/Sentry.targets index 5f72d620ef..f748197ea9 100644 --- a/src/Sentry/buildTransitive/Sentry.targets +++ b/src/Sentry/buildTransitive/Sentry.targets @@ -362,7 +362,9 @@ + Command="sentry-cli releases propose-version" + IgnoreExitCode="'$(SENTRY_ALLOW_FAILURE)' == 'true'" + ContinueOnError="WarnAndContinue"> From 24681f42b2d88dc555cc001713da5b81fe71e886 Mon Sep 17 00:00:00 2001 From: Daniel McAssey Date: Tue, 20 Jan 2026 12:31:45 +0000 Subject: [PATCH 3/5] ref(targets): tweak target check based on review --- src/Sentry/buildTransitive/Sentry.targets | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Sentry/buildTransitive/Sentry.targets b/src/Sentry/buildTransitive/Sentry.targets index f748197ea9..1075a2d041 100644 --- a/src/Sentry/buildTransitive/Sentry.targets +++ b/src/Sentry/buildTransitive/Sentry.targets @@ -19,6 +19,7 @@ Sentry.Attributes$(MSBuildProjectExtension.Replace('proj', '')) $([System.Guid]::NewGuid()) + true $(SentryCLIDebugFilesUploadCommand) $(SentryCLIUploadOptions.Trim()) $(SentryCLIBaseCommand) upload-proguard $(_SentryCLIProGuardOptions) $(SentryCLIProGuardMappingUploadCommand) $(SentryCLIUploadOptions.Trim()) - - true @@ -363,8 +362,8 @@ + IgnoreExitCode="'$(SentryAllowFailure)' == 'true'" + ContinueOnError="'$(SentryAllowFailure)' == 'true'"> From b1283776fccfcf4da20a4ae10e22486bfdc3c66b Mon Sep 17 00:00:00 2001 From: Daniel McAssey Date: Tue, 20 Jan 2026 12:40:51 +0000 Subject: [PATCH 4/5] fix(targets): fix allow failure check correctly --- src/Sentry/buildTransitive/Sentry.targets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Sentry/buildTransitive/Sentry.targets b/src/Sentry/buildTransitive/Sentry.targets index 1075a2d041..11479ea712 100644 --- a/src/Sentry/buildTransitive/Sentry.targets +++ b/src/Sentry/buildTransitive/Sentry.targets @@ -142,7 +142,7 @@ - + <_SentryCLIRequestFailed Condition="$(_SentryCLIOutput.Contains('API request failed'))">true + IgnoreExitCode="$(SentryAllowFailure)" + ContinueOnError="$(SentryAllowFailure)"> @@ -372,7 +372,7 @@ + Condition="'$(SentryCLI)' != '' and '$(SentryCreateRelease)' == 'true' and '$(_SentryRelease)' != ''"> + Condition="'$(SentryCLI)' != '' and '$(SentrySetCommits)' == 'true' and '$(_SentryRelease)' != ''"> Date: Fri, 23 Jan 2026 10:20:28 +1300 Subject: [PATCH 5/5] Update CHANGELOG with new features and fixes Added a section for fixes and documented a new feature and dependency update. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26bbf20371..b9ebfde8ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Extended `SentryThread` by `Main` to allow indication whether the thread is considered the current main thread ([#4807](https://github.com/getsentry/sentry-dotnet/pull/4807)) +### Fixes + +- Allow Sentry failures from the Sentry CLI when SENTRY_ALLOW_FAILURE is set (#4852) + ### Dependencies - Bump Native SDK from v0.12.2 to v0.12.3 ([#4832](https://github.com/getsentry/sentry-dotnet/pull/4832))