# Restate v1.8.1 Release Notes ## Highlights - **Deleting a Kafka subscription now drains its in-flight records** and logs where every topic partition stopped, so a topic can be handed over to another consumer, for example when migrating to the Kafka ingress integration. - **Remove several deployments at once** with `restate deployments remove ...` or the new `POST /deployments/bulk-delete` Admin API endpoint. - **Configuration changes in Kubernetes ConfigMaps are applied** without restarting pods. > v1.8.1 is a drop-in upgrade from v1.8.0. Clusters still on v1.7.x must follow the [v1.8.0 upgrade requirements](v1.8.0.md#upgrade--rollback-guidance). Rolling back to v1.8.0 remains possible unless you enable `experimental-enable-preflight-signal-recording`. See [Upgrade & Rollback Guidance](#upgrade--rollback-guidance). --- ## Table of Contents - [Breaking Changes](#breaking-changes) - [`restate deployments remove --json` Output](#restate-deployments-remove---json-output) - [New Features](#new-features) - [Bulk Deployment Removal](#bulk-deployment-removal) - [Canonical IDs in the SQL Tables](#canonical-ids-in-the-sql-tables) - [Improvements](#improvements) - [Kafka Subscriptions Drain In-Flight Records on Deletion](#kafka-subscriptions-drain-in-flight-records-on-deletion) - [Other Behavioral Changes](#other-behavioral-changes) - [Observability](#observability) - [Stability and Security](#stability-and-security) - [Restate UI 1.0.37](#restate-ui-1037) - [Bug Fixes](#bug-fixes) - [Upgrade & Rollback Guidance](#upgrade--rollback-guidance) --- ## Breaking Changes ### `restate deployments remove --json` Output `restate deployments remove` now accepts several deployment ids (see [Bulk Deployment Removal](#bulk-deployment-removal)), and its output has the same shape for one or several deployments. With `--json`, the deployment details move from the top-level `deployment` and `services` keys into a `deployments` array, and a new `results` array reports the outcome for each deployment. Scripts that parse the JSON output of this command need to be updated. The human-readable output and the exit codes are unchanged for a single deployment. --- ## New Features ### Bulk Deployment Removal `restate deployments remove` now accepts several deployment ids and removes them together: ```shell restate deployments remove dp_14LsPzBd7Uuvbx8wA3wtKoD dp_11pXxBETJoA3YQ1jW8QnSuF ``` The command shows every deployment it is about to remove, asks for confirmation once, and refuses (unless `--force`) if any of them is not drained yet. The Admin API gains a matching `POST /deployments/bulk-delete` endpoint, taking `{"deployment_ids": [...], "force": true}` with up to 1000 deployment ids. It responds with the deployments that were deleted (`succeeded`) and the ones that were not (`failed`, each with a `reason` such as `not_found` and an error message). Like `DELETE /deployments/{deployment}`, it currently only supports `force: true`. - `restate deployments remove ` keeps working as before; see [Breaking Changes](#restate-deployments-remove---json-output) for the `--json` output. - `DELETE /deployments/{deployment}` without `force=true` still returns `501 Not Implemented`, now with an error message in the response body. - When used against an older server without the bulk endpoint, the CLI removes the deployments one by one instead. _Related: [#5576](https://github.com/restatedev/restate/pull/5576), [#5606](https://github.com/restatedev/restate/pull/5606)_ ### Canonical IDs in the SQL Tables Restate now records, for every new invocation, the point in the log where it was created. The `sys_invocation_status` table shows it in a new `canonical_id` column: the invocation id followed by that position, for example `inv_..._42`. The canonical id distinguishes a specific incarnation of an invocation. The `sys_vqueues` and `sys_vqueue_entry_status` tables gain a `canonical_id` column as well, containing the entry's resource id followed by `_` and its sequence number. Equality and `IN` filters on this column use the index. The existing `entry_id` column keeps its format and lookup behavior, so existing queries need no change. What you see after upgrading: - `canonical_id` is set for invocations created once all nodes run v1.8.1. - Invocations that already exist when upgrading **from v1.8.0**, or from v1.7 with `experimental-enable-vqueues` enabled, show a NULL `canonical_id`. They get one the next time they start running, suspend, pause, resume or are pinned to a deployment. Invocations that had already completed keep a NULL `canonical_id`. - Invocations that already exist when upgrading **directly from v1.7** without VQueues get a `canonical_id` during the one-time migration. Their original log position isn't known, so the id ends with a placeholder (usually `_0`) instead. It still matches the `canonical_id` of the invocation's entry in `sys_vqueue_entry_status`. - No action is needed. _Related: [#5561](https://github.com/restatedev/restate/pull/5561), [#5577](https://github.com/restatedev/restate/pull/5577), [#5602](https://github.com/restatedev/restate/pull/5602), [#5385](https://github.com/restatedev/restate/pull/5385)_ --- ## Improvements ### Kafka Subscriptions Drain In-Flight Records on Deletion Deleting a Kafka subscription used to stop its consumer immediately, which could drop records that were already read from Kafka but not yet accepted by Restate. Restate now stops reading new messages, waits up to 5 minutes for the in-flight records to be accepted, and logs where every topic partition stopped: ``` Kafka partition drained, last offset ingested into Restate: Kafka partition drained, no records were ingested since the partition was assigned Kafka subscription drained, the last ingested offsets were logged per partition Committed Kafka consumer group offsets of the draining subscription: [/: , ...] ``` The `Committed` line is logged for every commit while draining, including the periodic auto commits, so a partition can appear in several of them. The last line that mentions a partition shows its committed offset. A committed offset is the next offset to read, so it is one higher than the last ingested offset. This makes it possible to delete a subscription and hand its topics over to another consumer, in particular when following the [migration guide to the Kafka ingress integration](https://docs.restate.dev/services/integrations/kafka#migrating-from-the-old-kafka-support), knowing where Restate stopped. Draining is best effort. If the server crashes, or if the drain does not finish within 5 minutes (logged as `did not finish draining`), records can still be dropped. A partition whose drain fails logs `Draining the Kafka partition failed` together with its last ingested offset. If a consumer group rebalance happens while draining, Restate may no longer be able to store the offsets of the records it still accepts (logged as `Failed to store the Kafka offset while draining`), in which case the committed offset lags behind the ingested one. Restarts caused by configuration changes, consumer group rebalances, and server shutdown are unaffected. **Retrying a drain.** A drain that did not finish can be retried. The subscription creation request now accepts an optional `id`, and the CLI exposes it as `restate subscriptions create --id ...`. Creating a subscription with the id of the deleted one (and the same `group.id`, if it was set explicitly) resumes it from the committed consumer group offsets. Records that Restate ingested under that id, including the ones that were still in flight when the drain was given up, are deduplicated instead of being invoked again. To retry: 1. Note the log-end offsets of the topic partitions, for example from `kafka-consumer-groups.sh --describe --group `. The group is the subscription id unless `group.id` was set; both are shown by `GET /subscriptions/`. 2. Recreate the subscription under the same id. 3. Wait until the committed offset of every partition is past the log-end offset noted in step 1. Only records accepted by Restate are committed, so this guarantees that nothing from the previous attempt is still pending. Deleting earlier can end the drain below what Restate actually ingested. 4. Delete the subscription again and follow the log lines as described above. Restate never forgets the ingested offsets of a subscription id, so do not reuse an id after resetting its consumer group offsets in order to replay records: the replayed records would be dropped as duplicates. **Migrating a topic to the Kafka ingress integration.** When deleting a subscription in order to migrate its topics: 1. Delete the subscription and wait for the `Kafka subscription drained` log line on every Restate node. 2. For every partition that logged a `last offset ingested into Restate`, compare that offset + 1 with the committed offset in the last `Committed Kafka consumer group offsets` line that mentions the partition. If they match, the consumer group already points to the right offset. 3. If they do not match, the partition has no commit line, or the commit line reports an error for it, set the consumer group offset of that topic partition to **the logged ingested offset + 1** before starting the integration. For example, with the standard Kafka tooling: ```bash kafka-consumer-groups.sh --bootstrap-server --group \ --topic : --reset-offsets --to-offset --execute ``` Partitions that logged `no records were ingested` can keep the consumer group's current offset. Partitions without any `drained` or `failed` line may have had records in flight when the drain was given up; retry the drain as described above, or accept that starting the integration from an older offset re-delivers those records and starting from a newer one skips them. Starting the integration from an offset older than the one Restate ingested re-ingests records Restate already accepted, resulting in duplicate invocations. _Related: [#5598](https://github.com/restatedev/restate/pull/5598)_ ### Other Behavioral Changes - **Bounded partition fanout for the gRPC ingestion API.** Records ingested through the experimental gRPC ingestion API for unkeyed services without an idempotency key are now spread over the same bounded set of 512 partition keys per service that HTTP ingress uses, instead of the whole key space. Because such records are routed to a different partition than on v1.8.0, an ingestion stream that is retried across the upgrade may have its in-flight records ingested twice ([#5599](https://github.com/restatedev/restate/pull/5599)). ### Observability - **Opt-in per-handler ingress request metrics.** The ingress request metrics `restate.ingress.requests.total` and `restate.ingress.request_duration.seconds` can now be broken down per handler. Setting `ingress.detailed-request-metrics = true` adds the `rpc.method` label, holding the invoked handler name, next to the existing `rpc.service` and `rpc.type` labels. Requests for handlers that do not exist are reported with the value ``. The option is off by default and read at startup, so changing it requires a restart. Enabling it multiplies the number of exported time series for these two metrics by the number of registered handlers per service, so only enable it if that number is manageable ([#5605](https://github.com/restatedev/restate/pull/5605)). ```toml [ingress] detailed-request-metrics = true ``` ### Stability and Security - **TLS dependency updates.** `rustls` is updated to 0.23.46 (RUSTSEC-2026-0346, RUSTSEC-2026-0347, RUSTSEC-2026-0348, RUSTSEC-2026-0349), and `rustls-webpki` to 0.103.16 and `webpki-root-certs` to 1.0.10 (RUSTSEC-2026-0381, RUSTSEC-2026-0382) ([#5565](https://github.com/restatedev/restate/pull/5565), [#5604](https://github.com/restatedev/restate/pull/5604)). ### Restate UI 1.0.37 The bundled Restate UI is updated from **v1.0.34** to **v1.0.37**: journal entries now show their name for all entry types, and restarting a workflow from the UI uses the configured authentication. _Related: [Restate UI v1.0.36](https://github.com/restatedev/restate-web-ui/releases/tag/v1.0.36), [Restate UI v1.0.37](https://github.com/restatedev/restate-web-ui/releases/tag/v1.0.37)_ --- ## Bug Fixes - **Signals sent to invocations that haven't started yet are no longer lost.** Signals sent to an invocation that is still scheduled (for example a delayed send) or waiting in a Virtual Object's queue were silently discarded. That includes awakeable completions. With the new experimental option enabled, Restate records these signals and the handler receives them once the invocation starts. Upgrade all nodes to v1.8.1 or newer, then enable the option: ```toml experimental-enable-preflight-signal-recording = true ``` - Until the option is enabled, the behavior is unchanged: such signals are still discarded. - Enabling it is one-way: removing the option later doesn't turn recording off again. - Only signals delivered after the option takes effect are recorded. Signals that were already discarded can't be recovered. - Invocations created on Restate versions older than v1.6 that are still scheduled or queued keep discarding these signals. - Once enabled, you **cannot** roll back to a Restate-server version older than v1.8.1. _Related: [#5587](https://github.com/restatedev/restate/pull/5587)_ - **Logs with more than 2^32 records are trimmed again.** Once a log's tail passed 2^32 records, every trim was silently capped at that point, so the log stopped shrinking. For log segments starting above 2^32, the trim could also panic and take down the log trimmer and the node's worker role. Trim points are now computed relative to the segment, and a trim point before the start of a segment is a no-op. No configuration changes are required ([#5589](https://github.com/restatedev/restate/pull/5589)). - **Configuration file changes in Kubernetes ConfigMaps are applied.** `restate-server` reloads its configuration file when the file is a symlink whose target is replaced, which is how Kubernetes updates a ConfigMap mounted into a pod. Before, the first such update was noticed but failed to load, and later updates went unnoticed until a restart. Runtime-adjustable settings (for example `rocksdb-total-memory-size`) can now be changed by updating the ConfigMap that holds `config.toml`, without restarting the pods. Settings that are only read at startup still need a restart ([#5595](https://github.com/restatedev/restate/pull/5595)). --- ## Upgrade & Rollback Guidance **From v1.8.0.** Upgrade nodes one at a time; no migration runs. Everything v1.8.1 writes can be read by v1.8.0, so rolling back to v1.8.0 is possible, with one exception: a partition on which `experimental-enable-preflight-signal-recording` has been enabled cannot be served by a node older than v1.8.1. Upgrade the Admin nodes before retrying a Kafka drain with `restate subscriptions create --id`; a v1.8.0 Admin node ignores the requested id and creates the subscription under a new one. **From v1.7.x.** The requirements of v1.8.0 apply unchanged: all nodes must run v1.7.3 or newer first, and each partition runs a one-time migration during which it is unavailable. See the [v1.8.0 upgrade guidance](v1.8.0.md#upgrade--rollback-guidance).