WeTransfer / Diagnostics

Allow users to easily share Diagnostics with your support team to improve the flow of fixing bugs.
MIT License
933 stars 53 forks source link

[TMOB 5115] Trim using lines instead of bytes #166

Closed AvdLee closed 3 months ago

AvdLee commented 4 months ago

We found several broken Diagnostics reports where the HTML would not longer be valid. This turned out to be caused by our trimmer which trimmed based on byte size rather than looking at HTML components.

This PR fixes this by removing N number of lines when the log size is too big.

wetransferplatform commented 4 months ago
Messages
:book: DiagnosticsTests: Executed 35 tests (0 failed, 0 retried, 0 skipped) in 10.226 seconds
:book: Slowest test: DiagnosticsReporterTests/testReportingChapters() (2.015s)
:book: Slowest test: DiagnosticsReporterTests/testWithSmartInsightsProviderReturningNoExtraInsights() (2.008s)
:book: Slowest test: DiagnosticsReporterTests/testWithSmartInsightsProviderReturningExtraInsights() (2.007s)
:book: View more details on Bitrise

Code Coverage Report

Name Coverage
Diagnostics 64.86% ⚠️

SwiftLint found issues

Severity File Reason
Warning LogsReporterTests.swift:34 Line should be 140 characters or less; currently it has 157 characters (line_length)
Warning LogsReporterTests.swift:10 Imports should be sorted (sorted_imports)

Generated by :no_entry_sign: Danger Swift against 10306350de53e70fa47958c68f36d29c7b49bae4

wetransferplatform commented 3 months ago

Congratulations! :tada: This was released as part of Release 4.6.0 :rocket:

Generated by GitBuddy