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

Add response_body function to r2::ObjectBody. #462

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

mcnulty
Copy link
Contributor

@mcnulty mcnulty commented Mar 7, 2024

This commit adds a new function to r2::ObjectBody to allow the underlying ReadableStream for the body of an R2 object to be used to create a ResponseBody, via the ResponseBody::Stream variant.

This adds support for cases where workers can hand a reference to the R2 object to the workers runtime for streaming to the client, unmodified. Importantly, this allows the worker to avoid CPU usage while streaming the object.

Before this commit, ObjectBody::Stream could be used but that would result in unexpected CPU usage during the streaming process leading to the working hitting the CPU limit for large (> 150 MB) R2 objects.

Closes #389

This commit adds a new function to `r2::ObjectBody` to allow
the underlying `ReadableStream` for the body of an R2 object to
be used to create a `ResponseBody`, via the `ResponseBody::Stream`
variant.

This adds support for cases where workers can hand a reference to
the R2 object to the workers runtime for streaming to the client,
unmodified. Importantly, this allows the worker to avoid CPU usage
while streaming the object.

Before this commit, `ObjectBody::Stream` could be used but that
would result in unexpected CPU usage during the streaming process
leading to the working hitting the CPU limit for large (> 150 MB)
R2 objects.

Closes #389
@kflansburg kflansburg merged commit 3b92e32 into cloudflare:main Mar 7, 2024
3 checks passed
jakubadamw added a commit to grafbase/grafbase that referenced this pull request Mar 10, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
| [@apollo/client](https://www.apollographql.com/docs/react/)
([source](https://togithub.com/apollographql/apollo-client)) | [`3.9.5`
->
`3.9.6`](https://renovatebot.com/diffs/npm/@apollo%2fclient/3.9.5/3.9.6)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@apollo%2fclient/3.9.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@apollo%2fclient/3.9.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@apollo%2fclient/3.9.5/3.9.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@apollo%2fclient/3.9.5/3.9.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | patch |
| [@pathfinder-ide/react](https://togithub.com/grafbase/pathfinder)
([source](https://togithub.com/grafbase/pathfinder/tree/HEAD/packages/react))
| [`0.7.1` ->
`0.7.2`](https://renovatebot.com/diffs/npm/@pathfinder-ide%2freact/0.7.1/0.7.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@pathfinder-ide%2freact/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@pathfinder-ide%2freact/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@pathfinder-ide%2freact/0.7.1/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@pathfinder-ide%2freact/0.7.1/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | patch |
|
[@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node))
| [`20.11.24` ->
`20.11.25`](https://renovatebot.com/diffs/npm/@types%2fnode/20.11.24/20.11.25)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.11.24/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.11.24/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
|
[@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react))
| [`18.2.61` ->
`18.2.64`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.61/18.2.64)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.2.61/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.2.61/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
|
[@types/react-dom](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom))
| [`18.2.19` ->
`18.2.21`](https://renovatebot.com/diffs/npm/@types%2freact-dom/18.2.19/18.2.21)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact-dom/18.2.21?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact-dom/18.2.21?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact-dom/18.2.19/18.2.21?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact-dom/18.2.19/18.2.21?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [bun](https://bun.sh) ([source](https://togithub.com/oven-sh/bun)) |
[`1.0.29` ->
`1.0.30`](https://renovatebot.com/diffs/npm/bun/1.0.29/1.0.30) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/bun/1.0.30?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/bun/1.0.30?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/bun/1.0.29/1.0.30?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/bun/1.0.29/1.0.30?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [chrono](https://togithub.com/chronotope/chrono) | `0.4.34` ->
`0.4.35` |
[![age](https://developer.mend.io/api/mc/badges/age/crate/chrono/0.4.35?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/chrono/0.4.35?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/chrono/0.4.34/0.4.35?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/chrono/0.4.34/0.4.35?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | patch |
|
[eslint-config-next](https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config)
([source](https://togithub.com/vercel/next.js/tree/HEAD/packages/eslint-config-next))
| [`14.1.1` ->
`14.1.3`](https://renovatebot.com/diffs/npm/eslint-config-next/14.1.1/14.1.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-config-next/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-config-next/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-config-next/14.1.1/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-config-next/14.1.1/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | patch |
| [houdini](https://togithub.com/HoudiniGraphql/houdini) | [`1.2.42` ->
`1.2.44`](https://renovatebot.com/diffs/npm/houdini/1.2.42/1.2.44) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/houdini/1.2.44?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/houdini/1.2.44?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/houdini/1.2.42/1.2.44?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/houdini/1.2.42/1.2.44?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | patch |
| [next](https://nextjs.org)
([source](https://togithub.com/vercel/next.js)) | [`14.1.1` ->
`14.1.3`](https://renovatebot.com/diffs/npm/next/14.1.1/14.1.3) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/next/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/next/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/next/14.1.1/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/next/14.1.1/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [reqwest](https://togithub.com/seanmonstar/reqwest) | `0.11.24` ->
`0.11.25` |
[![age](https://developer.mend.io/api/mc/badges/age/crate/reqwest/0.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/reqwest/0.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/reqwest/0.11.24/0.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/reqwest/0.11.24/0.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| workspace.dependencies | patch |
| [rustls-pemfile](https://togithub.com/rustls/pemfile) | `2.1.0` ->
`2.1.1` |
[![age](https://developer.mend.io/api/mc/badges/age/crate/rustls-pemfile/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/rustls-pemfile/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/rustls-pemfile/2.1.1/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/rustls-pemfile/2.1.1/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| workspace.dependencies | patch |
| [swc_ecma_ast](https://togithub.com/swc-project/swc) | `0.112.4` ->
`0.112.5` |
[![age](https://developer.mend.io/api/mc/badges/age/crate/swc_ecma_ast/0.112.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/swc_ecma_ast/0.112.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/swc_ecma_ast/0.112.4/0.112.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/swc_ecma_ast/0.112.4/0.112.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | patch |
| [swc_ecma_parser](https://togithub.com/swc-project/swc) | `0.143.6` ->
`0.143.8` |
[![age](https://developer.mend.io/api/mc/badges/age/crate/swc_ecma_parser/0.143.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/swc_ecma_parser/0.143.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/swc_ecma_parser/0.143.6/0.143.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/swc_ecma_parser/0.143.6/0.143.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | patch |
| [type-fest](https://togithub.com/sindresorhus/type-fest) | [`4.10.3`
-> `4.12.0`](https://renovatebot.com/diffs/npm/type-fest/4.10.3/4.12.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/type-fest/4.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/type-fest/4.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/type-fest/4.10.3/4.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/type-fest/4.10.3/4.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | minor |
| [typescript](https://www.typescriptlang.org/)
([source](https://togithub.com/Microsoft/TypeScript)) | [`5.3.3` ->
`5.4.2`](https://renovatebot.com/diffs/npm/typescript/5.3.3/5.4.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/typescript/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript/5.3.3/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript/5.3.3/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | minor |
| [vite](https://vitejs.dev)
([source](https://togithub.com/vitejs/vite/tree/HEAD/packages/vite)) |
[`5.1.4` -> `5.1.5`](https://renovatebot.com/diffs/npm/vite/5.1.4/5.1.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.1.4/5.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.1.4/5.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [worker](https://togithub.com/cloudflare/workers-rs) | `0.0.19` ->
`0.0.20` |
[![age](https://developer.mend.io/api/mc/badges/age/crate/worker/0.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/worker/0.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/worker/0.0.19/0.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/worker/0.0.19/0.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| workspace.dependencies | patch |

---

### Release Notes

<details>
<summary>apollographql/apollo-client (@&#8203;apollo/client)</summary>

###
[`v3.9.6`](https://togithub.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#396)

[Compare
Source](https://togithub.com/apollographql/apollo-client/compare/v3.9.5...v3.9.6)

##### Patch Changes

-
[#&#8203;11617](https://togithub.com/apollographql/apollo-client/pull/11617)
[`f1d8bc4`](https://togithub.com/apollographql/apollo-client/commit/f1d8bc40c3d8e39340f721f4f1c3fd0ed77b8a6b)
Thanks [@&#8203;phryneas](https://togithub.com/phryneas)! - Allow Apollo
Client instance to intercept hook functionality

-
[#&#8203;11638](https://togithub.com/apollographql/apollo-client/pull/11638)
[`bf93ada`](https://togithub.com/apollographql/apollo-client/commit/bf93adaa0321b573db0ea8fc3a5c364e1fdfeef3)
Thanks [@&#8203;jerelmiller](https://togithub.com/jerelmiller)! - Fix
issue where calling `fetchMore` from a suspense-enabled hook inside
`startTransition` caused an unnecessary rerender.

</details>

<details>
<summary>grafbase/pathfinder (@&#8203;pathfinder-ide/react)</summary>

###
[`v0.7.2`](https://togithub.com/grafbase/pathfinder/blob/HEAD/packages/react/CHANGELOG.md#072)

[Compare
Source](https://togithub.com/grafbase/pathfinder/compare/@pathfinder-ide/react@0.7.1...@pathfinder-ide/react@0.7.2)

##### Patch Changes

- [`1013845`](https://togithub.com/grafbase/pathfinder/commit/1013845):
Visual operation builder viz updates for deprecation notices and inline
fragments.

</details>

<details>
<summary>oven-sh/bun (bun)</summary>

###
[`v1.0.30`](https://togithub.com/oven-sh/bun/releases/tag/bun-v1.0.30):
Bun v1.0.30

[Compare
Source](https://togithub.com/oven-sh/bun/compare/bun-v1.0.29...bun-v1.0.30)

To install Bun v1.0.30:

```bash
curl https://bun.sh/install | bash

### or you can use npm
### npm install -g bun
```

To upgrade to Bun v1.0.30:

```bash
bun upgrade
```

##### **[Read Bun v1.0.30's release notes on Bun's
blog](https://bun.sh/blog/bun-v1.0.30)**

##### Thanks to 14 contributors!

-   [@&#8203;kyr0](https://togithub.com/kyr0)
-   [@&#8203;nektro](https://togithub.com/nektro)
-   [@&#8203;almmiko](https://togithub.com/almmiko)
-   [@&#8203;lgarron](https://togithub.com/lgarron)
-   [@&#8203;paperdave](https://togithub.com/paperdave)
-   [@&#8203;Electroid](https://togithub.com/Electroid)
-   [@&#8203;argosphil](https://togithub.com/argosphil)
-   [@&#8203;camero2734](https://togithub.com/camero2734)
-   [@&#8203;igorwessel](https://togithub.com/igorwessel)
-   [@&#8203;lucasmichot](https://togithub.com/lucasmichot)
-   [@&#8203;marvinruder](https://togithub.com/marvinruder)
-   [@&#8203;Yash-Singh1](https://togithub.com/Yash-Singh1)
-   [@&#8203;zackradisic](https://togithub.com/zackradisic)
-   [@&#8203;dylan-conway](https://togithub.com/dylan-conway)
-   [@&#8203;Jarred-Sumner](https://togithub.com/Jarred-Sumner)

</details>

<details>
<summary>chronotope/chrono (chrono)</summary>

###
[`v0.4.35`](https://togithub.com/chronotope/chrono/releases/tag/v0.4.35)

[Compare
Source](https://togithub.com/chronotope/chrono/compare/v0.4.34...v0.4.35)

Most of our efforts have shifted to improving the API for a 0.5 release,
for which cleanups and refactorings are landing on the 0.4.x branch.

The most significant changes in this release are two sets of
deprecations.

- We deprecated all timestamp-related methods on `NaiveDateTime`. The
reason is that a timestamp is defined to be in UTC. The `NaiveDateTime`
type doesn't know the offset from UTC, so it was technically wrong to
have these methods. The alternative is to use the similar methods on the
`DateTime<Utc>` type, or from the `TimeZone` trait.

Converting from `NaiveDateTime` to `DateTime<Utc>` is simple with
`.and_utc()`, and in the other direction with `.naive_utc()`.

- The panicking constructors of `TimeDelta` (the new name of the
`Duration` type) are deprecated. This was the last part of chrono that
defaulted to panicking on error, dating from before rust 1.0.

- A nice change is that `NaiveDate` now includes a niche. So now
`Option<NaiveDate>`, `Option<NaiveDateTime>` and `Option<DateTime<Tz>>`
are the same size as their base types.

- `format::Numeric` and `format::Fixed` are marked as `non_exhaustive`.
This will allow us to improve our formatting and parsing support, and we
have reason to believe this breaking change will have little to no
impact on users.

### Additions

- Add `DateTime::{from_timestamp_micros, from_timestamp_nanos}`
([#&#8203;1234](https://togithub.com/chronotope/chrono/issues/1234))
- Add getters to `Parsed`
([#&#8203;1465](https://togithub.com/chronotope/chrono/issues/1465))

### Deprecations

- Deprecate timestamp methods on `NaiveDateTime`
([#&#8203;1473](https://togithub.com/chronotope/chrono/issues/1473))
- Deprecate panicking constructors of `TimeDelta`
([#&#8203;1450](https://togithub.com/chronotope/chrono/issues/1450))

### Changes/fixes

- Use `NonZeroI32` inside `NaiveDate`
([#&#8203;1207](https://togithub.com/chronotope/chrono/issues/1207))
- Mark `format::Numeric` and `format::Fixed` as `non_exhaustive`
([#&#8203;1430](https://togithub.com/chronotope/chrono/issues/1430))
- `Parsed` fixes to error values
([#&#8203;1439](https://togithub.com/chronotope/chrono/issues/1439))
- Use `overflowing_naive_local` in `DateTime::checked_add*`
([#&#8203;1333](https://togithub.com/chronotope/chrono/issues/1333))
- Do complete range checks in `Parsed::set_*`
([#&#8203;1465](https://togithub.com/chronotope/chrono/issues/1465))

### Documentation

- Rustfmt doctests
([#&#8203;1452](https://togithub.com/chronotope/chrono/issues/1452))
- Improve docs for crate features
([#&#8203;1455](https://togithub.com/chronotope/chrono/issues/1455),
thanks [@&#8203;edmorley](https://togithub.com/edmorley))
- Add more documentation and examples to `Parsed`
([#&#8203;1439](https://togithub.com/chronotope/chrono/issues/1439))

### Internal

- Refactor `internals` module
([#&#8203;1428](https://togithub.com/chronotope/chrono/issues/1428),
[#&#8203;1429](https://togithub.com/chronotope/chrono/issues/1429),
[#&#8203;1431](https://togithub.com/chronotope/chrono/issues/1431),
[#&#8203;1432](https://togithub.com/chronotope/chrono/issues/1432),
[#&#8203;1433](https://togithub.com/chronotope/chrono/issues/1433),
[#&#8203;1438](https://togithub.com/chronotope/chrono/issues/1438))
- CI: test cross-compiling to `x86_64-unknown-illumos` instead of
Solaris
([#&#8203;1437](https://togithub.com/chronotope/chrono/issues/1437))
- CI: lint Windows target, fix clippy warning
([#&#8203;1441](https://togithub.com/chronotope/chrono/issues/1441))
- CI: only run `cargo hack check` on Linux
([#&#8203;1442](https://togithub.com/chronotope/chrono/issues/1442))
- Update windows-bindgen to 0.54
([#&#8203;1462](https://togithub.com/chronotope/chrono/issues/1462),
[#&#8203;1483](https://togithub.com/chronotope/chrono/issues/1483))
- Simplify error value of `parse_internal`
([#&#8203;1459](https://togithub.com/chronotope/chrono/issues/1459))
- Simplify `SerdeError`
([#&#8203;1458](https://togithub.com/chronotope/chrono/issues/1458))
- Simplify `NaiveDate::from_isoywd` a bit
([#&#8203;1464](https://togithub.com/chronotope/chrono/issues/1464))

Thanks to all contributors on behalf of the chrono team,
[@&#8203;djc](https://togithub.com/djc) and
[@&#8203;pitdicker](https://togithub.com/pitdicker)!

</details>

<details>
<summary>vercel/next.js (eslint-config-next)</summary>

###
[`v14.1.3`](https://togithub.com/vercel/next.js/compare/v14.1.2...fc38ee190c9b7de09ebff13a17ebd948cf580ec3)

[Compare
Source](https://togithub.com/vercel/next.js/compare/v14.1.2...v14.1.3)

###
[`v14.1.2`](https://togithub.com/vercel/next.js/compare/v14.1.1...f564deef86be32a6b25125ddb8172c7c27d3f19a)

[Compare
Source](https://togithub.com/vercel/next.js/compare/v14.1.1...v14.1.2)

</details>

<details>
<summary>HoudiniGraphql/houdini (houdini)</summary>

###
[`v1.2.44`](https://togithub.com/HoudiniGraphql/houdini/releases/tag/houdini%401.2.44)

[Compare
Source](https://togithub.com/HoudiniGraphql/houdini/compare/houdini@1.2.43...houdini@1.2.44)

##### 🐛 Fixes

- [#&#8203;1279](https://togithub.com/HoudiniGraphql/houdini/pull/1279)
[`50a9fa13`](https://togithub.com/HoudiniGraphql/houdini/commit/50a9fa13958a8dd0becbd66f2b3f3437aae0aa1d)
[@&#8203;SeppahBaws](https://togithub.com/SeppahBaws) - Fix init script
to use the correct vitePreprocess import

##### ✨ Features

- [#&#8203;1280](https://togithub.com/HoudiniGraphql/houdini/pull/1280)
[`4e31fbba`](https://togithub.com/HoudiniGraphql/houdini/commit/4e31fbba4faea5e98fda8befcedce76d71e6849b)
[@&#8203;AlecAivazis](https://togithub.com/AlecAivazis) - Add
experimental support for RuntimeScalars

###
[`v1.2.43`](https://togithub.com/HoudiniGraphql/houdini/releases/tag/houdini-svelte%401.2.43)

[Compare
Source](https://togithub.com/HoudiniGraphql/houdini/compare/houdini@1.2.42...houdini@1.2.43)

##### Patch Changes

- [#&#8203;1271](https://togithub.com/HoudiniGraphql/houdini/pull/1271)
[`2971ccf3`](https://togithub.com/HoudiniGraphql/houdini/commit/2971ccf35c309b374dd18c476be7aa4f61bd705c)
Thanks [@&#8203;sastan](https://togithub.com/sastan)! - Remove generics
from script tag before calling svelte preprocessor.

-   Updated dependencies \[]:
    -   houdini@1.2.43

</details>

<details>
<summary>vercel/next.js (next)</summary>

###
[`v14.1.3`](https://togithub.com/vercel/next.js/compare/v14.1.2...fc38ee190c9b7de09ebff13a17ebd948cf580ec3)

[Compare
Source](https://togithub.com/vercel/next.js/compare/v14.1.2...v14.1.3)

###
[`v14.1.2`](https://togithub.com/vercel/next.js/compare/v14.1.1...f564deef86be32a6b25125ddb8172c7c27d3f19a)

[Compare
Source](https://togithub.com/vercel/next.js/compare/v14.1.1...v14.1.2)

</details>

<details>
<summary>seanmonstar/reqwest (reqwest)</summary>

###
[`v0.11.25`](https://togithub.com/seanmonstar/reqwest/blob/HEAD/CHANGELOG.md#v01125)

[Compare
Source](https://togithub.com/seanmonstar/reqwest/compare/v0.11.24...v0.11.25)

-   Fix `Certificate::from_pem_bundle()` parsing.
-   Fix Apple linker errors from detecting system proxies.

</details>

<details>
<summary>sindresorhus/type-fest (type-fest)</summary>

###
[`v4.12.0`](https://togithub.com/sindresorhus/type-fest/releases/tag/v4.12.0)

[Compare
Source](https://togithub.com/sindresorhus/type-fest/compare/v4.11.1...v4.12.0)

##### New types

-
[`ArraySlice`](https://togithub.com/sindresorhus/type-fest/blob/main/source/array-slice.d.ts)
-
[`StringSlice`](https://togithub.com/sindresorhus/type-fest/blob/main/source/string-slice.d.ts)
-
[`IsNegative`](https://togithub.com/sindresorhus/type-fest/blob/85221aa12f2e9ed9d76e94e3c73b6bd904889bf6/source/numeric.d.ts#L172-L187)
-
[`GreaterThan`](https://togithub.com/sindresorhus/type-fest/blob/main/source/greater-than.d.ts)
-
[`GreaterThanOrEqual`](https://togithub.com/sindresorhus/type-fest/blob/main/source/greater-than-or-equal.d.ts)
-
[`LessThan`](https://togithub.com/sindresorhus/type-fest/blob/main/source/less-than.d.ts)
-
[`LessThanOrEqual`](https://togithub.com/sindresorhus/type-fest/blob/main/source/less-than-or-equal.d.ts)
-
[`Sum`](https://togithub.com/sindresorhus/type-fest/blob/main/source/sum.d.ts)
-
[`Subtract`](https://togithub.com/sindresorhus/type-fest/blob/main/source/subtract.d.ts)

###
[`v4.11.1`](https://togithub.com/sindresorhus/type-fest/releases/tag/v4.11.1)

[Compare
Source](https://togithub.com/sindresorhus/type-fest/compare/v4.11.0...v4.11.1)

- `OmitDeep`: Fix internally imported type
([#&#8203;824](https://togithub.com/sindresorhus/type-fest/issues/824))
[`2061925`](https://togithub.com/sindresorhus/type-fest/commit/2061925)

###
[`v4.11.0`](https://togithub.com/sindresorhus/type-fest/releases/tag/v4.11.0)

[Compare
Source](https://togithub.com/sindresorhus/type-fest/compare/v4.10.3...v4.11.0)

##### New types

-
[`OmitDeep`](https://togithub.com/sindresorhus/type-fest/blob/main/source/omit-deep.d.ts)
([#&#8203;816](https://togithub.com/sindresorhus/type-fest/issues/816))
[`0e196aa`](https://togithub.com/sindresorhus/type-fest/commit/0e196aa)
-
[`ArraySplice`](https://togithub.com/sindresorhus/type-fest/blob/main/source/array-splice.d.ts)
([#&#8203;816](https://togithub.com/sindresorhus/type-fest/issues/816))
[`0e196aa`](https://togithub.com/sindresorhus/type-fest/commit/0e196aa)

##### Improvements

- `Tagged`: Add metadata support
([#&#8203;723](https://togithub.com/sindresorhus/type-fest/issues/723))
[`3ec8dba`](https://togithub.com/sindresorhus/type-fest/commit/3ec8dba)

</details>

<details>
<summary>Microsoft/TypeScript (typescript)</summary>

###
[`v5.4.2`](https://togithub.com/microsoft/TypeScript/releases/tag/v5.4.2):
TypeScript 5.4

[Compare
Source](https://togithub.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.2)

For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/).

For the complete list of fixed issues, check out the

- [fixed issues query for Typescript 5.4.0
(Beta)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.1
(RC)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.2
(Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+).

Downloads are available on:

- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)

</details>

<details>
<summary>vitejs/vite (vite)</summary>

###
[`v5.1.5`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small515-2024-03-04-small)

[Compare
Source](https://togithub.com/vitejs/vite/compare/v5.1.4...v5.1.5)

- fix: `__vite__mapDeps` code injection
([#&#8203;15732](https://togithub.com/vitejs/vite/issues/15732))
([aff54e1](https://togithub.com/vitejs/vite/commit/aff54e1)), closes
[#&#8203;15732](https://togithub.com/vitejs/vite/issues/15732)
- fix: analysing build chunk without dependencies
([#&#8203;15469](https://togithub.com/vitejs/vite/issues/15469))
([bd52283](https://togithub.com/vitejs/vite/commit/bd52283)), closes
[#&#8203;15469](https://togithub.com/vitejs/vite/issues/15469)
- fix: import with query with imports field
([#&#8203;16085](https://togithub.com/vitejs/vite/issues/16085))
([ab823ab](https://togithub.com/vitejs/vite/commit/ab823ab)), closes
[#&#8203;16085](https://togithub.com/vitejs/vite/issues/16085)
- fix: normalize literal-only entry pattern
([#&#8203;16010](https://togithub.com/vitejs/vite/issues/16010))
([1dccc37](https://togithub.com/vitejs/vite/commit/1dccc37)), closes
[#&#8203;16010](https://togithub.com/vitejs/vite/issues/16010)
- fix: optimizeDeps.entries with literal-only pattern(s)
([#&#8203;15853](https://togithub.com/vitejs/vite/issues/15853))
([49300b3](https://togithub.com/vitejs/vite/commit/49300b3)), closes
[#&#8203;15853](https://togithub.com/vitejs/vite/issues/15853)
- fix: output correct error for empty import specifier
([#&#8203;16055](https://togithub.com/vitejs/vite/issues/16055))
([a9112eb](https://togithub.com/vitejs/vite/commit/a9112eb)), closes
[#&#8203;16055](https://togithub.com/vitejs/vite/issues/16055)
- fix: upgrade esbuild to 0.20.x
([#&#8203;16062](https://togithub.com/vitejs/vite/issues/16062))
([899d9b1](https://togithub.com/vitejs/vite/commit/899d9b1)), closes
[#&#8203;16062](https://togithub.com/vitejs/vite/issues/16062)
- fix(runtime): runtime HMR affects only imported files
([#&#8203;15898](https://togithub.com/vitejs/vite/issues/15898))
([57463fc](https://togithub.com/vitejs/vite/commit/57463fc)), closes
[#&#8203;15898](https://togithub.com/vitejs/vite/issues/15898)
- fix(scanner): respect `experimentalDecorators: true`
([#&#8203;15206](https://togithub.com/vitejs/vite/issues/15206))
([4144781](https://togithub.com/vitejs/vite/commit/4144781)), closes
[#&#8203;15206](https://togithub.com/vitejs/vite/issues/15206)
- revert: "fix: upgrade esbuild to 0.20.x"
([#&#8203;16072](https://togithub.com/vitejs/vite/issues/16072))
([11cceea](https://togithub.com/vitejs/vite/commit/11cceea)), closes
[#&#8203;16072](https://togithub.com/vitejs/vite/issues/16072)
- refactor: share code with vite runtime
([#&#8203;15907](https://togithub.com/vitejs/vite/issues/15907))
([b20d542](https://togithub.com/vitejs/vite/commit/b20d542)), closes
[#&#8203;15907](https://togithub.com/vitejs/vite/issues/15907)
- refactor(runtime): use functions from `pathe`
([#&#8203;16061](https://togithub.com/vitejs/vite/issues/16061))
([aac2ef7](https://togithub.com/vitejs/vite/commit/aac2ef7)), closes
[#&#8203;16061](https://togithub.com/vitejs/vite/issues/16061)
- chore(deps): update all non-major dependencies
([#&#8203;16028](https://togithub.com/vitejs/vite/issues/16028))
([7cfe80d](https://togithub.com/vitejs/vite/commit/7cfe80d)), closes
[#&#8203;16028](https://togithub.com/vitejs/vite/issues/16028)

</details>

<details>
<summary>cloudflare/workers-rs (worker)</summary>

###
[`v0.0.20`](https://togithub.com/cloudflare/workers-rs/releases/tag/v0.0.20)

[Compare
Source](https://togithub.com/cloudflare/workers-rs/compare/v0.0.19...v0.0.20)

#### What's Changed

- Add `response_body` function to `r2::ObjectBody`. by
[@&#8203;mcnulty](https://togithub.com/mcnulty) in
[cloudflare/workers-rs#462
- Add cf.as_organization function by
[@&#8203;kpcyrd](https://togithub.com/kpcyrd) in
[cloudflare/workers-rs#461
- Added support for R2 Checksums to GET and PUT. by
[@&#8203;spigaz](https://togithub.com/spigaz) in
[cloudflare/workers-rs#460

#### New Contributors

- [@&#8203;mcnulty](https://togithub.com/mcnulty) made their first
contribution in
[cloudflare/workers-rs#462
- [@&#8203;spigaz](https://togithub.com/spigaz) made their first
contribution in
[cloudflare/workers-rs#460

**Full Changelog**:
cloudflare/workers-rs@v0.0.19...v0.0.20

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/grafbase/grafbase).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
jdon pushed a commit to jdon/workers-rs that referenced this pull request Mar 27, 2024
This commit adds a new function to `r2::ObjectBody` to allow
the underlying `ReadableStream` for the body of an R2 object to
be used to create a `ResponseBody`, via the `ResponseBody::Stream`
variant.

This adds support for cases where workers can hand a reference to
the R2 object to the workers runtime for streaming to the client,
unmodified. Importantly, this allows the worker to avoid CPU usage
while streaming the object.

Before this commit, `ObjectBody::Stream` could be used but that
would result in unexpected CPU usage during the streaming process
leading to the working hitting the CPU limit for large (> 150 MB)
R2 objects.

Closes cloudflare#389
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.

[BUG] Streaming R2 object > 200MB in size exceeds CPU limit
2 participants