Skip to content

Skip waits as weft's own concept, let the install register built versions, and let a waiting run leave the database asleep - #59

Merged
qfeuilla merged 2 commits into
mainfrom
deploy
Oct 11, 2026
Merged

qfeuilla merged 2 commits into
mainfrom
deploy

Conversation

@qfeuilla

Copy link
Copy Markdown
Contributor

Two rounds of work, both reviewed and tested before this PR.

What a person updating will notice (see CHANGELOG.md, 2026-10-11 (0.2.267)):

  • Skipping a waiting question ends that step skipped, its outputs closed; skipping a trigger is refused.
  • The five instance lifecycle nodes lost "Instance" from their names and take an optional instance; inputs can be requiredWhenWired.
  • A Google connection can hold Gmail or Calendar alone; GmailSend can send from a "Send mail as" address.
  • Builds answer at once and the install registers the version itself when its images are built; the CLI follows it.
  • On Google Cloud, an idle worker stops ticking, and a run waiting on a person leaves the database asleep: answers and cancels travel a news topic (Pub/Sub) to the broker and down the worker's line. A worker whose runs all wait stops itself before the one-hour line limit.
  • A program built before this version needs one rebuild (weft resync or weft build).

Checked locally before pushing: everything ci.yml and docs.yml run (nextest, doc tests, clippy, the parse-only build, examples, Terraform validate, every db suite, the JS packages and extensions, the WhatsApp bridge tests, the docs book), plus the end-to-end tests covering questions, skips, cancels, parked routes, job waits, builds and route limits. The Pub/Sub path and the self-stop are covered by tests against stand-ins only; a cloud round confirms them for real.

… own copies, have the install register a built version itself, and let an idle worker go quiet

- Skipping a question ends the waiting step skipped (outputs closed, normal propagation); frozen examples record how every wait ended; a skip on a trigger is refused.
- StopTagged queues its stop with the plain enqueue again.
- StartInfra, StopInfra, TerminateInfra, ActivateTriggers and DeactivateTriggers take an optional instance; inputs can be requiredWhenWired.
- Google connections always ask who the account is, so a Gmail-only connection works; GmailSend gains a `from` input.
- A build answers at once; the install registers the version itself when its image builds end, in ask order per project; the CLI follows it and tells an unreachable cloud install apart.
- An idle worker stops ticking the broker and wakes on work without making a run wait; a metered answer silent for a minute, or on a cancelled run, is cut and its cost booked.
- The editor names the triggers that are off; CHANGELOG and the releasing skill keep the changelog per release.
- An answer or a cancel for a running run is written with a news entry in the same transaction; a separate teller publishes it on the install's news bus (Pub/Sub on GCP, nothing locally, where the database's own signal covers it) and retries until it goes out.
- Broker processes hear the news and pass it to the worker down the line it already holds, answers the same way as cancels; the held answers request and its periodic re-reads are gone.
- While every run on a worker only waits, the worker stops ticking and vouches for its runs until the first wait would give up; the reaper sleeps until the earliest lease could lapse.
- A worker whose runs all only wait stops itself before the broker's request limit cuts its line, handing back what can pause and ending what cannot with the limit named; a busy worker reconnects as before.
- The dispatcher and the broker no longer hold their database listening busy while a request is held, so a quiet watch lets the database sleep.
- CHANGELOG names this release.
Comment thread crates/weft-access-store/tests/store_flows.rs Dismissed
@qfeuilla
qfeuilla merged commit 446d9fa into main Oct 11, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants