-
Notifications
You must be signed in to change notification settings - Fork 357
impl Send/Sync for Queue #483
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
Conversation
|
Yep, |
Yes that makes sense. I was surprised it wasn't part of the workspace already. I already opened the PR: zebp/worker-kv#14. It can either be merged before moving the code of it can be closed. |
|
@kflansburg can you also take a look at #478? |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@types/bun](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bun) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/bun)) | [`1.0.10` -> `1.0.11`](https://renovatebot.com/diffs/npm/@types%2fbun/1.0.10/1.0.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](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.70` -> `18.2.73`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.70/18.2.73) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/typescript-eslint) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | [`7.3.1` -> `7.4.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/7.3.1/7.4.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@typescript-eslint/parser](https://togithub.com/typescript-eslint/typescript-eslint) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`7.3.1` -> `7.4.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/7.3.1/7.4.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [chrono](https://togithub.com/chronotope/chrono) | `0.4.35` -> `0.4.37` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [insta](https://insta.rs/) ([source](https://togithub.com/mitsuhiko/insta)) | `1.36.1` -> `1.37.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dev-dependencies | patch | | [insta](https://insta.rs/) ([source](https://togithub.com/mitsuhiko/insta)) | `1.36` -> `1.37` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [lambda_http](https://togithub.com/awslabs/aws-lambda-rust-runtime) | `0.9.3` -> `0.11.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [swc_ecma_parser](https://togithub.com/swc-project/swc) | `0.143.10` -> `0.143.11` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [tokio-rustls](https://togithub.com/rustls/tokio-rustls) | `0.25.0` -> `0.26.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | minor | | [worker](https://togithub.com/cloudflare/workers-rs) | `0.0.21` -> `0.0.23` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [worker](https://togithub.com/cloudflare/workers-rs) | `0.0.21` -> `0.0.23` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | --- ### Release Notes <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary> ### [`v7.4.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#740-2024-03-25) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.3.1...v7.4.0) ##### 🚀 Features - **eslint-plugin:** \[consistent-type-imports] ignore files with decorators, experimentalDecorators, and emitDecoratorMetadata - **eslint-plugin:** \[no-unnecessary-type-arguments] handle tagged templates - **eslint-plugin:** deprecate no-throw-literal and add a renamed only-throw-error ##### 🩹 Fixes - **eslint-plugin:** \[prefer-optional-chain] address multipart nullish checks false positive - **eslint-plugin:** \[prefer-optional-chain] properly disambiguate between `boolean` and `false` - **eslint-plugin:** \[no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside ##### ❤️ Thank You - Abraham Guo - Brad Zacher - Josh Goldberg ✨ - Kim Sang Du - Kirk Waiblinger - Marco Pasqualetti - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v7.4.0`](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.3.1...5d2469142262672e381db3b4a4e2bffa80984810) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.3.1...v7.4.0) </details> <details> <summary>cloudflare/workers-rs (worker)</summary> ### [`v0.0.23`](https://togithub.com/cloudflare/workers-rs/releases/tag/v0.0.23) [Compare Source](https://togithub.com/cloudflare/workers-rs/compare/v0.0.22...v0.0.23) #### What's Changed - fix: add schedule re-export by [@​avsaase](https://togithub.com/avsaase) in [https://github.com/cloudflare/workers-rs/pull/501](https://togithub.com/cloudflare/workers-rs/pull/501) - Fix absence of worker::secret documentation by [@​Kakapio](https://togithub.com/Kakapio) in [https://github.com/cloudflare/workers-rs/pull/500](https://togithub.com/cloudflare/workers-rs/pull/500) - README: Fix beginning of code snippet by [@​kevinji](https://togithub.com/kevinji) in [https://github.com/cloudflare/workers-rs/pull/499](https://togithub.com/cloudflare/workers-rs/pull/499) - Implement Send, Sync and Clone for Fetcher by [@​avsaase](https://togithub.com/avsaase) in [https://github.com/cloudflare/workers-rs/pull/503](https://togithub.com/cloudflare/workers-rs/pull/503) #### New Contributors - [@​Kakapio](https://togithub.com/Kakapio) made their first contribution in [https://github.com/cloudflare/workers-rs/pull/500](https://togithub.com/cloudflare/workers-rs/pull/500) - [@​kevinji](https://togithub.com/kevinji) made their first contribution in [https://github.com/cloudflare/workers-rs/pull/499](https://togithub.com/cloudflare/workers-rs/pull/499) **Full Changelog**: cloudflare/workers-rs@v0.0.22...v0.0.23 ### [`v0.0.22`](https://togithub.com/cloudflare/workers-rs/releases/tag/v0.0.22) [Compare Source](https://togithub.com/cloudflare/workers-rs/compare/v0.0.21...v0.0.22) This release continues our conversion to the `http` crate. In a number of key ways: - [Convert test suite to use `axum`](https://togithub.com/cloudflare/workers-rs/pull/481) when `http` feature is enabled. This was a great dogfooding exercise and helped to identify ergonomics issues. Based on this we developed the utilities ([see documentation](https://docs.rs/worker/0.0.22/worker/#send-helpers)): - Introduce `worker::send` to mark arbitrary `async` functions as `Send` (useful for `axum` handler methods). - Introduce `SendFuture` wrapper for marking a specific `Future` as `Send`. - Introduce `SendWrapper` for marking a particular object as `Send`. This is useful for `axum` router state. - Implement [Send, Sync](https://togithub.com/cloudflare/workers-rs/pull/483), and [Clone](https://togithub.com/cloudflare/workers-rs/pull/484) for Queue, making it easier to use with `axum`. Thanks [@​avsaase](https://togithub.com/avsaase)! We will continue to make ergonomic improvements to simplify usage of `axum` and other frameworks which generally expect objects to be `Send`, `Sync`, and `Clone`. #### Other Changes - implement get_tags for hibernatable websockets by [@​eric-seppanen](https://togithub.com/eric-seppanen) in [https://github.com/cloudflare/workers-rs/pull/484](https://togithub.com/cloudflare/workers-rs/pull/484) - Add tests for Durable + Websocket + Hibernation API by [@​j-white](https://togithub.com/j-white) in [https://github.com/cloudflare/workers-rs/pull/495](https://togithub.com/cloudflare/workers-rs/pull/495) - Introduce `D1PreparedStatement.bind_refs` and `batch_bind` which does not take ownership of arguments, and enables more ergonomic and performant use of the D1 API. It also introduces `D1Type` which provides better type safety for these arguments than the previous API which allowed arbitrary `JsValue`. [@​kflansburg](https://togithub.com/kflansburg) in [https://github.com/cloudflare/workers-rs/pull/493](https://togithub.com/cloudflare/workers-rs/pull/493) - Expose DurableObject Storage's transaction function by [@​TannerRogalsky](https://togithub.com/TannerRogalsky) in [https://github.com/cloudflare/workers-rs/pull/487](https://togithub.com/cloudflare/workers-rs/pull/487) #### New Contributors - [@​avsaase](https://togithub.com/avsaase) made their first contribution in [https://github.com/cloudflare/workers-rs/pull/483](https://togithub.com/cloudflare/workers-rs/pull/483) - [@​TannerRogalsky](https://togithub.com/TannerRogalsky) made their first contribution in [https://github.com/cloudflare/workers-rs/pull/487](https://togithub.com/cloudflare/workers-rs/pull/487) **Full Changelog**: cloudflare/workers-rs@v0.0.21...v0.0.22 </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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
I'm in the process of migrating a worker to use
axumand this missing impl prevents usingQueuein a state that can be attached to a router. Another issue is a missingSend/Syncimpl onKvStorebut that lives in theworker-kvrepo, outside of the cloudflare org. Should I make a PR there as well?