From f05eed2e36538d8124de97faaf6edf74d5134b02 Mon Sep 17 00:00:00 2001 From: asonix Date: Tue, 4 Jun 2024 11:49:13 -0500 Subject: [PATCH] Prepare 0.5.15 --- Cargo.lock | 2 +- Cargo.toml | 2 +- pict-rs.nix | 2 +- pict-rs.toml | 5 ++++ releases/0.5.15.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 releases/0.5.15.md diff --git a/Cargo.lock b/Cargo.lock index 145e891..ad102c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1996,7 +1996,7 @@ dependencies = [ [[package]] name = "pict-rs" -version = "0.5.14" +version = "0.5.15" dependencies = [ "actix-form-data", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index 87f9a22..3c37207 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pict-rs" description = "A simple image hosting service" -version = "0.5.14" +version = "0.5.15" authors = ["asonix "] license = "AGPL-3.0" readme = "README.md" diff --git a/pict-rs.nix b/pict-rs.nix index 60a6ccd..049bc05 100644 --- a/pict-rs.nix +++ b/pict-rs.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage { pname = "pict-rs"; - version = "0.5.14"; + version = "0.5.15"; src = ./.; cargoLock = { diff --git a/pict-rs.toml b/pict-rs.toml index c21ed12..35a8798 100644 --- a/pict-rs.toml +++ b/pict-rs.toml @@ -103,6 +103,11 @@ log_spans = false # default: false no_ansi = false +## Optional: whether to log upon request completion +# environment variable: PICTRS__TRACING__LOGGING__LOG_REQUESTS +# default: false +log_requests = false + ## Console configuration [tracing.console] diff --git a/releases/0.5.15.md b/releases/0.5.15.md new file mode 100644 index 0000000..e338411 --- /dev/null +++ b/releases/0.5.15.md @@ -0,0 +1,58 @@ +# pict-rs 0.5.15 + +pict-rs is a simple image hosting microservice, designed to handle storing and retrieving images, +animations, and videos, as well as providing basic image processing functionality. + +## Overview + +pict-rs 0.5.15 includes a bugfix for cleaning proxied media, updated dependencies, and a new option +to log requests. + +### Fixes + +- [Proxied Media Cleanup](#proxied-media-cleanup) + + +### Additions + +- [Request Logging](#request-logging) + + +## Upgrade Notes + +There are no significant changes from 0.5.14. Upgrading should be a simple as pulling a new version +of pict-rs. + + +## Descriptions + +### Proxied Media Cleanup + +At some point, the cleanup logic for proxied media got flipped around to try removing the internal +alias before removing the proxy record. This works fine with a sled backend, but not with a +postgres backend, and postgres would complain about invalidating a foreign key relationship. +pict-rs 0.5.15 fixes this by ensuring that the related proxy record is cleaned first. + + +### Request Logging + +A new configuration option has been added to pict-rs as an option to get more information about +what pict-rs is doing. By default, pict-rs only logs what it considers to be errors, but when +`log_requests` is enabled, it will also log information about successful requests. This can help +with debugging without enabling full debug logs or resorting to logging spans. + +It can be configured via toml +```toml +[tracing.logging] +log_requests = true +``` + +via environment variables +```bash +PICTRS__TRACING__LOGGING__LOG_REQUESTS=true +``` + +or via the commandline +```bash +pict-rs --log-requests run +```