Upgrading from 1.4.x to 1.5.0

This document contains only the changes compared to v1.4.x releases. For the new features see the release notes.

Upgrade process

You can upgrade AnyCable server and your backend SDK (Ruby, JS) in any order. As soon you upgrade both, you can migrate your secrets (see below).

Secrets management

AnyCable now supports a common application secret—a single secret that can be used to secure all the features: HTTP broadcasts, HTTP RPC, JWT tokens, Turbo streams.

You MAY continue using separate secrets for all the features. However, if you'd like to migrate to the application secret, we recommend to plan the migration thoroughly to avoid service disruptions. There is no one recipe to fit all AnyCable setups. Feel free to contact us if you need help!

AnyCable Rails

JWT

The anycable-rails-jwt has been merged into anycable and anycable-rails gems. Remove anycable-rails-jwt from your Gemfile.

If you used AnyCable::Rails::JWT module explicitly in your code, update it to AnyCable::JWT and pass identifiers as a Hash:

- AnyCable::Rails::JWT.encode(current_user:, expires_at: 10.minutes.from_now)
+ AnyCable::JWT.encode({current_user:}, expires_at: 10.minutes.from_now)

Configuration changes

Some configuration parameters has been renamed as follows:

  • http_broadcast_secret -> broadcast_key
  • jwt_id_key -> jwt_secret
  • jwt_id_ttl -> jwt_ttl
  • jwt_id_param -> jwt_param

AnyCable server (Go)

Some configuration parameters has been renamed as follows:

  • http_broadcast_secret -> broadcast_key
  • jwt_id_key -> jwt_secret
  • jwt_id_ttl -> jwt_ttl
  • jwt_id_param -> jwt_param
  • jwt_id_enforce -> enforce_jwt
  • turbo_rails_key -> turbo_secret + turbo_streams
  • cable_ready_key -> cable_ready_secret + cable_ready

Older parameter names are still supported but deprecated and will be removed in v2.