From 547621950fb234ed47920a7b931c0f77a36e0176 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 30 Jul 2025 21:15:30 -0400 Subject: [PATCH] v0.7.0 --- Cargo.lock | 8 ++--- Cargo.toml | 2 +- RELEASING.md | 61 ++------------------------------ core/Cargo.toml | 2 +- docker-compose.yml | 2 +- docs/src/usage/docker-compose.md | 2 +- postgres/Cargo.toml | 4 +-- server/Cargo.toml | 2 +- sqlite/Cargo.toml | 4 +-- 9 files changed, 16 insertions(+), 71 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index da36c47..22d0c04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1859,7 +1859,7 @@ dependencies = [ [[package]] name = "taskchampion-sync-server" -version = "0.7.0-pre" +version = "0.7.0" dependencies = [ "actix-rt", "actix-web", @@ -1883,7 +1883,7 @@ dependencies = [ [[package]] name = "taskchampion-sync-server-core" -version = "0.7.0-pre" +version = "0.7.0" dependencies = [ "anyhow", "async-trait", @@ -1898,7 +1898,7 @@ dependencies = [ [[package]] name = "taskchampion-sync-server-storage-postgres" -version = "0.7.0-pre" +version = "0.7.0" dependencies = [ "anyhow", "async-trait", @@ -1921,7 +1921,7 @@ dependencies = [ [[package]] name = "taskchampion-sync-server-storage-sqlite" -version = "0.7.0-pre" +version = "0.7.0" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 7fd6fca..62b2019 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ actix-rt = "2" tempfile = "3" pretty_assertions = "1" temp-env = "0.3" -tokio = { version = "*", features = ["rt", "macros"] } +tokio = { version = "1.47", features = ["rt", "macros"] } tokio-postgres = { version = "0.7.13", features = ["with-uuid-1"] } bb8 = "0.9.0" bb8-postgres = { version = "0.9.0", features = ["with-uuid-1"] } diff --git a/RELEASING.md b/RELEASING.md index 05c4c29..daf405a 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -4,7 +4,7 @@ 1. Run `cargo test` 1. Run `cargo clean && cargo clippy` 1. Remove the `-pre` from `version` in all `*/Cargo.toml`, and from the `version = ..` in any references between packages. -1. Update the link to `docker-compose.yml` in `README.md` to refer to the new version. +1. Update the link to `docker-compose.yml` in `docs/src/usage/docker-compose.md` to refer to the new version. 1. Update the docker image in `docker-compose.yml` to refer to the new version. 1. Run `cargo semver-checks` (https://crates.io/crates/cargo-semver-checks) 1. Run `cargo build --release` @@ -13,65 +13,10 @@ 1. Run `git push upstream` 1. Run `git push upstream --tag vX.Y.Z` 1. Run `cargo publish -p taskchampion-sync-server-core` -1. Run `cargo publish -p taskchampion-sync-server-storage-sqlite` (and add any other new published packages here) +1. Run `cargo publish -p taskchampion-sync-server-storage-sqlite` +1. Run `cargo publish -p taskchampion-sync-server-storage-postgres` (and add any other new published packages here) 1. Bump the patch version in `*/Cargo.toml` and add the `-pre` suffix. This allows `cargo-semver-checks` to check for changes not accounted for in the version delta. 1. Run `cargo build --release` again to update `Cargo.lock` 1. Commit that change with comment "Bump to -pre version". 1. Run `git push upstream` 1. Navigate to the tag in the GitHub releases UI and create a release with general comments about the changes in the release - ---- - -For the next release, - -- remove postgres from the exclusion list in `.github/workflows/checks.yml` after the release - -- include the folowing in the release notes: - -Running the Docker image for this server without specifying DATA_DIR -defaulted to storing the server data in -`/var/lib/taskchampion-sync-server`. However, the Dockerfile only -specifies that the subdirectory `/var/lib/taskchampion-sync-server/data` -is a VOLUME. This change fixes the default to match the VOLUME, putting -the server data on an ephemeral volume or, if a `--volume -$NAME:/var/lib/taskchampion-sync-server/data` argument is provided to -`docker run`, in a named volume. - -Before this commit, with default settings the server data is stored in -the container's ephemeral writeable layer. When the container is killed, -the data is lost. This issue does not affect deployments with `docker -compose`, as the compose configuration specifies a correct `DATA_DIR`. - -You can determine if your deployment is affected as follows. First, -determine the ID of the running server container, `$CONTAINER`. Examine -the volumes for that container: - -```shell -$ docker container inspect $CONTAINER | jq '.[0].Config.Volumes' -{ - "/var/lib/task-champion-sync-server/data": {} -} -``` - -Next, find the server data, in a `.sqlite3` file: - -```shell -$ docker exec $CONTAINER find /var/lib/taskchampion-sync-server -/var/lib/taskchampion-sync-server -/var/lib/taskchampion-sync-server/data -/var/lib/taskchampion-sync-server/taskchampion-sync-server.sqlite3 -``` - -If the data is not in a directory mounted as a volume, then it is -ephemeral. To copy the data out of the container: - -```shell -docker cp $CONTAINER:/var/lib/taskchampion-sync-server/taskchampion-sync-server.sqlite3 /tmp -``` - -You may then upgrade the image and use `docker cp` to copy the data back -to the correct location, `/var/lib/taskchampion-sync-server/data`. - -Note that, as long as all replicas are fully synced, the TaskChampion -sync protocol is resilient to loss of server data, so even if the server -data has been lost, `task sync` may continue to work. diff --git a/core/Cargo.toml b/core/Cargo.toml index 68b9adf..e97677b 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "taskchampion-sync-server-core" -version = "0.7.0-pre" +version = "0.7.0" authors = ["Dustin J. Mitchell "] edition = "2021" description = "Core of sync protocol for TaskChampion" diff --git a/docker-compose.yml b/docker-compose.yml index 5b45098..5add3a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,7 +43,7 @@ services: condition: service_completed_successfully tss: - image: ghcr.io/gothenburgbitfactory/taskchampion-sync-server:0.6.1 + image: ghcr.io/gothenburgbitfactory/taskchampion-sync-server:0.7.0 restart: unless-stopped environment: - "RUST_LOG=info" diff --git a/docs/src/usage/docker-compose.md b/docs/src/usage/docker-compose.md index 598f20e..e1c14a9 100644 --- a/docs/src/usage/docker-compose.md +++ b/docs/src/usage/docker-compose.md @@ -1,7 +1,7 @@ # Docker Compose The -[`docker-compose.yml`](https://raw.githubusercontent.com/GothenburgBitFactory/taskchampion-sync-server/refs/tags/v0.6.1/docker-compose.yml) +[`docker-compose.yml`](https://raw.githubusercontent.com/GothenburgBitFactory/taskchampion-sync-server/refs/tags/v0.7.0/docker-compose.yml) file in this repository is sufficient to run taskchampion-sync-server, including setting up TLS certificates using Lets Encrypt, thanks to [Caddy](https://caddyserver.com/). This setup uses the SQLite backend, which is diff --git a/postgres/Cargo.toml b/postgres/Cargo.toml index 010ffbf..4ac91ff 100644 --- a/postgres/Cargo.toml +++ b/postgres/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "taskchampion-sync-server-storage-postgres" -version = "0.7.0-pre" +version = "0.7.0" authors = ["Dustin J. Mitchell "] edition = "2021" description = "Postgres backend for TaskChampion-sync-server" @@ -16,7 +16,7 @@ bb8.workspace = true chrono.workspace = true env_logger.workspace = true log.workspace = true -taskchampion-sync-server-core = { path = "../core", version = "0.7.0-pre" } +taskchampion-sync-server-core = { path = "../core", version = "0.7.0" } thiserror.workspace = true tokio-postgres.workspace = true tokio.workspace = true diff --git a/server/Cargo.toml b/server/Cargo.toml index 7ae6895..70d207d 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "taskchampion-sync-server" -version = "0.7.0-pre" +version = "0.7.0" authors = ["Dustin J. Mitchell "] edition = "2021" publish = false diff --git a/sqlite/Cargo.toml b/sqlite/Cargo.toml index c3c03d0..4744e01 100644 --- a/sqlite/Cargo.toml +++ b/sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "taskchampion-sync-server-storage-sqlite" -version = "0.7.0-pre" +version = "0.7.0" authors = ["Dustin J. Mitchell "] edition = "2021" description = "SQLite backend for TaskChampion-sync-server" @@ -9,7 +9,7 @@ repository = "https://github.com/GothenburgBitFactory/taskchampion-sync-server" license = "MIT" [dependencies] -taskchampion-sync-server-core = { path = "../core", version = "0.7.0-pre" } +taskchampion-sync-server-core = { path = "../core", version = "0.7.0" } async-trait.workspace = true uuid.workspace = true anyhow.workspace = true