Skip to content

ref: add sentry_attachment_t accessors - #2009

Merged
jpnurmi merged 2 commits into
masterfrom
jpnurmi/ref/attachments-prep
Aug 25, 2026
Merged

ref: add sentry_attachment_t accessors#2009
jpnurmi merged 2 commits into
masterfrom
jpnurmi/ref/attachments-prep

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

This is a non-breaking preparation step for the breaking stacked PR:

This adds internal accessors for attachment properties, reducing direct access to the sentry_attachment_s data structure and moving mechanical churn out of #1974. This makes the large value-based attachment migration slightly smaller, easier to review, and less conflict-prone without changing behavior, and helps with partial pre-migration of console repos.

#skip-changelog (internal)

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.58824% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.37%. Comparing base (69639a0) to head (688a863).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2009      +/-   ##
==========================================
- Coverage   74.69%   74.37%   -0.32%     
==========================================
  Files         104      104              
  Lines       26182    26563     +381     
  Branches     4740     4834      +94     
==========================================
+ Hits        19557    19757     +200     
- Misses       5295     5464     +169     
- Partials     1330     1342      +12     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@limbonaut limbonaut left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good! Just need a null check in one place.

Comment thread src/sentry_envelope.c
Comment on lines +739 to +740
sentry_path_t *path = sentry__attachment_make_path(attachment);
item = sentry__envelope_add_from_path(envelope, path, "attachment");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we check if path allocation was successful?

@jpnurmi
jpnurmi merged commit ef47f64 into master Aug 25, 2026
68 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/ref/attachments-prep branch August 25, 2026 17:13
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.

2 participants