Releases: shuttle-hq/shuttle
v0.7.2
v0.7.1
Features 🚀
- [#411 and #415] Limit memory used by projects
- [#343] (@XyLyXyRR) Generate shell completion using
cargo shuttle generate
Bugs 🐞
- [#409] Prevent
cargo shuttle
from panicking when config can't be accessed - [#410 and #412] Fix restart issues of the shuttle infrastructure
- [#416]
transport error
showing up during deploys - [#422]
Secrets.toml
not being packaged because of.gitignore
- [#423] Deploys bigger than 32 768 bytes not uploading
v0.7.0
v0.6.0
Features 🚀
- A new
cargo shuttle project
command (See important changes below) - [#214] (@marioidival) Checking the version service side in order to reduce amount of crashes
- [#334] Salvo framework support
- [#306] (@Butch78) Persistence storage resource
- [#276] Options support for resource attributes
This will allow resources to take in options like so:#[shuttle_service::main] async fn poem(#[shared::Postgres(size = "10Gb", public = false)] pool: PgPool) -> ShuttlePoem { // ----------------------------- Options that will be passed to builder }
- [#273] Make resources plugin-able (See breaking changes)
- [#324] (@coszio) Switch to
tracing
which allows for more structured logs - [#326] (@jmwill86) Warp framework support
Bugs 🐞
- [#348] Locking down the tokio version to prevent seg faults
Important changes ❗
New project subcommand
This release introduces a model to segregate user projects from one another. This allows for improved security as projects will no longer be able to access the filesystem to see other projects. It also enhances the stability of shuttle as a rogue project crashing can no longer bring down other projects.
All new projects now have the following deployment flow:
cargo shuttle project new // Run only once for new projects
cargo shuttle project status // Until the project is "ready"... We will soon remove this extra step
cargo shuttle deploy // As often as there are new code changes
Other new subcommands
cargo shuttle deployment
All deployments for a project can now be managed with the new cargo shuttle deployments
subcommand. This will also list all resources and secrets linked to a deployment.
cargo shuttle secrets
Secrets can also be viewed using cargo shuttle secrets
and finally cargo shuttle delete
now stops the currently active deployment
Projects vs Services vs Deployments
This release defines these terms better for shuttle:
- A user can have multiple projects. Ie projects are the same as a cargo workspace and all projects are managed inside an isolated container
- In theory, a project can have multiple services. The support for running multiple services exists but its detection is not currently working
- And then each service can have multiple deployments, but only one deployment can be active at a time. Ie after setting up all the resources for a new deployment, we stop all running deployments for the service while also starting up the new deployment
Plug in resources
Resources like DBs and secrets that used do be behind feature flags are now independent crates of their own. This allows the community to create 3rd-party resources without having to wait for official shuttle support.
The old attributes on the main function for these resources need to change as follows:
Old attribute | New attribute |
---|---|
shared::Postgres | shuttle_shared_db::Postgres |
shared::MongoDb | shuttle_shared_db::MongoDb |
aws::rds::Postgres | shuttle_aws_rds::Postgres |
aws::rds::MySql | shuttle_aws_rds::MySql |
aws::rds::MariaDB | shuttle_aws_rds::MariaDB |
persist | shuttle_persist::Persist |
And in Cargo.toml
their feature flags on shuttle_service
needs to be replaced with the following crates:
Old feature flag | Extra crate definition |
---|---|
sqlx-postgres | shuttle-shared-db = { version = "0.6.0", features = ["postgres"] } |
mongo-integration | shuttle-shared-db = { version = "0.6.0", features = ["mongo"] } |
sqlx-aws-postgres | shuttle-aws-rds = { version = "0.6.0", features = ["postgres"] } |
sqlx-aws-mysql | shuttle-aws-rds = { version = "0.6.0", features = ["mysql"] } |
sqlx-aws-mariadb | shuttle-aws-rds = { version = "0.6.0", features = ["mariadb"] } |
secrets | shuttle-secrets = "0.6.0" |
persist | shuttle-persist = "0.6.0" |
New major version
This version has many changes in it and we decided not to automatically restore old projects. Here is what we have done:
- We reserved old project names that have already been taken to allow their owners to reclaim them.
- We restored everything in databases so your data won't be lost. We might just have missed any data changes that happened during the migration
What do you have to do
If you had a project on shuttle, then you will need to manually update the version to v0.6.0
in your Cargo.toml
. You may also need to update your use of resources as outlined above. Then, finally, run:
cargo shuttle project status // to confirm the project still below to you (in should be in a "errored" state)
cargo shuttle project rm // to release the project back into the pool of available project names
cargo shuttle project new // to claim your project again
cargo shuttle project status // until the project is in the "ready" state
cargo shuttle deploy
v0.5.2
v0.5.1
Features 🚀
- [#316] Respect
RUST_LOG
a bit more for local runs (cargo shuttle run
) - [#303][@oddgrd] Discord bot support using the serenity framework
Bugs 🐞
- [#312][@jmwill86] Rework profanity checker to be more lenient
- [#314][@coszio] Fix rocket version for
cargo shuttle init --rocket
- [#317] Fix secrets not being used for local runs (
cargo shuttle run
)
Misc 🌱
- [#311] Upgrade to sqlx v0.6.0 and Rust 1.63.0
- [#278][@kianmeng] Fix general typos all over the place
Thanks to all the contributors for the new features and bug fixes 🤛
v0.5.0
v0.4.2
Features 🚀
- [#284][@nahuakang] Readme for
cargo-shuttle
that will appear on crates.io - [#299][@coszio] Support underscore in project names
- [#293 & #302][@Butch78 & @oddgrd] Profanity and preserved word filter for project names
Bugs 🐞
- [#296][@coszio] Documentation updates for url-shortener
- [#304] Removed extra braces in
cargo shuttle init --axum
Thanks to all the contributors for the new features and bug fixes 🤛
v0.4.1
Features
- Poem support - #275 (Thanks @oddgrd)
cargo shuttle init --axum|rocket|tide|tower|poem
- #238 #275(Thanks @nahuakang and @oddgrd)
Improvements
structopt
toclap
migration - #256 #257 (Thanks @Xavientois)- Some doc fixups - #268 (Thanks @SonicZentropy)
v0.4.0
Features
- Services can opt into an AWS RDS Postgres, MySql or MariaDB instance rather than the previously shared Postgres instance (#180)
Improvements
- No longer need to put
cdylib
inCargo.toml
(#212) cargo shuttle
command can now be run in child directories of a project (#203 Thanks @ivancernja)- Invalid API keys for
cargo shuttle
now have a better message for fixing the problem (#217 Thanks @Xavientois) - Improved error when failing to parse
shuttle_service
version (#219 Thanks @jmwill86) - Improved local dev experience and building (#226 #234 #244)
- A rewrite of
shuttle_service::Service
to make it easier for users to implement custom services (#225) cargo shuttle
now fails with exit code 1 to improve its use in scripting (#166)- Improved docs (#243 #245 Thanks @lilianmoraru and @Xavientois)
- Started switching to CircleCI
Breaking changes
Any service that used the (shared Postgres) PgPool
would have had the following main function:
async fn rocket(pool: PgPool) -> shuttle_service::ShuttleRocket {
// Create service here
}
And a sqlx-postgres
feature for shuttle-service
. With the support of more databases, this PgPool
now needs to explicitly define what kind of database instance it will connect to using argument attributes. This can be done by adding #[shared::Postgres]
to the attribute:
async fn rocket(#[shared::Postgres] pool: PgPool) -> shuttle_service::ShuttleRocket {
// Create service here
}