Skip to main content

How Backoffice is versioned

New versions of a screen describes what you see. This page describes how the versions are made, for administrators and integrators who want to know what changes underneath when a banner appears, and what does not.

Two things carry a version: the Backoffice screens, and the GraphQL contracts the screens read and write through. They are versioned by different rules, and a new screen version never changes the contract the stable version uses.

Screens​

Backoffice is a single web application. Each screen is a route in it, and a route can exist in several versions at once. Versions are numbered major.minor: a minor step changes how the screen works, a major step changes what it is for. The stable version has no number; the trial versions carry theirs, so the account view today exists as the stable screen and as version 1.4.

A trial version is not a copy of the whole application. It contains only the parts of the screen that changed and reuses everything else from the stable version. That is why both versions always show the same data: they read it from the same place, through the same contract.

Which version a user gets is decided in three steps:

  1. Their own choice. The banner records "new" or "stable" per screen, in the browser. A recorded choice always wins.
  2. The environment default. Without a recorded choice, a user is on stable. Our internal test environment starts everyone on the newest version instead.
  3. The ceiling. Each environment names, per screen, the highest version it may serve. The ceiling is part of the application's own code: raising it is a reviewed change that ships like any other, not a switch flipped at runtime. A screen with no ceiling in an environment offers no trial there.

At most three versions of a screen exist at a time: the stable one everybody uses, the one before it, kept in case the stable one has to be rolled back, and the trial one. A rollback is the same kind of change as a promotion, in the other direction, and takes effect for everyone at once.

Promotion​

One date applies to every version under trial, not one per screen. Unless the team sets another, it is the end of the current two-week development cycle. On that date the reviewer promotes each trial version that has finished testing and holds back, by lowering its ceiling, any that has not. A promotion is a code change:

  • the screen's stable route now serves the promoted version, and the version's own address redirects to it, so saved links keep working;
  • the screen's ceiling is removed, so no version sits above stable until the next trial starts;
  • the previous stable version stays in the code, unreachable, as the rollback;
  • the version below that is retired and deleted.

Parts of Backoffice that are not screens, such as the notifications bell, are versioned the same way, with the same ceilings, but they switch without a banner because there is no screen to put it on.

GraphQL contracts​

Each Backoffice domain, such as accounts, notifications or content, exposes its own GraphQL schema. The schema is the contract between the screens and the service behind them.

A contract is never changed in place once it has shipped. It only grows:

  • A field or operation that has to change gets a successor beside it, named with a version suffix: getNotificationsV2 next to getNotifications, a NotificationRow type next to Notification. The old one keeps working for the screens that still use it.
  • The old one is marked deprecated in the schema, with the name of its replacement, so anyone reading the contract knows where to go.
  • A deprecated piece is removed only when nothing reads it any more. Before a removal ships, every repository is searched for consumers of the field or operation, and the removal waits until that search finds none. There is no fixed deprecation period: a piece nothing ever used can go at once, one still read by a shipped screen version waits until that version is retired.

Each schema is published as a package with its generated types, and the package follows semantic versioning: a minor bump for additions, a patch bump for fixes, a major bump for a change that breaks a consumer. Removing a piece the consumer search has shown to be unused breaks nobody, so it ships as a minor bump; a major bump is rare and is a signal that consumers must migrate before taking it. The Backoffice application pins the package versions it needs, so a screen version and the contract version it was built against move together.

The same rule covers the messages the services exchange behind the contract. A command or event that changes gets a v2 beside its v1, both are handled, and the old one is retired once nothing sends it.

What this means for integrators​

  • A trial screen version does not change the API. If you integrate through the public API, a banner in Backoffice does not concern you.
  • A deprecated field or operation in a schema is a notice, not a removal. It keeps working until a search across every consumer confirms nothing reads it.
  • Promotion and rollback of a screen version are code changes announced in the release notes. Promotions fall on the shared date, by default the end of a development cycle.