[PR #2276] [MERGED] Update Rocket to 0.5 and async, and compile on stable #3048

Closed
opened 2026-02-05 05:09:56 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/2276
Author: @dani-garcia
Created: 1/31/2022
Status: Merged
Merged: 2/28/2022
Merged by: @dani-garcia

Base: mainHead: async


📝 Commits (6)

  • 2d5f172 Update to rocket 0.5 and made code async, missing updating all db calls, that are currently blocking
  • 775d07e Async/Awaited all db methods
  • f38926d Upd Dockerfiles, crates. Fixed rust 2018 idioms
  • fd9693b await the mutex in db_run and use block_in_place for it's contents
  • 5125fdb Ignore unused field
  • d781981 formatting

📊 Changes

61 files changed (+2740 additions, -2215 deletions)

View changed files

📝 Cargo.lock (+514 -338)
📝 Cargo.toml (+15 -14)
Rocket.toml (+0 -2)
📝 docker/Dockerfile.j2 (+4 -1)
📝 docker/amd64/Dockerfile (+4 -1)
📝 docker/amd64/Dockerfile.alpine (+4 -1)
📝 docker/amd64/Dockerfile.buildx (+4 -1)
📝 docker/amd64/Dockerfile.buildx.alpine (+4 -1)
📝 docker/arm64/Dockerfile (+4 -1)
📝 docker/arm64/Dockerfile.alpine (+4 -1)
📝 docker/arm64/Dockerfile.buildx (+4 -1)
📝 docker/arm64/Dockerfile.buildx.alpine (+4 -1)
📝 docker/armv6/Dockerfile (+4 -1)
📝 docker/armv6/Dockerfile.alpine (+4 -1)
📝 docker/armv6/Dockerfile.buildx (+4 -1)
📝 docker/armv6/Dockerfile.buildx.alpine (+4 -1)
📝 docker/armv7/Dockerfile (+4 -1)
📝 docker/armv7/Dockerfile.alpine (+4 -1)
📝 docker/armv7/Dockerfile.buildx (+4 -1)
📝 docker/armv7/Dockerfile.buildx.alpine (+4 -1)

...and 41 more files

📄 Description

Rebased on top of the latest changes in main.

Seeing as there is no release of a final Rocket 0.5 in the near future, I think it's time to consider merging this as it's a big patch and hard to keep in sync.

There shouldn't be any major breaking changes, but Rocket 0.5 brings a new configuration system so that might break things for users depending on them. That said, the ones in use by most people (ROCKET_ADDRESS, ROCKET_PORT and ROCKET_TLS) are the same as before. ROCKET_ENV has changed to ROCKET_PROFILE, so anyone using that must update their config.

The file uploads are now also handled by rocket directly, and uploaded to a configurable temp directory first, before being moved to the attachments or sends folder. We should document that the temp directory and the attachments and sends folder must be in the same partition/mount point, otherwise the file move will fail.

Also I just noticed that I'm hardcoding the listen address to 0.0.0.0, I will change that before pushing.

Pending changes:

  • Remove hardcoded listen address from main()
  • Remove ROCKET_ENV from docker images if still present, make sure the listen address is set to 0.0.0.0 and the port is set correctly
  • Check if the default address and port config when running the binary directly are the same, otherwise handle that in code to avoid breaking any builds depending on the default values.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/2276 **Author:** [@dani-garcia](https://github.com/dani-garcia) **Created:** 1/31/2022 **Status:** ✅ Merged **Merged:** 2/28/2022 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `async` --- ### 📝 Commits (6) - [`2d5f172`](https://github.com/dani-garcia/vaultwarden/commit/2d5f172e777e09a47c79d8437d94df160afd6e38) Update to rocket 0.5 and made code async, missing updating all db calls, that are currently blocking - [`775d07e`](https://github.com/dani-garcia/vaultwarden/commit/775d07e9a0d6e33f5af63abb571cae4e434795d9) Async/Awaited all db methods - [`f38926d`](https://github.com/dani-garcia/vaultwarden/commit/f38926d666bc9cabaa95c7bba46eb3894aa80dce) Upd Dockerfiles, crates. Fixed rust 2018 idioms - [`fd9693b`](https://github.com/dani-garcia/vaultwarden/commit/fd9693b9611438deb1c1e85237c25053283e04ab) await the mutex in db_run and use block_in_place for it's contents - [`5125fdb`](https://github.com/dani-garcia/vaultwarden/commit/5125fdb88203c83aae75bbb2c5d94c15e9c5a085) Ignore unused field - [`d781981`](https://github.com/dani-garcia/vaultwarden/commit/d781981bbdbe78ef34850b5b3359e38b714d29de) formatting ### 📊 Changes **61 files changed** (+2740 additions, -2215 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+514 -338) 📝 `Cargo.toml` (+15 -14) ➖ `Rocket.toml` (+0 -2) 📝 `docker/Dockerfile.j2` (+4 -1) 📝 `docker/amd64/Dockerfile` (+4 -1) 📝 `docker/amd64/Dockerfile.alpine` (+4 -1) 📝 `docker/amd64/Dockerfile.buildx` (+4 -1) 📝 `docker/amd64/Dockerfile.buildx.alpine` (+4 -1) 📝 `docker/arm64/Dockerfile` (+4 -1) 📝 `docker/arm64/Dockerfile.alpine` (+4 -1) 📝 `docker/arm64/Dockerfile.buildx` (+4 -1) 📝 `docker/arm64/Dockerfile.buildx.alpine` (+4 -1) 📝 `docker/armv6/Dockerfile` (+4 -1) 📝 `docker/armv6/Dockerfile.alpine` (+4 -1) 📝 `docker/armv6/Dockerfile.buildx` (+4 -1) 📝 `docker/armv6/Dockerfile.buildx.alpine` (+4 -1) 📝 `docker/armv7/Dockerfile` (+4 -1) 📝 `docker/armv7/Dockerfile.alpine` (+4 -1) 📝 `docker/armv7/Dockerfile.buildx` (+4 -1) 📝 `docker/armv7/Dockerfile.buildx.alpine` (+4 -1) _...and 41 more files_ </details> ### 📄 Description Rebased on top of the latest changes in main. Seeing as there is no release of a final Rocket 0.5 in the near future, I think it's time to consider merging this as it's a big patch and hard to keep in sync. There shouldn't be any major breaking changes, but Rocket 0.5 brings a new configuration system so that might break things for users depending on them. That said, the ones in use by most people (ROCKET_ADDRESS, ROCKET_PORT and ROCKET_TLS) are the same as before. ROCKET_ENV has changed to ROCKET_PROFILE, so anyone using that must update their config. The file uploads are now also handled by rocket directly, and uploaded to a configurable temp directory first, before being moved to the attachments or sends folder. We should document that the temp directory and the attachments and sends folder must be in the same partition/mount point, otherwise the file move will fail. Also I just noticed that I'm hardcoding the listen address to 0.0.0.0, I will change that before pushing. ### Pending changes: - [ ] Remove hardcoded listen address from main() - [ ] Remove ROCKET_ENV from docker images if still present, make sure the listen address is set to 0.0.0.0 and the port is set correctly - [ ] Check if the default address and port config when running the binary directly are the same, otherwise handle that in code to avoid breaking any builds depending on the default values. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 05:09:56 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3048