Skip to content

Fix attachment streaming errors and add observability for failed attachments#136

Merged
gasperzgonec merged 26 commits intomainfrom
gasperz/ISS-247801
Feb 27, 2026
Merged

Fix attachment streaming errors and add observability for failed attachments#136
gasperzgonec merged 26 commits intomainfrom
gasperz/ISS-247801

Conversation

@gasperzgonec
Copy link
Copy Markdown
Contributor

@gasperzgonec gasperzgonec commented Jan 29, 2026

Description

This PR fixes the following issues:

  • Attachments of size 0 failing
  • Added more information for attachments that failed to upload

Connected Issues

Checklist

  • Tests added/updated and ran with npm run test OR no tests needed.
  • Ran backwards compatibility tests with npm run test:backwards-compatibility.
  • Code formatted and checked with npm run lint.
  • Tested airdrop-template linked to this PR.
  • Documentation updated and provided a link to PR / new docs OR no docs needed.

Before, some error messages contained [object Object], so I had to add
JSON.stringify(<error>) to fix that. I changed `. "+error` to `.",
error`, which automatically adds a space and stringifies the error.
@gasperzgonec gasperzgonec requested review from a team and radovanjorgic as code owners January 29, 2026 16:29
@gasperzgonec gasperzgonec changed the title Fix attachment streaming errors and add observability for failed attachments. Fix attachment streaming errors and add observability for failed attachments Jan 29, 2026
Comment thread src/uploader/uploader.ts Outdated
Comment thread src/uploader/uploader.ts Outdated
Comment thread src/types/extraction.ts
Comment thread src/multithreading/worker-adapter/worker-adapter.ts Outdated
Comment thread src/attachments-streaming/attachments-streaming-pool.ts Outdated
Comment thread src/attachments-streaming/attachments-streaming-pool.ts Outdated
Comment thread src/multithreading/worker-adapter/worker-adapter.ts Outdated
Comment thread src/multithreading/worker-adapter/worker-adapter.ts
Comment thread src/uploader/uploader.ts Outdated
Comment thread src/uploader/uploader.ts Outdated
Comment thread src/attachments-streaming/attachments-streaming-pool.ts Outdated
Comment thread src/multithreading/worker-adapter/worker-adapter.ts Outdated
Comment thread src/multithreading/worker-adapter/worker-adapter.ts
Comment thread src/attachments-streaming/attachments-streaming-pool.ts Outdated
Comment thread src/uploader/uploader.ts Outdated
Comment thread src/uploader/uploader.ts Outdated
gasperzgonec and others added 10 commits February 19, 2026 15:32
Co-authored-by: Radovan Jorgić <radovanjorgic14@gmail.com>
Fixed backward compatibility by updating the latest.json with one
generated with the new api-extractor on origin/main.
Updated a few iffy callpoints and conditions.
We have been checking for the `isTimeout` in the `processAttachment`,
which caused us to exit the function processing early and we were
catching that, as we wouldn't have been able to finish processing the
following attachments. I've removed that check, so now we can still
finish processing the attachments that are still in store, as underlying
functions don't really have checks for the `isTimeout`.
Comment thread src/attachments-streaming/attachments-streaming-pool.ts
Comment thread src/attachments-streaming/attachments-streaming-pool.ts
Comment thread src/uploader/uploader.ts Outdated
Comment thread src/uploader/uploader.ts Outdated
Comment thread src/attachments-streaming/attachments-streaming-pool.test.ts Outdated
Comment thread src/attachments-streaming/attachments-streaming-pool.test.ts Outdated
Copy link
Copy Markdown
Collaborator

@radovanjorgic radovanjorgic left a comment

Choose a reason for hiding this comment

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

Can you please re-check serializeError is used across the codebase (or at least in files related to attachments for now) and it is not double stringified anywhere.

Comment thread src/multithreading/process-task.ts
@gasperzgonec gasperzgonec merged commit 18110e9 into main Feb 27, 2026
8 checks passed
@gasperzgonec gasperzgonec deleted the gasperz/ISS-247801 branch February 27, 2026 08:40
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