Skip to content

One registry, many clients

Three clients create workers from the registry: the TUI, the web app and the ScriptRunner (a deployed script's vf.workers.create). Before this repo existed, the registry lived in the platform workers repo and a workflow there pushed copies into the TUI and the web app, releasing both on every change. A copy goes stale the moment someone skips the sync, and no client said which registry it ran.

Now the registry is a release of its own, and every client takes it from a package:

flowchart LR
  R["worker-registry<br/>workers.toml"] -->|pypi.yaml| P["virtufin-worker-registry"]
  R -->|npm.yaml| N["@virtufin/worker-registry"]
  P --> T["TUI<br/>(user's workers.toml merged over it)"]
  P --> S["ScriptRunner"]
  N --> A["web app<br/>(browser bundle and server)"]
  • The TUI depends on virtufin-worker-registry without an upper bound: upgrading the TUI's environment brings the newest registry. It merges the user's own workers.toml over it and shows the registry version on its home page.
  • The web app depends on @virtufin/worker-registry; its build bundles the registry for the browser and into the server, which creates script workers from the same entries. Renovate raises the dependency and releases the app. The footer and the registry view show the version.
  • The ScriptRunner depends on virtufin-worker-registry without an upper bound; a release reloads it, so a deployed script sees the newest registry.

The registry version answers "which workers and versions does this client offer?" in one number, the same in every client.