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

feat(@medplum/core) Add AbortSignal support to client's createBinary and createAttachment methods #3420

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

dillonstreator
Copy link
Contributor

Add AbortSignal support to createBinary and createAttachment by exposing an optional signal: AbortSignal that is propagated to the clients fetch interface as well as the XMLHttpRequest

@dillonstreator dillonstreator requested a review from a team as a code owner November 29, 2023 00:57
Copy link

vercel bot commented Nov 29, 2023

@dillonstreator is attempting to deploy a commit to the Medplum Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Nov 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medplum-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 29, 2023 11:49pm
medplum-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 29, 2023 11:49pm
medplum-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 29, 2023 11:49pm

Copy link
Contributor

sweep-ai bot commented Nov 29, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link
Member

@codyebberson codyebberson left a comment

Choose a reason for hiding this comment

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

Thanks @dillonstreator - overall, this looks great to me, and this is a great feature.

See comment on using options: RequestInit for param type.

packages/core/src/client.ts Outdated Show resolved Hide resolved

// Ensure the 'abort' event listener is removed from the signal to prevent memory leaks,
// especially in scenarios where there is a long-lived signal across multiple requests.
const handleSignalAbort = (): void => xhr.abort();
Copy link
Member

Choose a reason for hiding this comment

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

Nice 👍

@codyebberson codyebberson added this pull request to the merge queue Nov 30, 2023
Merged via the queue into medplum:main with commit 932e077 Nov 30, 2023
13 checks passed
@reshmakh reshmakh added this to the November 30, 2023 milestone Dec 1, 2023
medplumbot added a commit that referenced this pull request Dec 2, 2023
Fixes #3391 - setup git in preapare-release-yml (#3448)
Create example bots that use a shared code library (#3441)
Fixes #2789 - support 'delete' subscriptions with bots (#3426) (#3445)
Fixes #3391 - github action for prepare-release.sh (#3443)
Revert "Fixes #2789 - support 'delete' subscriptions with bots (#3426)" (#3444)
Update AWS instructions (#3437)
Bump @adobe/css-tools from 4.3.1 to 4.3.2 (#3440)
Fix ValidBot warnings (#3438)
Fixes #3404 - add Referrer-Policy and Permissions-Policy headers (#3436)
Fixes #2789 - support 'delete' subscriptions with bots (#3426)
Agent source cleanup (#3431)
Stop reviving removed meta properties (#3432)
Create docs for building questionnaires (#3393)
feat(@medplum/core) Add `AbortSignal` support to client's `createBinary` and `createAttachment` methods (#3420)
Fixes #3401 - Handle no AWS credentials in AWS init tool (#3418)
Revert "`BinarySource` supporting `ReadableStream` (#3411)" (#3421)
Add bulleted list of SuperAdmin priveleges (#3408)
Add a note that config must be updated locally when making changes (#3410)
Improve linking for using binary data (#3406)
Fixes #3413 - set meta.author when updating access policy (#3419)
`BinarySource` supporting `ReadableStream` (#3411)
Handle non-string code in formatCoding (#3415)
Fixes #3414 - use ESM in example apps (#3416)
Fixes #3389 - add vercel.json config to examples (#3417)
feat(fhircast): add `heartbeat` event (#3350)
Add note about graphql respecting access policies (#3403)
Fixes #3395 - Build scripts handle no git repo (#3400)
Dependency upgrades (#3397)
Add callout for batch vs transaction bundles (#3399)
Fixes #3395 - Build scripts handle no git repo (#3396)
Improve examples in the include search docs (#3359)
QuestionnaireBuilder Autosave (#3253)
chore(package.json): add `private: true` to root (#3390)
Docs: FHIR Profile Creation & Search (#3357)
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2023
Fixes #3391 - setup git in preapare-release-yml (#3448)
Create example bots that use a shared code library (#3441)
Fixes #2789 - support 'delete' subscriptions with bots (#3426) (#3445)
Fixes #3391 - github action for prepare-release.sh (#3443)
Revert "Fixes #2789 - support 'delete' subscriptions with bots (#3426)" (#3444)
Update AWS instructions (#3437)
Bump @adobe/css-tools from 4.3.1 to 4.3.2 (#3440)
Fix ValidBot warnings (#3438)
Fixes #3404 - add Referrer-Policy and Permissions-Policy headers (#3436)
Fixes #2789 - support 'delete' subscriptions with bots (#3426)
Agent source cleanup (#3431)
Stop reviving removed meta properties (#3432)
Create docs for building questionnaires (#3393)
feat(@medplum/core) Add `AbortSignal` support to client's `createBinary` and `createAttachment` methods (#3420)
Fixes #3401 - Handle no AWS credentials in AWS init tool (#3418)
Revert "`BinarySource` supporting `ReadableStream` (#3411)" (#3421)
Add bulleted list of SuperAdmin priveleges (#3408)
Add a note that config must be updated locally when making changes (#3410)
Improve linking for using binary data (#3406)
Fixes #3413 - set meta.author when updating access policy (#3419)
`BinarySource` supporting `ReadableStream` (#3411)
Handle non-string code in formatCoding (#3415)
Fixes #3414 - use ESM in example apps (#3416)
Fixes #3389 - add vercel.json config to examples (#3417)
feat(fhircast): add `heartbeat` event (#3350)
Add note about graphql respecting access policies (#3403)
Fixes #3395 - Build scripts handle no git repo (#3400)
Dependency upgrades (#3397)
Add callout for batch vs transaction bundles (#3399)
Fixes #3395 - Build scripts handle no git repo (#3396)
Improve examples in the include search docs (#3359)
QuestionnaireBuilder Autosave (#3253)
chore(package.json): add `private: true` to root (#3390)
Docs: FHIR Profile Creation & Search (#3357)
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

3 participants