Commit Graph

500 Commits

Author SHA1 Message Date
Tony Garnock-Jones bae21fb69b Update deps; in particular, get preserves 3.0, which has the fixed numerics/symbols syntax 2023-01-16 15:03:35 +01:00
Tony Garnock-Jones 25ef92f78e Include syndicate package version in syndicate-server version display 2023-01-09 09:30:46 +01:00
Tony Garnock-Jones 2f6f1dde26 Release independent packages
syndicate@0.24.3

Generated by cargo-workspaces
2023-01-09 09:21:13 +01:00
Tony Garnock-Jones b5564979f0 Repair error in sync handling 2023-01-09 09:20:58 +01:00
Tony Garnock-Jones 5ca6bdb3bb Release independent packages
syndicate@0.24.2

Generated by cargo-workspaces
2023-01-08 13:19:21 +01:00
Tony Garnock-Jones 11b5a187b9 Fix tag format template 2023-01-08 13:19:06 +01:00
Tony Garnock-Jones 1cb89f0b6b Pick up preserves bugfix around schematized embedded-ref deserialization 2023-01-08 13:17:46 +01:00
Tony Garnock-Jones 90940b3c3d Bump preserves version 2022-10-26 16:03:30 +02:00
Tony Garnock-Jones eb2bd3cf8e Release independent packages
syndicate@0.24.1
syndicate-macros@0.19.1
syndicate-server@0.27.1
syndicate-tools@0.2.1

