kiln: first stab at ota inside +vats

This commit is contained in:
Ted Blackman 2021-07-09 01:08:33 -04:00
parent db49cbee92
commit ad15da2e7b

View File

@ -219,6 +219,7 @@
:: ::
++ reset ++ reset
^+ vats ^+ vats
~> %slog.0^leaf/"kiln: resetting tracking for {here}"
=. ark (~(del by ark) loc) =. ark (~(del by ark) loc)
(install loc [ship desk]:rak) (install loc [ship desk]:rak)
:: +bump: handle kernel kelvin upgrade :: +bump: handle kernel kelvin upgrade
@ -234,6 +235,7 @@
~> %slog.0^leaf/"kiln: desks blocked upgrade {<ded>}" ~> %slog.0^leaf/"kiln: desks blocked upgrade {<ded>}"
!! !!
=/ liv (skip ~(tap by ark) |=([d=desk *] (~(has in except) d))) =/ liv (skip ~(tap by ark) |=([d=desk *] (~(has in except) d)))
~> %slog.0^leaf/"kiln: bump {<liv>}"
=< kiln =< kiln
|- ^+ vats |- ^+ vats
?~ liv vats ?~ liv vats
@ -277,14 +279,36 @@
reset reset
~> %slog.0^leaf/"kiln: finished downloading update for {here}" ~> %slog.0^leaf/"kiln: finished downloading update for {here}"
=. aeon.rak +(aeon.rak) =. aeon.rak +(aeon.rak)
::
?. =(%base loc)
=/ kel (get-kelvin (get-ankh u.p.syn)) =/ kel (get-kelvin (get-ankh u.p.syn))
?. =(kel [%zuse zuse]) ?. =(kel [%zuse zuse])
~> %slog.0^leaf/"kiln: future version {<kel>}, enqueueing" ~> %slog.0^leaf/"kiln: future version {<kel>}, enqueueing"
=. next.rak :_(next.rak [(dec aeon.rak) kel]) =. next.rak (snoc next.rak [(dec aeon.rak) kel])
(emit sync:pass) (emit sync:pass)
~> %slog.0^leaf/"kiln: merging into {here}" ~> %slog.0^leaf/"kiln: merging into {here}"
(emil ~[merge sync]:pass) (emil ~[merge sync]:pass)
:: ::
=/ old-ankh ank:.^(dome cv+/(scot %p our)/base/(scot %da now))
=/ old-weft (get-kelvin old-ankh)
::
=/ new-ankh (get-ankh u.p.syn)
=/ new-weft (get-kelvin new-ankh)
::
=/ blockers
?: =(new-weft old-weft)
~
(get-blockers new-weft)
::
?. =(~ blockers)
~> %slog.0^leaf/"kiln: OTA blocked on {<blockers>}"
=- (emil sync:pass - ~)
:* %give %fact [/vats]~ %kiln-vats-diff
!>([%blocked arak=rak weft=new-weft blockers=blockers])
==
~> %slog.0^leaf/"kiln: applying OTA to {here}"
(emil ~[merge sync]:pass)
::
++ take-merge ++ take-merge
|= syn=sign-arvo |= syn=sign-arvo
?> ?=(%mere +<.syn) ?> ?=(%mere +<.syn)
@ -296,11 +320,15 @@
=+ "kiln: merge into {here} failed, waiting for next revision" =+ "kiln: merge into {here} failed, waiting for next revision"
%- (slog leaf/- p.p.syn) %- (slog leaf/- p.p.syn)
vats vats
=. vats
~> %slog.0^leaf/"merge into {here} succeeded; reviving agents" ~> %slog.0^leaf/"merge into {here} succeeded; reviving agents"
%- emil %- emil
%+ turn (get-apps loc) %+ turn (get-apps loc)
|= =dude:gall |= =dude:gall
[%pass /kiln/fade/[dude] %arvo %g %fade dude %jolt] [%pass /kiln/fade/[dude] %arvo %g %fade dude %jolt]
?. =(%base loc)
vats
vats(kiln (bump (sy %base ~)))
-- --
:: +get-ankh: extract $ankh from clay %v response $rant :: +get-ankh: extract $ankh from clay %v response $rant
:: ::