Skip to content

v0.4.0 — the October money-path fixes; two or more replicas supported

Choose a tag to compare

@sagarsuperuser sagarsuperuser released this 12 Oct 10:59
· 367 commits to main since this release
8409735

The first release since August. It carries every money-path fix from September and October, and makes running two or more replicas the supported production setup.

Before you upgrade from v0.3.2 or earlier

  • Do this one rollout as stop-all-then-start, not rolling. An old binary and a new one would each run the background jobs for the length of a rolling deploy. Steps: Upgrading.
  • Production now refuses to start without REDIS_URL and TRUST_PROXY. Set both before you deploy. See Self-host.
  • Run migrations first, as for any upgrade.
  • Dashboards keyed on the HTTP metrics' path label now see route patterns such as /v1/customers/{id} instead of raw paths.
  • Set SMTP_FROM to an address on your own domain if you send email. The built-in default changed to billing@velox.local, a placeholder.

What changed

Invoices and credits

  • A billing tick bills every subscription that is due, not only the first 50.
  • A usage threshold no longer restarts graduated or package tiers for the rest of the period.
  • A credit note issued after customer credits were applied no longer relieves an invoice twice.
  • A cancel, downgrade or plan change records the customer's refund for the unused period in the same step, so it cannot be lost.
  • Credit-note numbers have no gaps.
  • "Due on receipt" (Net 0) applies to every invoice.
  • Voiding an invoice reverses all of its tax.

Payments and collection

  • A customer paying on the hosted invoice page and a Velox charge can no longer both take money for one invoice.
  • A charge's late result can no longer undo a payment or a decline recorded while it was in flight.
  • An invoice finalized just before a crash is collected on the next tick.
  • Dunning retries keep their spacing, and an interrupted final attempt is finished.
  • A card used on the hosted invoice page is saved to the customer.

Failing safely

  • Billing, tax, payments, plan changes and credit notes stop on a failed read instead of carrying on with a guessed value.

Running it

  • Two or more replicas behind a load balancer is the supported production setup. Background jobs run on leader leases, and a dead replica is replaced within seconds.
  • PgBouncer in transaction mode and RDS Proxy are supported.
  • Shutdown announces itself before it stops listening and fits a 90-second budget.
  • Go 1.26.9.

Dashboard

  • Sign-in over plain HTTP at an address other than localhost now says why it fails: it needs HTTPS or http://localhost.
  • "Report an issue" and the sign-in help link open GitHub Issues.

Housekeeping

  • v0.1.0 and v0.2.0 are retracted. They ship two commands that were later deleted and predate this release's billing fixes.
  • Nothing in Velox points at velox.dev any more. The project does not own that domain.

Docs

  • The self-host page and the install guide are rewritten in plain words.
  • A one-screen README, a one-page list of engineering principles, and a sourced comparison with Lago, OpenMeter, Flexprice and Kill Bill.

Every change, with its reasoning: CHANGELOG.