Commit Graph

32 Commits

Author SHA1 Message Date
Philip Monk
8805e0ee85 clay: convert all blobs to pages
This converts the blob store from having deltas, directs, and
tombstones, to just having direct pages.  This simplifies a lot of code,
since we don't have to constantly ensure that deltas always have their
parent available.

This removes the hardcoded text diff logic from clay, which was
previously required for bootstrapping.

Over the wire, we handle both old and new requests and responses
transparently, so communication is normal in both directions across
ships which do or do not have this change.
2022-04-13 00:35:58 -07:00
Philip Monk
0c3eee07b5 Merge remote-tracking branch 'origin/master' into philip/tomb 2022-03-25 12:21:56 -07:00
Philip Monk
7b96cf7a82
kiln: don't revive apps at wrong kelvin 2021-11-10 22:17:05 -08:00
Liam Fitzgerald
2fa9c8e494 kiln: respect .liv flag in +get-apps-want
Accounts for the value of .liv in +get-apps-want, such that if a desk
is suspended then +get-apps-want should always return the empty list.
2021-11-08 16:43:48 -06:00
Philip Monk
d9276cd51c
clay: Add support for representing tombstones
This adds support for tombstoned files to clay.  It does not include any
way to actually tombstone them; that is left for later.

This allows tombstoning at the level of a file.  Precisely, this expands
+blob:clay by adding a %dead case:

    +$  blob                                              ::  fs blob
      $%  [%delta p=lobe q=[p=mark q=lobe] r=page]        ::  delta on q
          [%direct p=lobe q=page]                         ::  immediate
          [%dead p=lobe ~]                                ::  tombstone
      ==                                                  ::

Thus, we maintain the invariant that every lobe corresponds to a blob,
but now a blob may be an explicit tombstone.

Details:
- This has not been tested at all, except that it compiles and boots.
- This does not have a state adapter from master.  The only state change
  is the definition of +cach.
- Additionally, out-of-date ships may unexpectedly receive a %dead blob
  from a foreign clay which would interfere with their ability to download
  that desk.  No code changes necessary, but sponsors should avoid
  tombstoning files in %base for a while so their children can get the
  update.
- A merge will only fail if the tombstoned file conflicts with another
  change.  Note that as written, merging from a past desk *can* bring a
  tombstoned file to the head of a desk.  Possibly this shouldn't be
  allowed.

This also includes a couple refactors that were made possible by ford
fusion (since everything is synchronous now) but never got done.  In
both cases we get to remove a monad, which simplifies the code
considerably.

- refactor +merge's error handling to use !!/mule instead of threading
  through errors
- refactor all +read-* functions and related parts of +try-fill-sub to
  eagerly convert lobes to cages.

We also add support reading %a/b/c/e/f/r/x from past and foreign desks,
when possible.  Apologies that all of these are in one commit, it was
all a single chunk of work.

This is a draft until we have a way to tombstone.  I suspect we'll want
to have a mechanism of keeping track of gc roots and trace to remove,
but this PR doesn't suggest any particular strategy.
2021-11-07 22:17:02 -08:00
fang
a6bc01e791
hood: no longer work around bad clay %u behavior
Previously it would crash for non-existent desk. No longer does, so we
don't need to avoid this.
2021-10-07 21:58:56 +04:00
Edward Amsden
60e3ac274b
hood: scry for list of desks with empty desk name
Co-authored-by: fang <github@fang.io>
2021-10-01 08:31:18 -04:00
Edward Amsden
000cfff73e
hood: remove needless weld 2021-10-01 08:14:10 -04:00
Edward Amsden
5fdd7d74f7
hood: report %kids desk hash in +report-vats 2021-10-01 08:08:11 -04:00
Ted Blackman
dff3a4593c sur/hood: debug print 2021-09-29 14:59:13 -04:00
Liam Fitzgerald
31f5898087 kiln: track original publisher with desk.ship file 2021-09-29 13:27:28 +10:00
Edward Amsden
b8969ebd7b
hood: don't check kelvin of nonexistent desk in +report-vat 2021-09-28 20:17:28 -04:00
Ted Blackman
5511cc95b5 docket,kiln: snapshot on %watch 2021-09-28 15:33:16 -04:00
Ted Blackman
855e97d17a kiln: update other agents on kernel updates 2021-09-27 19:34:15 -04:00
Fang
18701b2ad2
kiln: always check local desk when adjusting dudes
We do not care about what's on foreign, the local desk is the thing
we're taking action on. This is more robust in the face of absent
information about foreign desks etc.

Also stops pretending to take-commet during take-merge-main. We'll get a
separate commit event.
2021-09-28 00:57:38 +04:00
Ted Blackman
7665e75849 manual merge @liam-fitzgerald misc. fixes PR 2021-09-27 14:50:58 -04:00
Ted Blackman
ede1976745 kiln: partial fixes for +take-download scry crash 2021-09-27 00:08:11 -04:00
Ted Blackman
84f306532c sur/hood: fix uninitialized foreign desk crash 2021-09-26 21:54:36 -04:00
Ted Blackman
2544b79e4b kiln,desks: remove %fish from /desk/bill; fix some other kiln issues 2021-09-26 17:03:26 -04:00
Ted Blackman
ef65c9c152 +agents generator 2021-09-25 16:15:55 -04:00
Ted Blackman
c80fb82318 clay,kiln,landscape/notify: migration runs 2021-09-23 18:07:13 -04:00
Liam Fitzgerald
f3befc8afc hood: fix pause poke 2021-09-22 13:20:05 +10:00
Fang
da28fbfed9
Merge dist into m/distpilled 2021-09-20 19:35:51 +02:00
Liam Fitzgerald
ce8f9d00fb hood: respect ordering of agents in bill 2021-09-17 15:43:30 +10:00
Ted Blackman
3b30b67a3e Merge branch 'ted/kiln-warp' into m/distpilled, and
modify Kiln to listen for %writ's from Clay to track commits to Clay
that were not generated by Kiln itself.
2021-09-16 12:25:02 -04:00
Ted Blackman
577ec24459 kiln: WIP listen to %warp's too 2021-09-15 22:57:08 +03:00
Liam Fitzgerald
038784b0fe kiln: surface paused in JSON 2021-09-14 10:49:34 +10:00
Liam Fitzgerald
e6e0f47435 kiln: kill agents before merge
If a remote commit is downloaded that simultaneously removes an agent from
desk.bill but also removes the associated source files, then the commit
will fail as gall will not have received the card to kill the agent yet.
Instead, we read our foreign copy of the bill in +take-download, and
kill any necessary agents there, preventing a reload of the deleted
agent from occurring.
2021-09-13 08:41:27 +10:00
Ted Blackman
f148f40a34 kiln: |install to a new upstream less destructively 2021-09-09 21:17:30 +03:00
Liam Fitzgerald
39a9ed4faa hood: fix update ordering
When we receive the %mere gift from clay, the kernel has not yet been
reloaded. This means any attempts to bump desks will fail, as they will
be bumped against the old kernel. Rectifies this by continuing the %base
desk update flow in +on-load, instead of +take-merge-main. Also adds a
wef=(unit weft) to the state in order to discriminate whether or not the
kernel has just been reloaded
2021-09-07 14:37:36 +10:00
Ted Blackman
248b968550 kiln: |pause and |resume an app 2021-09-06 17:27:17 +03:00
Ted Blackman
f3e15396f3 %garden-dev desk; also cleaned up %base-dev 2021-09-02 00:37:56 +03:00