Skip to content

v0.11.0

Choose a tag to compare

@ismaelbks ismaelbks released this 17 Apr 10:19
· 51 commits to master since this release
db4f2a2

What's new in V0.11.0 ?

✅ No breaking changes — fully backward compatible.

New feature

Per-CRM enabled: flag — Keep Etlify dormant in dev/test

Etlify::CRM.register now accepts an enabled: boolean option (default true). When set to false, the CRM becomes a pure no-op: all sync and delete calls succeed silently without calling the adapter or writing to the database.

Etlify::CRM.register(
  :hubspot,
  adapter: Etlify::Adapters::HubspotV3Adapter.new(
    access_token: ENV["HUBSPOT_PRIVATE_APP_TOKEN"]
  ),
  enabled: Rails.env.production? || Rails.env.staging?,
  options: { job_class: Etlify::SyncJob }
)

Behavior when enabled: false:

Entry point Return value Side effects
record.<crm>_sync! / record.crm_sync! true No job enqueued, no adapter call
record.<crm>_delete! / record.crm_delete! true No adapter call
Etlify::Synchronizer.call :disabled No adapter call, no DB write
Etlify::Deleter.call :disabled No adapter call
Etlify::BatchSynchronizer.call stats with disabled: true, skipped: records.size No adapter call
Etlify::StaleRecords::BatchSync.call disabled CRMs silently skipped, enabled CRMs processed normally Stats reflect only enabled CRMs
  • Public API stays truthy when disabled, so existing callers branching on the return value (if record.hubspot_sync!) keep working unchanged.
  • No writes to crm_synchronisations: flipping enabled: back to true resumes normal sync on the next run — stale records are picked up automatically.
  • Each CRM has its own flag: you can disable HubSpot while leaving Airtable (or any other CRM) active.

Improvements

  • New public helper Etlify::CRM.enabled?(name) — returns the current enabled state for a registered CRM, or true for unknown CRMs as a safe default.

📖 See UPGRADE-GUIDE.md for detailed migration instructions.