docs/rails_upgrades/7_2.md
This checkpoint upgrades Chatwoot from Rails 7.1.5.2 to Rails 7.2.3.1. It deliberately keeps config.load_defaults 7.0, so it does not change the Rails 7.1 or 7.2 serialization, encryption, callback, job-enqueue, Active Storage WebP, or PostgreSQL date-decoding defaults.
There is no database schema migration in this checkpoint.
User#conversations association alias uses a Ruby method alias because Rails 7.2 reserves alias_attribute for database attributes.ActiveRecord::MigrationContext, rather than the removed connection-level helper.devise-secure_password moves from the Chatwoot fork to upstream 2.2.1, the latest release that supports both Devise 4 and Rails 8. Later upstream releases require Devise 5.connection_pool below 3. Sidekiq 7.3.1 starts workers with connection_pool 3 but crashes both scheduler threads, so this pairing is a deployment requirement rather than an optional maintenance update.azure-storage-blob client to the azure-blob adapter. The configured service name remains microsoft, so existing active_storage_blobs.service_name values and Azure object keys do not change.Take the normal PostgreSQL and Redis backups and verify the database backup can be restored.
Use the same Ruby 3.4.4 and Node 24 versions as the release build.
Install dependencies and build assets.
Run the read-only preflight against a production replica or during the maintenance window:
EXPECTED_RAILS_VERSION=7.2.3.1 \
EXPECTED_CONFIG_DEFAULTS=7.0 \
EXPECTED_SIDEKIQ_VERSION=7.3.10 \
EXPECTED_AZURE_SERVICE=AzureBlob \
bundle exec rails runner script/rails_upgrade/preflight.rb
If the installation has a large number of encrypted rows, a bounded rehearsal can use PREFLIGHT_MAX_ENCRYPTED_ROWS=1000. The final production preflight should omit that limit so every encrypted value is read.
If Azure is used, select a representative blob and verify that the new adapter can find it:
ACTIVE_STORAGE_CHECK_BLOB_ID=<blob-id> \
EXPECTED_RAILS_VERSION=7.2.3.1 \
EXPECTED_CONFIG_DEFAULTS=7.0 \
EXPECTED_AZURE_SERVICE=AzureBlob \
bundle exec rails runner script/rails_upgrade/preflight.rb
Run the explicit write/read/delete smoke against every configured storage service. This creates one uniquely named text blob and purges it in an ensure block:
RAILS_UPGRADE_ALLOW_STORAGE_WRITE=true \
RAILS_UPGRADE_STORAGE_SERVICE=microsoft \
bundle exec rails runner script/rails_upgrade/active_storage_smoke.rb
Existing shared-key installations keep the same environment variables:
AZURE_STORAGE_ACCOUNT_NAMEAZURE_STORAGE_ACCESS_KEYAZURE_STORAGE_CONTAINERThe service key selected by ACTIVE_STORAGE_SERVICE remains microsoft. Only the adapter class in config/storage.yml changes from AzureStorage to AzureBlob; no blob copy or database update is required.
For an Azurite rehearsal, set AZURE_STORAGE_BLOB_HOST to the emulator endpoint and use its account name, access key, and pre-created container.
bundle exec rails db:abort_if_pending_migrations.ConnectionPool::TimedStack#pop argument error. Wait for at least one minute-level cron job to enqueue and complete.Web and worker processes from the old and new release may overlap because this checkpoint retains Rails 7.0 framework defaults and does not introduce a new persisted serialization format.
Rails.version reports 7.2.3.1 and the preflight reports rails.framework_defaults as 7.0.Rollback is code-only because this checkpoint has no schema or data migration and keeps the old framework defaults.
AzureStorage adapter configuration if Azure is enabled.Do not activate Rails 7.1/7.2 defaults in the same rollout. Encryption digest, cache/message serialization, callback ordering, job enqueue timing, WebP handling, and PostgreSQL date decoding require separately deployable compatibility work.