Releases: shuttle-hq/shuttle
v0.32.0
Shuttle: v0.32.0 update
We're excited to release Shuttle v0.32.0! 🚀
Stricter Project Name Validation
One year ago we started enforcing stricter project names for any new project, but we allowed older projects with now invalid names to still be usable without interruption. In this release we will start enforcing the new restrictions for existing projects as well.
If you encounter any issues with old projects that had invalid names, please reach out to us on [email protected], or open a help thread in our Discord.
Shuttle for Alpine Linux
Shuttle has been packaged for Alpine Linux 🥳
See https://github.com/shuttle-hq/shuttle/blob/main/cargo-shuttle/README.md#alpine-linux for installation instructions.
Other updates
- The deployer environment’s Rust version is now 1.73.0.
cargo_metadata::Metadata
’s project name field is now typeString
.- The password of
local_uri
connection strings will now be obfuscated in the terminal output. - Checking for the Shuttle runtime's version now errors if the check fails, for instance if the binary is not using shuttle-runtime or if the cargo config targets the wrong binary.
Bug fixes
- Fixed a bug where
resource list --show-secrets
was displaying the incorrect hostname for databases
Contributions
- @d4ckard helped implement the new project name validation in #1354
- @mackey0225 fixed some typos in our docs in shuttle-hq/shuttle-docs#216
Upgrading
Refer to the upgrading docs for how to upgrade your projects.
Commits in this release
- refactor: fix ProjectName validation, custom Path extractor for parsing it by @jonaro00 in #1354
- feat: use proto-gen for generating proto code by @jonaro00 in #1364
- chore: bump and refactor images, code cleanup by @jonaro00 in #1313
- feat: suggest project restart when trying to delete by @jonaro00 in #1366
- fix: database uri password hiding, runtime version check by @jonaro00 in #1368
- ci: audit on main, build release stack sooner, release crates faster by @jonaro00 in #1369
- docs(readme): add instructions for installing on Alpine Linux by @orhun in #1365
- feat(installer): support installing the Alpine Linux package by @orhun in #1370
- refactor: make admin compile, scope project models to backends by @jonaro00 in #1371
- docs(changelog): create CHANGELOG.md by @orhun in #1372
- chore: v0.32.0 by @oddgrd in #1373
Full Changelog: v0.31.0...v0.32.0
v0.31.0
Shuttle: v0.31.0 update
We're excited to release Shuttle v0.31.0! 🚀
Project Limits
With this release, we still start enforcing our project limits to reflect the limits from our pricing page. You will no longer be able to create more projects than your tier allows. If you are above the limit but want to create more projects, you need to either delete projects with cargo shuttle project delete
or upgrade to the Pro tier. If you are on the Pro tier and want more projects than the Pro tier limit, you can get in touch with us on [email protected] or on our Discord.
If you experience problems when deleting very old projects, feel free to open a help thread on our Discord, or reach out at [email protected].
Hidden Resource Credentials
The credentials of resources like shuttle_shared_db
or shuttle_aws_rds
will now be obfuscated by default in the CLI. If you need to see these credentials to access your database, you can add the --show-secrets
flag to the resource command: cargo shuttle resource list --show-secrets
.
Bug fixes
- Fixed a bug where the
cargo shuttle deploy
command would appear to hang when it was downloading crates. - Fixed a bug where renewed custom domain certificates were not persisted across
gateway
restarts. - Fixed a bug where resource provisioning errors were not displayed.
- Fixed a bug in our turso integration where using the latest version of
libsql-client
would not compile. We reverted to the previous version, see: #1355. - Fixed a bug where secrets that were removed with
cargo shuttle resource delete secrets
(and removed fromSecrets.toml
), would be restored on subsequent deploys.
Contributions
- @AlphaKeks made sure we can’t accidentally log secrets in #925
- @x04 implemented adaptive page hints for the
project list
anddeployment list
commands in #1357 - @ethanholz and @AliSajid improved the documentation of our service integrations and resource crates in #892 and #893
- @GlenDC fixed typos in #1360
Upgrading
Refer to the upgrading docs for how to upgrade your projects.
What's Changed
- bug: push renewed domain certificate to DB by @chesedo in #1347
- ci: add cargo-audit step by @Kazy in #1345
- feat: wrap secrets in custom types to prevent them from leaking by @AlphaKeks in #925
- feat(logger): add instrumentation needed for alert by @oddgrd in #1348
- bug: resource provisioning errors not showing by @chesedo in #1352
- bug: compile fails with secrets in resource configs by @chesedo in #1353
- refactor(runtime): hide internals from public-facing API, export tokio by @jonaro00 in #1332
- docs: updates for return types for examples actix-web, tide, serenity, tower by @ethanholz in #892
- Documentation updates for return types by @AliSajid in #893
- feat(cargo-shuttle): state MSRV in Cargo.toml by @jonaro00 in #1356
- bug: revert turso version update by @chesedo in #1355
- docs: add Docker Desktop config tip by @jonaro00 in #1350
- misc: cargo update to fix audit issue by @chesedo in #1358
- feat(deployer): delete secrets from deployer persistence on secrets resource delete by @oddgrd in #1359
- feat: adapative page hints (client-side only) by @x04 in #1357
- fix typos found in codebase by @GlenDC in #1360
- fix(deployer): handle cargo fetch without blocking logs, use async channels by @jonaro00 in #1349
- feat(gateway): project limit by @jonaro00 in #1331
- chore: v0.31.0 by @oddgrd in #1361
New Contributors
- @ethanholz made their first contribution in #892
- @AliSajid made their first contribution in #893
- @x04 made their first contribution in #1357
- @GlenDC made their first contribution in #1360
Full Changelog: v0.30.1...v0.31.0
v0.30.1
Shuttle: v0.30.1 update
We're excited to release shuttle v0.30.1! 🚀
Bug fixes
- fixed failing commands when running certain commands against deployments (e.g.
cargo shuttle deployment list
)
Considerations
If you experienced any problems with v0.30.0, please upgrade your Shuttle dependencies to v0.30.1 and run cargo shuttle project restart
.
Upgrading
Refer to the upgrading docs for how to upgrade your projects.
Commits for this release
- fix: scope enum serialization compatibility by @jonaro00 in #1341
- chore: v0.30.1 by @oddgrd in #1342
- chore: v0.30.1 part 2 by @jonaro00 in #1344
Full Changelog: v0.30.0...v0.30.1
v0.30.0
Shuttle: v0.30.0 update
We're excited to release shuttle v0.30.0! 🚀
Project deletion
You can now delete projects with cargo shuttle project delete
🥳!
Bear in mind that you will be asked to manually delete any linked secrets and/or databases before deleting a project. Other resources, such as shuttle-persist
, are deleted along with your project.
Other updates
- Improved error message when pre-deployment tests fail
- Fixed a bug in the installer script where reading Y/N input failed
- shuttle-next: Updated the version of
wasmtime
to 13.0
Contributions
- Unpin and bump version of
libsql-client
inshuttle-turso
@sentinel1909 - The commands that print tables (
project list
,deployment list
,resource list
, andsecrets
) can now use--raw
to not use bordered and dynamically sized tables @supleed2 - Alignment in the
project list
table fixed @supleed2
Upgrading
Refer to the upgrading docs for how to upgrade your projects.
Commits in this release
- ci: fix release ordering by @jonaro00 in #1312
- build: update dependencies by @Kazy in #1325
- refactor(deployer): improve deployment test failure msg by @oddgrd in #1326
- improvement: unpin libsql-client, bump to v0.32.0 by @sentinel1909 in #1329
- build(runtime): update to wasmtime 13.0 by @Kazy in #1330
- fix(installer): read input from process' controlling terminal by @orhun in #1327
- docs(cargo-shuttle): update the link for the Arch Linux package by @orhun in #1328
- feat(resource-recorder): add basic instrumentation by @oddgrd in #1335
- feat: project delete by @jonaro00 in #1307
- feat(logger): add basic instrumentation to the API by @oddgrd in #1336
- feat(cargo-shuttle): raw table output, fix table column alignment by @supleed2 in #1319
- chore: v0.30.0 by @oddgrd in #1339
New Contributors
Full Changelog: v0.29.1...v0.30.0
v0.29.1
Shuttle: v0.29.1 update
We're excited to release shuttle v0.29.1! 🚀
Bug Fixes
- fixed a bug where local runs with a database would fail on the first run
Note: only cargo-shuttle
needs to be updated for this release.
What's Changed
- fix(resources/shared-db): retry initial connection a few times by @Kazy in #1314
- chore: v0.29.1 by @oddgrd in #1317
Full Changelog: v0.29.0...v0.29.1
v0.29.0
Shuttle: v0.29.0 update
We're excited to release shuttle v0.29.0! 🚀
Deleting resources
Databases linked to a project can now be deleted via the cargo shuttle resource delete <type>
command. You can check the syntax of <type>
with cargo shuttle resource list
.
After deleting a database, remember to remove the annotation from your main function, so that it does not get provisioned again.
With this feature released, we will soon enable you to delete projects! Deleting other resources, such as Secrets, Persist and Static Folder, will be added soon.
Bug fixes
- Fixed
--reset-api-key
when logging out of the CLI - Fixed scenario where the CLI init command would crash if not logged in
Other updates
- Added backend support for billing 👀
Upgrading
Refer to the upgrading docs
Commits in this release
- feat(auth): added billing backend support by @iulianbarbu in #1289
- ci: fix cargo-shuttle publish ordering by @jonaro00 in #1297
- ci: use smaller machines for docker tests by @jonaro00 in #1301
- chore(editorconfig): add indentation settings for shell scripts by @orhun in #1296
- chore: remove shuttle-static-folder by @jonaro00 in #1298
- fix(cargo-shuttle): fix init login bugs by @oddgrd in #1309
- feat: added resource deletion by @GugaGongadze in #1256
- chore: v0.29.0 by @oddgrd in #1310
Full Changelog: v0.28.1...v0.29.0
cargo-shuttle v0.28.1
Bug fixes
- fixed a bug where cargo-shuttle would panic on
cargo shuttle login
Commits for this release
- test(cargo-shuttle): add debug assertion for command-line arguments by @orhun in #1295
- fix: cargo-shuttle panic on the login command by @jonaro00 in #1302
Note: only the cargo-shuttle version was increased in this release, no other crates need to be upgraded.
Full Changelog: v0.28.0...v0.28.1
v0.28.0
Shuttle: v0.28.0 update
We're excited to release shuttle v0.28.0! 🚀
New project container image
When restarting your project, your project container will now run a Debian 12 image (previously Debian 10). We don’t expect this upgrade to cause problems for users, but let us know if you experience any deployment issues after this bump, and we will do our best to fix it quickly.
Installer script
Linux and Mac users can now install and update cargo-shuttle
using this handy script. We also aim to make this compatible for Windows users in the future.
curl -sSfL https://www.shuttle.rs/install | bash
Removed cargo-generate
dependency 💎
We now use a homegrown method for cloning templates with the cargo shuttle init
command. This means cargo-shuttle
is now more oxidized (free from openssl dependencies), and will compile a bit faster. Thanks @d4ckard for the contribution, and congrats on claiming the $100 bounty on this issue! 🥳
More version warnings and project name checks
A common source of errors is mismatching versions between the CLI, the Shuttle runtime, and the Shuttle deployer. We added more warnings to cargo-shuttle
when it detects any mismatching versions. You can read more about Shuttle versions in the docs.
Furthermore, when running the init
command interactively, the chosen project name will be checked against the API, and re-prompt you if it is already taken. Using the --name
argument does not perform this check.
Please let us know about difficulties you encounter when using Shuttle. We are always trying to smooth out rough edges that users commonly face.
Other updates
- Better handling of project state drift.
- Project are compressed slightly more before deploying, so that you can squeeze in a couple more bytes in large projects.
- Updated handling of config files after cloning a template.
- The spinner when stopping or starting a project updates with a larger interval to not spam the API.
- [Experimental] Deployer image now has the linkers
lld
at/usr/bin/ld.lld
andmold
at/usr/bin/mold
.
Contributions
- Local run will ask you about using a different port if the chosen port is already occupied. Thanks @BadgerBloke!
- Removed
cargo-generate
dependency. @d4ckard - Fix the Shuttle stack starting locally on Mac M1. @AlexCzar
Upgrading
Refer to the upgrading docs for how to upgrade your projects.
Commits in this release
- fix(deployer): handle gracefully builder connection failure by @iulianbarbu in #1264
- ci: reduce shortest path in publish flow by @jonaro00 in #1265
- feat(ci): separation of tests that need docker by @jonaro00 in #1249
- feat(builder): improve the nix build capturing of stdout/stderr by @orhun in #1268
- bug: projects' states drifting by @chesedo in #1262
- feat(orchestrator): initialize shuttle-orchestrator as a library by @orhun in #1271
- feat(cargo-shuttle): better compression & handling of config files after init by @jonaro00 in #1257
- chore(docker): set up a local shared postgres for development by @orhun in #1272
- fix(docker-compose.dev): adjust auth dev dependency by @iulianbarbu in #1274
- feat: version checks between cli, gateway, deployer, runtime by @jonaro00 in #1275
- fix(cargo-shuttle): prompt for new port if port is taken by @BadgerBloke in #1270
- fix(cargo-shuttle): spam less requests when waiting for project ready by @jonaro00 in #1287
- refactor(cargo-shuttle): remove
cargo-generate
dependency by @d4ckard in #1281 - fix: gateway container startup on apple m1 by @AlexCzar in #1284
- ci: separate ci and unstable jobs, better caching by @jonaro00 in #1273
- feat(cargo-shuttle): check project name available by @jonaro00 in #1279
- feat: use smaller+newer images, script for patches, unique binary names by @jonaro00 in #1247
- feat: add lld and mold linkers by @jonaro00 in #1286
- fix(deployer): added runtime error handling by @iulianbarbu in #1231
- feat(installer): add installer script by @orhun in #1280
- docs: add installer script option by @jonaro00 in #1290
- fix: cleanup for 0.28.0 by @jonaro00 in #1278
- fix(gateway): install curl for health checks by @oddgrd in #1291
- chore: v0.28.0 by @oddgrd in #1293
New Contributors
- @BadgerBloke made their first contribution in #1270
- @AlexCzar made their first contribution in #1284
Full Changelog: v0.27.0...v0.28.0
v0.27.0
Shuttle: v0.27.0 update
We're excited to release shuttle v0.27.0! 🚀
shuttle-static-folder deprecated
It is now much easier to include and serve files in your deployment. The main change is that binaries are now executed with the working directory set to your project’s workspace root, the same way that cargo runs it locally. This means that all relative paths in your code will work correctly, and that shuttle-static-folder
is no longer needed. Check out how the Axum static folder example is simplified:
// Before 0.27.0
#[shuttle_runtime::main]
async fn axum(
#[shuttle_static_folder::StaticFolder(folder = "assets")] static_folder: PathBuf,
) -> shuttle_axum::ShuttleAxum {
let router = Router::new()
.nest_service("/assets", ServeDir::new(static_folder));
// ...
}
// After 0.27.0
// shuttle-static-folder can be removed from Cargo.toml
#[shuttle_runtime::main]
async fn axum() -> shuttle_axum::ShuttleAxum {
let router = Router::new()
.nest_service("/assets", ServeDir::new(PathBuf::from("assets")));
// ...
}
Including files in deployments
When you deploy, all source files that are not ignored by .gitignore
or .ignore
are uploaded to Shuttle. If you have ignored files that you want to upload as well, you would previously have had to add a !
-rule to .ignore
. This approach had a few caveats and was a bit convoluted.
Now, you can tell Shuttle which files to include in Shuttle.toml
in the project/workspace root:
### Shuttle.toml
# Declare ignored files that should be included in deployment:
assets = [
"file.txt", # include file.txt
"frontend/dist/*", # include all files and subdirs in frontend/dist/
"static/*", # include all files and subdirs in static/
]
Deploying build artifacts & build environment variables
The changes above make it easier to add arbitrary binaries/libraries/files that your app needs during compile or run time. They also allow for easier customization of the build process. By including the file .cargo/config.toml
in your deploy, you can set cargo or rustc options to use during compile time. For example, using the env field lets you set env vars during compile time.
shuttle-persist now persists data between project restarts
This refactor also makes it easier for adding other file-based persistent storage, such as SQLite. Let us know on Discord if you are interested in this type of feature.
More metadata in shuttle-metadata
The new struct returned now contains the fields env
, project_name
, service_name
, storage_path
.
Other updates
- The image used for local runs with the
shuttle-shared-db
resource now uses PostgreSQL version 14, this matches the version used in deployment. - More
cargo shuttle
commands now give better suggestions for what to do if a command fails. - With this release, we are testing out a new builder service behind the scenes. We will try to build every deployment with the new builder in parallel with the normal deployment to see how well it builds projects. This builder will eventually allow more build customization, and faster builds.
Contributions
- @beyarkay added a helpful error message when Docker is not running during a local run that needs it.
- @lecoqjacob updated the postgres version for local runs with
shuttle-shared-db
. - @DitherWither added CI for clippy and fmt to
shuttle-examples
.
Upgrading
Refer to the upgrading docs for how to upgrade your projects.
Commits for this release
- feat(cargo-shuttle): add suggestions in case of cmd failures by @iulianbarbu in #1245
- feat: builder service by @chesedo in #1244
- feat: execute projects from within workspace, deprecate shuttle-static-folder, make persist persistent, more metadata by @jonaro00 in #1050
- feat(deployer): connect deployer to builder service by @oddgrd in #1248
- fix(cargo-shuttle): secrets project requires a Secrets.toml by @iulianbarbu in #1250
- feat(builder): update tracing logs by @jonaro00 in #1252
- Add helpful error message on docker container error by @beyarkay in #951
- fix: default network subnet overlap by @oddgrd in #1254
- fix: metadata re-export by @jonaro00 in #1255
- chore: bump local pgsql from 11 to 14 by @lecoqjacob in #1073
- bug: project entering a state loop by @chesedo in #1260
- feat(deployer): send deployment archive to the builder by @iulianbarbu in #1253
- chore: v0.27.0 by @oddgrd in #1261
Full Changelog: v0.26.0...v0.27.0
v0.26.0
Shuttle: v0.26.0 update
We're excited to release shuttle v0.26.0! 🚀
New Logger Service
cargo shuttle project restart
) will make all logs from prior deployments inaccessible! See the details below for how to save your old logs if you need them.
This release features a big refactor of how we handle logs. The result? Fancier and more detailed logs from our side, and much more freedom in how you handle your logging.
- Everything that your app prints to stdout now shows up in the logs. This means that you can do some logging quickly with just
println!()
. - The default
tracing
subscriber that we initialize behind the scenes is now a default feature ofshuttle-runtime
, and can be disabled by disabling default features. - The filter in the default subscriber is
RUST_LOG="info,shuttle=trace"
. You can override these levels on a local run by setting theRUST_LOG
variable. The other alternative, which is required for modifying the log levels in a Shuttle deployment, is by dropping the default tracing layer and implementing your own, with a specific level filter of your choosing. shuttle-next
projects have a default tracing subscriber too, but this can not be opted out for the moment.- Disabling the default subscriber allows you to set up your own tracing subscriber, for example:
// In your Cargo.toml
shuttle-runtime = { version = "0.26.0", default-features = false }
tracing = "0.1.37"
tracing-subscriber = "0.3.17"
// In your Shuttle main function.
tracing_subscriber::fmt()
.with_env_filter(
EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy(),
)
.init();
tracing::info!("tracing is initialized");
Other updates
cargo shuttle init
: Interactive mode now warns you if the directory of choice is not empty & improved handling of the path argument. #1198- Simplified the
shuttle-persist
API by removing an explicit lifetime in the error enum. #1195
Contributions
- @d4ckard Improved the error message you get when running
cargo shuttle project start
on an already running project. #1192 #1194 - @sentinel1909 Updated
shuttle-persist
documentation. #1184 shuttle-hq/shuttle-docs#180 - @sentinel1909 Added
shuttle-metadata
documentation. shuttle-hq/shuttle-docs#181 - @auipga Corrected the databases tutorial. shuttle-hq/shuttle-docs#175
- @melkir Cleaned up our Makefile. #1196
Considerations
- If you do a
cargo shuttle project restart
or acargo shuttle project stop
followed by astart
, you will not be able to access logs from before the restart. If you want to retain your old logs, you can do acargo shuttle logs
before restarting and then persist the output to a local file. - If you upgrade the
cargo-shuttle
CLI you will have to upgrade your deployer by doing acargo shuttle project restart
, since it will expect to receive the updated output fromcargo shuttle logs
. If you upgraded the CLI but you’re not ready to restart your project, you can downgrade the CLI again. - If you restart your project with a
cargo shuttle project restart
your project container will be upgraded. You will then have to upgrade yourcargo-shuttle
CLI, since it will receive logs in a new format from the updated project container.
Upgrading
Refer to the upgrading docs for how to upgrade your projects.
Commits for this release
- feat: merge logger service from feat/shuttle-runtime-scaling by @oddgrd in #1139
- deployer: update logs APIs to fetch the logs from shuttle-logger by @iulianbarbu in #1143
- logger: store span names by @iulianbarbu in #1166
- logger: adjust logger to receive logs blobs by @iulianbarbu in #1172
- feat(deployer): send runtime logs to the logger service by @orhun in #1173
- refactor: remove tracing from runtime by @chesedo in #1185
- refactor: remove println from shuttle-logger by @chesedo in #1186
- feat(runtime): write next runtime logs to stdout by @orhun in #1187
- refactor(runtime): replace trace with println by @orhun in #1190
- feat: logs batching by @chesedo in #1188
- Create the local setup for replacing shuttle-logger sqlite with postgres by @iulianbarbu in #1145
- feat(gateway): special error if own project is already running by @d4ckard in #1192
- chore: update readme with new persist methods by @sentinel1909 in #1184
- fix(persist): don't use lifetime in error by @jonaro00 in #1195
- feat(gateway): inform project owner about running state by @d4ckard in #1194
- chore(gateway): stop setting
RUST_LOG
in deployers by @orhun in #1197 - feat(deployer): StateChangeLayer, DeploymentLogLayer, new log item structure by @jonaro00 in #1171
- bug: service name being unknown by @chesedo in #1202
- feat(cargo-shuttle): prompt for init path when not given, warn if init dir not empty by @jonaro00 in #1198
- chore(changelog): add git-cliff configuration by @orhun in #1200
- feat: remove publish steps from the Makefile by @melkir in #1196
- feat(runtime): set up a tracing-subscriber as a default feature by @orhun in #1203
- test(deployer): fixed deployer tests and removed unnecessary runtime logger_uri arg by @iulianbarbu in #1204
- chore(services): disable default features for shuttle-runtime by @orhun in #1205
- refactor(proto): fix the use of deprecated chrono datetime by @orhun in #1207
- fix: missing readmes in deployers local source by @oddgrd in #1206
- Revert "feat(shuttle-axum) Make AxumService generic to be able to use axum::State with it (#924)" by @jonaro00 in #1199
- refactor(runtime,codegen): avoid double timestamps problem by @iulianbarbu in #1210
- feat(deployer): handle errors from corrupted resource data by @oddgrd in #1208
- feat(codegen): restore default log level, improve error messages by @jonaro00 in #1211
- fix(logger): resolve CI failures caused by recent changes by @iulianbarbu in #1212
- feat(containerfile): improve deployer build caching by @jonaro00 in #1214
- fix: span names, log levels and messages by @jonaro00 in #1213
- Enable auto-sharding in shuttle-poise by @jdh8 in #1217
- refactor: match local logs with deployer logs by @chesedo in #1216
- fix(otel): restore honeycomb and dd exporters by @oddgrd in #1218
- feat(shuttle-next): enable tracing by default by @iulianbarbu in #1219
- refactor: switch to LOGGER_POSTGRES_URI by @chesedo in #1220
- refactor: improve stream logs by @chesedo in #1221
- refactor: add index to deployment id by @chesedo in #1224
- batch in 1 sec intervals by @jonaro00 in #1222
- fix: logger branch cleanups by @oddgrd in #1226
- ci: logger postgres uri by @oddgrd in #1228
- fix: truncate log item strings by @jonaro00 in #1227
- feat(common): change request_span macro to info level by @oddgrd in #1230
- feat(logger): refactor to loop, add traces by @oddgrd in #1232
- feat(logger): logger queue size trace by @oddgrd in #1235
- ci: uncomment deployment branch filters by @oddgrd in #1238
- feat: dedicated logger service by @chesedo in #1225
- chore: v0.26.0 by @oddgrd in #1239
- fix(makefile): remove duplicate command by @oddgrd in #1241
- fix(Containerfile): copied shuttle-logger service in the final image by @iulianbarbu in #1242
- feat: outdated log parse warning by @jonaro00 in https://github.com/shuttle-hq/shutt...