Skip to content

File attachment integration branch#1804

Merged
fractalwrench merged 20 commits intomainfrom
file-attachment-api
Jan 29, 2025
Merged

File attachment integration branch#1804
fractalwrench merged 20 commits intomainfrom
file-attachment-api

Conversation

@fractalwrench
Copy link
Member

@fractalwrench fractalwrench commented Jan 10, 2025

Goal

Adds an API for logging a message with a file attachment. This API is not fully functional yet and only creates a log message in the existing way, without any attachment.

Testing

Added skeleton of integration tests.

@codecov
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 89.77273% with 18 lines in your changes missing coverage. Please review.

Project coverage is 85.38%. Comparing base (3a22455) to head (ad53a57).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
...mbracesdk/internal/api/delegate/LogsApiDelegate.kt 81.08% 2 Missing and 5 partials ⚠️
...nal/resurrection/PayloadResurrectionServiceImpl.kt 0.00% 0 Missing and 2 partials ⚠️
...elivery/execution/OkHttpRequestExecutionService.kt 95.00% 0 Missing and 2 partials ⚠️
...nal/delivery/storage/CachedLogEnvelopeStoreImpl.kt 0.00% 0 Missing and 2 partials ⚠️
...roid/embracesdk/internal/logs/EmbraceLogService.kt 75.00% 0 Missing and 1 partial ⚠️
...embracesdk/internal/logs/attachments/Attachment.kt 94.11% 1 Missing ⚠️
...dk/internal/session/orchestrator/V1PayloadStore.kt 0.00% 1 Missing ⚠️
...ndroid/embracesdk/internal/delivery/PayloadType.kt 93.33% 0 Missing and 1 partial ⚠️
.../java/io/embrace/android/embracesdk/EmbraceImpl.kt 92.30% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1804      +/-   ##
==========================================
+ Coverage   85.34%   85.38%   +0.04%     
==========================================
  Files         473      474       +1     
  Lines       11079    11158      +79     
  Branches     1660     1680      +20     
==========================================
+ Hits         9455     9527      +72     
+ Misses        888      882       -6     
- Partials      736      749      +13     
Files with missing lines Coverage Δ
...oid/embracesdk/internal/injection/LogModuleImpl.kt 92.10% <100.00%> (+0.67%) ⬆️
...ace/android/embracesdk/internal/logs/LogService.kt 100.00% <100.00%> (ø)
...k/internal/logs/attachments/AttachmentErrorCode.kt 100.00% <ø> (ø)
...sdk/internal/logs/attachments/AttachmentService.kt 100.00% <100.00%> (ø)
...sdk/internal/opentelemetry/EmbraceAttributeKeys.kt 100.00% <100.00%> (ø)
...dk/internal/session/orchestrator/V2PayloadStore.kt 95.12% <100.00%> (+0.67%) ⬆️
...cesdk/internal/delivery/StoredTelemetryMetadata.kt 79.31% <100.00%> (-0.69%) ⬇️
...racesdk/internal/delivery/SupportedEnvelopeType.kt 100.00% <100.00%> (ø)
...esdk/internal/delivery/intake/IntakeServiceImpl.kt 100.00% <100.00%> (ø)
...sdk/internal/delivery/storage/AttachmentStorage.kt 100.00% <100.00%> (ø)
... and 12 more

... and 2 files with indirect coverage changes

@fractalwrench fractalwrench changed the base branch from file-attachment to add-endpoint January 13, 2025 13:09
@fractalwrench fractalwrench force-pushed the add-endpoint branch 2 times, most recently from 3567a47 to de1fe3b Compare January 13, 2025 13:59
Base automatically changed from add-endpoint to main January 13, 2025 14:23
@fractalwrench fractalwrench changed the base branch from main to refactor-log-impl-2 January 13, 2025 14:37
@fractalwrench fractalwrench force-pushed the file-attachment-api branch 2 times, most recently from 06f92e1 to a61c5c5 Compare January 13, 2025 15:12
@fractalwrench fractalwrench changed the title poc: file attachment api [DNM] File attachment API Jan 13, 2025
@fractalwrench fractalwrench marked this pull request as ready for review January 13, 2025 15:14
Base automatically changed from refactor-log-impl-2 to main January 14, 2025 09:28
@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@fractalwrench fractalwrench changed the title [DNM] File attachment API File attachment integration branch Jan 29, 2025
val parts = mutableListOf<FormPart>()

reader.use {
while (true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe you can use something like generateSequence { it.nextPart() }, and map the result to a FormPart. The while(true) looks weird, though it does the same 😅

Copy link
Contributor

@bidetofevil bidetofevil left a comment

Choose a reason for hiding this comment

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

LGTM

@fractalwrench fractalwrench merged commit 4f35440 into main Jan 29, 2025
7 checks passed
@fractalwrench fractalwrench deleted the file-attachment-api branch January 29, 2025 17:15
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.

3 participants