Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dont fail for attachment read error #1378

Merged
merged 6 commits into from
Dec 10, 2021

Conversation

SimonCropp
Copy link
Contributor

@SimonCropp SimonCropp commented Dec 10, 2021

instead log to DiagnosticLogger

related to #1375

instead log to DiagnosticLogger
@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2021

Codecov Report

Merging #1378 (de914bf) into main (416e6b5) will increase coverage by 0.00%.
The diff coverage is 77.77%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1378   +/-   ##
=======================================
  Coverage   82.67%   82.67%           
=======================================
  Files         215      215           
  Lines        7152     7159    +7     
  Branches     1408     1410    +2     
=======================================
+ Hits         5913     5919    +6     
  Misses        805      805           
- Partials      434      435    +1     
Impacted Files Coverage Δ
src/Sentry/Envelopes/Envelope.cs 96.77% <75.00%> (-2.07%) ⬇️
src/Sentry/SentryClient.cs 94.30% <100.00%> (ø)
...Sentry/Extensibility/DiagnosticLoggerExtensions.cs 41.02% <0.00%> (+1.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 416e6b5...de914bf. Read the comment docs.

@bruno-garcia
Copy link
Member

Since the net6 upgrade, Ben.Demystifier tests got flaky:

Error: Ben.Demystifier.Test.NonThrownException.Current: Assert.Equal() Failure
  Failed Ben.Demystifier.Test.NonThrownException.Current [5 ms]
  Error Message:
   Assert.Equal() Failure
Expected: String[] ["   at bool System.Threading.ThreadPoolWorkQueue.Di"..., "   at void System.Threading.PortableThreadPool+Wor"..., "   at void System.Threading.Thread.StartCallback()"]
Actual:   WhereArrayIterator<String> ["   at bool System.Threading.ThreadPoolWorkQueue.Di"..., "   at void System.Threading.PortableThreadPool+Wor"...]
  Stack Trace:
     at Ben.Demystifier.Test.NonThrownException.Current() in /home/runner/work/sentry-dotnet/sentry-dotnet/modules/Ben.Demystifier/test/Ben.Demystifier.Test/NonThrownException.cs:line 110
--- End of stack trace from previous location ---
Test run for /home/runner/work/sentry-dotnet/sentry-dotnet/test/Sentry.Log4Net.Tests/bin/Release/net461/Sentry.Log4Net.Tests.dll (.NETFramework,Version=v4.6.1)
Microsoft (R) Test Execution Command Line Tool Version 17.0.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Thanks!

src/Sentry/Envelopes/Envelope.cs Outdated Show resolved Hide resolved
@bruno-garcia bruno-garcia enabled auto-merge (squash) December 10, 2021 02:08
@bruno-garcia bruno-garcia merged commit 23cbf3d into main Dec 10, 2021
@bruno-garcia bruno-garcia deleted the dont-fail-for-attachment-exception branch December 10, 2021 05:15
}
catch (Exception exception)
{
if (logger is null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out we continue to fail because no logger is passed when Debug=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants