इसे छोड़कर कंटेंट पर जाएं

Versions per client

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

You run one template for many clients, and each client stays on the version you pinned. A new version moves a client only after that client’s own check.

A client’s version is its pin: the line in shops/<shop>/pathway.lock, for example bookings@0.1.0. The runtime refuses to start if the pin is not the version it is. status and the panel show the version that runs.

Terminal window
node bundle/geometer.ts update --dry-run
node bundle/geometer.ts update
node bundle/geometer.ts update --to 0.2.0 --shops glow-salon,pet-spa
  • --dry-run runs the checks, says what would happen, and changes nothing.
  • Without --to, the version is the one in your checkout.
  • --shops limits the update to the shops you name, in that order.

For each client, in order:

  1. The hand check runs on that client’s own settings at the version it runs now, and again at the new version. Each says “Held N of M”.
  2. A client that holds everything that held before moves. Its pin changes and the same checked deploy as deploy runs, so only what changed restarts.
  3. A client with any situation that held before and now fails, or is no longer run, is held back. Nothing about it is touched, and it keeps running its version. A situation that failed on both versions does not hold it back.
Update, each client checked on its own settings first:
✗ yoga-studio HELD BACK. Held 33 of 34 at bookings@0.2.0; 34 of 34 held at bookings@0.1.0. Now failing: Deposit link paid twice. It stays on bookings@0.1.0.
✓ glow-salon moved from bookings@0.1.0 to bookings@0.2.0. Held 34 of 34 on its own settings (34 of 34 before). 12 of 12 limits proven to bite.
= pet-spa unchanged. Already on bookings@0.2.0.
Moved 1, held back 1, unchanged 1, skipped 0.

The exit code is 0 when every client is moved, unchanged or skipped, and 1 when any is held back or the run did not finish. Fix what failed, or the client’s settings, and run update again. It checks held-back clients again.

A version other than the one in your checkout needs a checkout of its tag beside the server, at ~/geometer-server/templates/commerce/bookings@0.2.0/, with ~/geometer-server/modules/ beside templates/. A client whose new version is not there is held back and told where to put it.

A client that runs a version newer than your checkout is left as it is. Name the version with --to to move it to an older one. That is a move like any other: checked, and refused if the older version cannot read the saved data the newer one wrote.

Each step is written down before the pin is touched. Run the same command again. Clients that are done are not checked or deployed twice, and the one that was half-way is finished. A deploy that is refused puts that client’s earlier pin back and stops the rollout there, so at most one client is affected.

A move restarts that client’s runtime, like any deploy. The runtime saves each event before it answers, so a booking in the middle picks up where it was. Geometer’s tests stop a runtime between a payment link and its payment and finish the booking after the restart. An update with a live booking in the middle has not been run.

Terminal window
node bundle/geometer.ts rollback
node bundle/geometer.ts rollback --shops glow-salon

Rollback is the same move the other way, through the same checks. It takes the pin from the history, so rolling back twice goes back twice. With no name, it takes the clients the last update moved.

Rollback is refused, before anything is touched, if the new version changed how data is saved, because an older runtime cannot read data from a newer layout. The update tells you in a note when that is so. The way out is a newer version that fixes the problem, or restore of the record from before the update, which loses what came in since.

An agent you wrote has no template version and no hand check. Its version is whatever you say it is: a git commit or an image tag, set with agent set --version. For it, update runs the crash test at the version last recorded as in service, and again at the new version.

  • One that holds everything it held before is moved: recorded at the new version, with a new go-live certificate.
  • One that now fails a situation is held back, with the situation named. The old version stays the one in service.
  • Geometer does not run your agent, so nothing is deployed. “Held back” means: keep running the old version.
  • An agent with no run command or no version is skipped, and the note says what to set. rollback has nothing to undo for an agent.