Generated by cargo-workspaces
2022-10-26 13:46:28 +02:00
Tony Garnock-Jones 451a298f94 Oops, want independent versioning 2022-10-26 13:45:48 +02:00
Tony Garnock-Jones 181523d05c Redo using clap derive instead of builder 2022-10-26 13:44:31 +02:00
Tony Garnock-Jones 4ce2093e52 Bump deps (specifically to get preserves hex bugfix) 2022-10-26 13:42:44 +02:00
Tony Garnock-Jones 2f3b186262 Switch to cargo-workspaces 2022-10-26 13:41:46 +02:00
Tony Garnock-Jones e21485c44d (cargo-release) version 0.2.0 2022-10-24 15:14:07 +02:00
Tony Garnock-Jones 86347412e7 (cargo-release) version 0.19.0 2022-10-24 15:14:07 +02:00
Tony Garnock-Jones 2d46d87f58 (cargo-release) version 0.27.0 2022-10-24 15:14:07 +02:00
Tony Garnock-Jones 54103f87eb (cargo-release) version 0.24.0 2022-10-24 15:14:06 +02:00
Tony Garnock-Jones 4a6bb3e143 Bump preserves-schema 2022-10-24 15:10:37 +02:00
Tony Garnock-Jones cdfe157fd9 Cargo update 2022-10-18 20:54:51 +02:00
Tony Garnock-Jones fbfafc1d1d (cargo-release) version 0.1.0 2022-10-18 14:14:30 +02:00
Tony Garnock-Jones e1eb7ae3dd Prepare for syndicate-tools v0.1.0 release 2022-10-18 14:14:10 +02:00
Tony Garnock-Jones f2be0d5e62 Cosmetic: remove unwanted comment 2022-10-18 14:06:07 +02:00
Tony Garnock-Jones fc930059d3 syndicate-macaroon 2022-10-18 14:05:12 +02:00
Tony Garnock-Jones bcaf08c602 (cargo-release) version 0.26.0 2022-07-22 18:14:08 +02:00
Tony Garnock-Jones 9293bd3904 (cargo-release) version 0.25.0 2022-07-22 18:13:24 +02:00
Tony Garnock-Jones bf1552d9a8 Use busybox as base rather than a completely empty image, for convenience 2022-05-25 11:02:33 +02:00
Tony Garnock-Jones a7ec157437 Update docker scripting 2022-05-24 17:00:02 +02:00
Tony Garnock-Jones ccfcf6ec26 Docker syndicate-server 2022-05-24 16:51:54 +02:00
Tony Garnock-Jones af679531b4 Bump deps for a ~1% speed boost from tracing 0.1.32 2022-03-09 19:20:39 +01:00
Tony Garnock-Jones ec8ba36d6a Add `stringify` quasi-function 2022-03-01 10:02:30 +01:00
Tony Garnock-Jones ec453b7db7 (cargo-release) version 0.24.0 2022-02-06 23:03:51 +01:00
Tony Garnock-Jones efb76bfe91 Add "never" restart policy 2022-02-06 23:03:21 +01:00
Tony Garnock-Jones fb31ea44cf fixtags.sh 2022-02-04 17:06:18 +01:00
Tony Garnock-Jones d75bfe4e35 (cargo-release) version 0.18.0 2022-02-04 17:00:18 +01:00
Tony Garnock-Jones 393514fb3a (cargo-release) version 0.23.0 2022-02-04 17:00:18 +01:00
Tony Garnock-Jones 406f22703b (cargo-release) version 0.23.0 2022-02-04 17:00:18 +01:00
Tony Garnock-Jones 4f0145e161 Sort directory entries in config scan 2022-02-04 16:59:29 +01:00
Tony Garnock-Jones b09fbdceec Remove hardcoded milestones and system-layer notions 2022-02-04 16:00:15 +01:00
Tony Garnock-Jones b556414fec Merge latest changes from the syndicate-protocols repository 2022-02-04 14:27:02 +01:00
Tony Garnock-Jones ca92d99c52 Remove notion of "system-layer-service" from core protocols 2022-02-04 14:26:50 +01:00
Tony Garnock-Jones 98c76df2f7 Repair accidentally-committed reference to local path (!) 2022-02-04 14:15:28 +01:00
Tony Garnock-Jones 0a0d977a48 Bump deps 2022-02-04 14:13:08 +01:00
Tony Garnock-Jones 8a0675d8ee (cargo-release) version 0.22.0 2022-02-04 14:02:10 +01:00
Tony Garnock-Jones af2578f887 (cargo-release) version 0.17.0 2022-02-04 14:02:10 +01:00
Tony Garnock-Jones 84ebf530d3 (cargo-release) version 0.22.0 2022-02-04 14:02:10 +01:00
Tony Garnock-Jones f88592282d MAJOR REFACTORING OF CORE ASSERTION-TRACKING STRUCTURES. Little impact on API. Read on for details.
2022-02-01 15:22:30 Two problems.

 - If a stop action panics (in `_terminate_facet`), the Facet is dropped before its outbound
   handles are removed. With the code as it stands, this leaks assertions (!!).

 - The logic for removing an outbound handle seems to be running in the wrong facet context???
   (See `f.outbound_handles.remove(&handle)` in the cleanup actions
    - I think I need to remove the for_myself mechanism
    - and add some callbacks to run only on successful commit

2022-02-02 12:12:33 This is hard.

Here's the current implementation:

 - assert
    - inserts into outbound_handles of active facet
    - adds cleanup action describing how to do the retraction
    - enqueues the assert action, which
       - calls e.assert()

 - retract
    - looks up & removes the cleanup action, which
       - enqueues the retract action, which
          - removes from outbound_handles of the WRONG facet in the WRONG actor
          - calls e.retract()

 - _terminate_facet
    - uses outbound_handles to retract the facet's assertions
    - doesn't directly touch cleanup actions, relying on retract to do that
    - if one of a facet's stop actions panics, will drop the facet, leaking its assertions
    - actually, even if a stop action yields `Err`, it will drop the facet and leak assertions
    - yikes

 - facet drop
    - panics if outbound_handles is nonempty

 - actor cleanup
    - relies on facet tree to find assertions to retract

Revised plan:

 - ✓ revise Activation/PendingEvents structures
    - rename `cleanup_actions` to `outbound_assertions`
    - remove `for_myself` queues and `final_actions`
    - add `pre_commit_actions`, `rollback_actions` and `commit_actions`

 - ✓ assert
    - as before
    - but on rollback, removes from `outbound_handles` (if the facet still exists) and
      `outbound_assertions` (always)
    - marks the new assertion as "established" on commit

 - ✓ retract
    - lookup in `outbound_assertions` by handle, using presence as indication it hasn't been
      scheduled in this turn
    - on rollback, put it back in `outbound_assertions` ONLY IF IT IS MARKED ESTABLISHED -
      otherwise it is a retraction of an `assert` that has *also* been rolled back in this turn
    - on commit, remove it from `outbound_handles`
    - enqueue the retract action, which just calls e.retract()

 - ✓ _terminate_facet
    - revised quite a bit now we rely on `RunningActor::cleanup` to use `outbound_assertions`
      rather than the facet tree.
    - still drops Facets on panic, but this is now mostly harmless (reorders retractions a bit)
    - handles `Err` from a stop action more gracefully
    - slightly cleverer tracking of what needs doing based on a `TerminationDirection`
    - now ONLY applies to ORDERLY cleanup of the facet tree. Disorderly cleanup ignores the
      facet tree and just retracts the assertions willy-nilly.

 - ✓ facet drop
    - warn if outbound_handles is nonempty, but don't do anything about it

 - ✓ actor cleanup
    - doesn't use the facet tree at all.
    - cleanly shutting down is done elsewhere
    - uses the remaining entries in `outbound_assertions` (previously `cleanup_actions`) to
      deal with retractions for dropped facets as well as any other facets that haven't been
      cleanly shut down

 - ✓ activate
    - now has a panic_guard::PanicGuard RAII for conveying a crash to an actor in case the
      activation is happening from a linked task or another thread (this wasn't the case in the
      examples that provoked this work, though)
    - simplified
    - explicit commit/rollback decision

 - ✓ Actor::run
    - no longer uses the same path for crash-termination and success-termination
    - instead, for success-termination, takes a turn that calls Activation::stop_root
       - this cleans up the facet tree using _terminate_facet
       - when the turn ends, it notices that the root facet is gone and shuts down the actor
       - so in principle there will be nothing for actor cleanup to do

2022-02-04 13:52:34 This took days. :-(
2022-02-04 13:59:37 +01:00
Tony Garnock-Jones 98731ba968 Merge latest changes from the syndicate-protocols repository 2022-02-03 22:57:58 +01:00
Tony Garnock-Jones d820601eea Better trace messages from dependency tracking 2022-02-03 22:57:21 +01:00
Tony Garnock-Jones 28b0c5b4d5 One-shot daemons shouldn't be considered ready at all, just complete 2022-02-03 22:56:20 +01:00
Tony Garnock-Jones 19c96bdef2 Allow userDefined states 2022-02-03 22:55:06 +01:00