mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-26 08:25:04 +03:00
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.
This commit is contained in:
commit
3b30b67a3e
@ -2,8 +2,8 @@
|
|||||||
/+ drum=hood-drum, helm=hood-helm, kiln=hood-kiln
|
/+ drum=hood-drum, helm=hood-helm, kiln=hood-kiln
|
||||||
|%
|
|%
|
||||||
+$ state
|
+$ state
|
||||||
$~ [%19 *state:drum *state:helm *state:kiln]
|
$~ [%20 *state:drum *state:helm *state:kiln]
|
||||||
$>(%19 any-state)
|
$>(%20 any-state)
|
||||||
::
|
::
|
||||||
+$ any-state
|
+$ any-state
|
||||||
$% [ver=?(%1 %2 %3 %4 %5 %6) lac=(map @tas fin-any-state)]
|
$% [ver=?(%1 %2 %3 %4 %5 %6) lac=(map @tas fin-any-state)]
|
||||||
@ -20,6 +20,7 @@
|
|||||||
[%17 drum=state-4:drum helm=state:helm kiln=state-4:kiln]
|
[%17 drum=state-4:drum helm=state:helm kiln=state-4:kiln]
|
||||||
[%18 drum=state-4:drum helm=state:helm kiln=state-5:kiln]
|
[%18 drum=state-4:drum helm=state:helm kiln=state-5:kiln]
|
||||||
[%19 drum=state-4:drum helm=state:helm kiln=state-6:kiln]
|
[%19 drum=state-4:drum helm=state:helm kiln=state-6:kiln]
|
||||||
|
[%20 drum=state-4:drum helm=state:helm kiln=state-7:kiln]
|
||||||
==
|
==
|
||||||
+$ any-state-tuple
|
+$ any-state-tuple
|
||||||
$: drum=any-state:drum
|
$: drum=any-state:drum
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
=, format
|
=, format
|
||||||
=* dude dude:gall
|
=* dude dude:gall
|
||||||
|%
|
|%
|
||||||
+$ state state-6
|
+$ state state-7
|
||||||
|
+$ state-7 [%7 pith-7]
|
||||||
+$ state-6 [%6 pith-6]
|
+$ state-6 [%6 pith-6]
|
||||||
+$ state-5 [%5 pith-5]
|
+$ state-5 [%5 pith-5]
|
||||||
+$ state-4 [%4 pith-4]
|
+$ state-4 [%4 pith-4]
|
||||||
@ -15,7 +16,8 @@
|
|||||||
+$ state-0 [%0 pith-0]
|
+$ state-0 [%0 pith-0]
|
||||||
+$ any-state
|
+$ any-state
|
||||||
$~ *state
|
$~ *state
|
||||||
$% state-6
|
$% state-7
|
||||||
|
state-6
|
||||||
state-5
|
state-5
|
||||||
state-4
|
state-4
|
||||||
state-3
|
state-3
|
||||||
@ -24,7 +26,7 @@
|
|||||||
state-0
|
state-0
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ pith-6
|
+$ pith-7
|
||||||
$: wef=(unit weft)
|
$: wef=(unit weft)
|
||||||
rem=(map desk per-desk) ::
|
rem=(map desk per-desk) ::
|
||||||
syn=(map kiln-sync let=@ud) ::
|
syn=(map kiln-sync let=@ud) ::
|
||||||
@ -40,10 +42,29 @@
|
|||||||
hxs=(map desk @ud)
|
hxs=(map desk @ud)
|
||||||
== ::
|
== ::
|
||||||
::
|
::
|
||||||
|
+$ pith-6
|
||||||
|
$: wef=(unit weft)
|
||||||
|
rem=(map desk per-desk) ::
|
||||||
|
syn=(map kiln-sync let=@ud) ::
|
||||||
|
ark=(map desk arak-6) ::
|
||||||
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
||||||
|
:: map desk to the currently ongoing fuse request
|
||||||
|
:: and the latest version numbers for beaks to
|
||||||
|
fus=(map desk per-fuse)
|
||||||
|
:: used for fuses - every time we get a fuse we
|
||||||
|
:: bump this. used when calculating hashes to
|
||||||
|
:: ensure they're unique even when the same
|
||||||
|
:: request is made multiple times.
|
||||||
|
hxs=(map desk @ud)
|
||||||
|
== ::
|
||||||
|
::
|
||||||
|
+$ arak-6 [rail=rail-6 next=(list rung) =rein]
|
||||||
|
+$ rail-6 [paused=? =ship =desk =aeon]
|
||||||
|
::
|
||||||
+$ pith-5
|
+$ pith-5
|
||||||
$: rem=(map desk per-desk) ::
|
$: rem=(map desk per-desk) ::
|
||||||
syn=(map kiln-sync let=@ud) ::
|
syn=(map kiln-sync let=@ud) ::
|
||||||
ark=(map desk arak) ::
|
ark=(map desk arak-6) ::
|
||||||
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
||||||
:: map desk to the currently ongoing fuse request
|
:: map desk to the currently ongoing fuse request
|
||||||
:: and the latest version numbers for beaks to
|
:: and the latest version numbers for beaks to
|
||||||
@ -232,7 +253,7 @@
|
|||||||
|-
|
|-
|
||||||
?~ dez ..on-init
|
?~ dez ..on-init
|
||||||
=. ..on-init
|
=. ..on-init
|
||||||
abet:(install:vats i.dez our i.dez)
|
abet:(install-local:vats i.dez)
|
||||||
=? ..on-init !=(sop our)
|
=? ..on-init !=(sop our)
|
||||||
abet:(install:vats i.dez sop i.dez)
|
abet:(install:vats i.dez sop i.dez)
|
||||||
$(dez t.dez)
|
$(dez t.dez)
|
||||||
@ -289,12 +310,23 @@
|
|||||||
=- +.old(ark -)
|
=- +.old(ark -)
|
||||||
%- ~(run by ark.old)
|
%- ~(run by ark.old)
|
||||||
|= a=arak-4
|
|= a=arak-4
|
||||||
^- arak
|
^- arak-6
|
||||||
[[paused=| ship desk aeon] next rein]:a
|
[[paused=| ship desk aeon] next rein]:a
|
||||||
|
::
|
||||||
=? old ?=(%5 -.old)
|
=? old ?=(%5 -.old)
|
||||||
[%6 ~ +.old]
|
[%6 ~ +.old]
|
||||||
::
|
::
|
||||||
?> ?=(%6 -.old)
|
=? old ?=(%6 -.old)
|
||||||
|
:- %7
|
||||||
|
=- +.old(ark -)
|
||||||
|
%- ~(run by ark.old)
|
||||||
|
|= a=arak-6
|
||||||
|
^- arak
|
||||||
|
:_ rein.a
|
||||||
|
^- (unit rail)
|
||||||
|
`[paused.rail ship.rail desk.rail aeon.rail next]:a
|
||||||
|
::
|
||||||
|
?> ?=(%7 -.old)
|
||||||
=. +<+.$.abet old
|
=. +<+.$.abet old
|
||||||
=< abet
|
=< abet
|
||||||
=? kiln ?=(^ old-ota)
|
=? kiln ?=(^ old-ota)
|
||||||
@ -343,6 +375,7 @@
|
|||||||
::
|
::
|
||||||
++ vats
|
++ vats
|
||||||
|_ [loc=desk rak=arak]
|
|_ [loc=desk rak=arak]
|
||||||
|
++ ral (need rail.rak)
|
||||||
++ vats .
|
++ vats .
|
||||||
++ abet kiln(ark (~(put by ark) loc rak))
|
++ abet kiln(ark (~(put by ark) loc rak))
|
||||||
++ abed
|
++ abed
|
||||||
@ -350,7 +383,7 @@
|
|||||||
~_ leaf/"kiln: {<lac>} not installed"
|
~_ leaf/"kiln: {<lac>} not installed"
|
||||||
vats(loc lac, rak (~(got by ark) lac))
|
vats(loc lac, rak (~(got by ark) lac))
|
||||||
::
|
::
|
||||||
++ here "{<loc>} from {<[ship desk]:rail.rak>}"
|
++ here "{<loc>} from {<[ship desk]:ral>}"
|
||||||
++ make-wire |=(step=@tas /kiln/vats/[loc]/[step])
|
++ make-wire |=(step=@tas /kiln/vats/[loc]/[step])
|
||||||
++ from-wire
|
++ from-wire
|
||||||
|= =wire
|
|= =wire
|
||||||
@ -370,21 +403,23 @@
|
|||||||
++ pyre |=(=tang [%pass /kiln/vats %pyre tang])
|
++ pyre |=(=tang [%pass /kiln/vats %pyre tang])
|
||||||
++ find (warp %find [%sing %y ud+1 /])
|
++ find (warp %find [%sing %y ud+1 /])
|
||||||
++ sync-da (warp %sync [%sing %w da+now /])
|
++ sync-da (warp %sync [%sing %w da+now /])
|
||||||
++ sync-ud (warp %sync [%sing %w ud+aeon.rail.rak /])
|
++ sync-ud (warp %sync [%sing %w ud+aeon:ral /])
|
||||||
++ download (warp %download [%sing %v ud+aeon.rail.rak /])
|
++ download (warp %download [%sing %v ud+aeon:ral /])
|
||||||
++ warp
|
++ warp
|
||||||
|= [s=term r=rave]
|
|= [s=term r=rave]
|
||||||
(clay-card s %warp ship.rail.rak desk.rail.rak `r)
|
(clay-card s %warp ship:ral desk:ral `r)
|
||||||
++ merge-main
|
++ merge-main
|
||||||
=/ germ (get-germ loc)
|
=/ germ (get-germ loc)
|
||||||
=/ =aeon (dec aeon.rail.rak)
|
=/ =aeon (dec aeon:ral)
|
||||||
%+ clay-card %merge-main
|
%+ clay-card %merge-main
|
||||||
[%merg loc ship.rail.rak desk.rail.rak ud+aeon germ]
|
[%merg loc ship:ral desk:ral ud+aeon germ]
|
||||||
++ merge-kids
|
++ merge-kids
|
||||||
=/ germ (get-germ %kids)
|
=/ germ (get-germ %kids)
|
||||||
=/ =aeon (dec aeon.rail.rak)
|
=/ =aeon (dec aeon:ral)
|
||||||
%+ clay-card %merge-kids
|
%+ clay-card %merge-kids
|
||||||
[%merg %kids ship.rail.rak desk.rail.rak ud+aeon germ]
|
[%merg %kids ship:ral desk:ral ud+aeon germ]
|
||||||
|
++ listen
|
||||||
|
(clay-card %listen %warp our loc `[%next %z da+now /])
|
||||||
++ clay-card
|
++ clay-card
|
||||||
|= [step=@tas =task:clay]
|
|= [step=@tas =task:clay]
|
||||||
^- card:agent:gall
|
^- card:agent:gall
|
||||||
@ -430,49 +465,66 @@
|
|||||||
++ install
|
++ install
|
||||||
|= [lac=desk her=ship rem=desk]
|
|= [lac=desk her=ship rem=desk]
|
||||||
^+ vats
|
^+ vats
|
||||||
|
?: =([her rem] [our lac])
|
||||||
|
(install-local lac)
|
||||||
=/ got (~(get by ark) lac)
|
=/ got (~(get by ark) lac)
|
||||||
?: =(`[her rem] got)
|
?: =(`[her rem] got)
|
||||||
~> %slog.0^leaf/"kiln: already tracking {here:(abed lac)}, ignoring"
|
~> %slog.0^leaf/"kiln: already tracking {here:(abed lac)}, ignoring"
|
||||||
vats
|
vats
|
||||||
=: loc lac
|
=: loc lac
|
||||||
rak [[paused=| her rem *aeon] next=~ rein:(fall got *arak)]
|
rak [`[paused=| her rem *aeon next=~] rein:(fall got *arak)]
|
||||||
==
|
|
||||||
?. ?& =(our her)
|
|
||||||
::
|
|
||||||
=- (~(has in -) rem)
|
|
||||||
.^((set desk) %cd /(scot %p our)//(scot %da now))
|
|
||||||
==
|
==
|
||||||
~> %slog.0^leaf/"kiln: beginning install into {here}"
|
~> %slog.0^leaf/"kiln: beginning install into {here}"
|
||||||
(emit find:pass)
|
(emil find:pass listen:pass ~)
|
||||||
~> %slog.0^leaf/"kiln: beginning local install into {here}"
|
:: +install-local: install from a local desk, with no remote
|
||||||
%- take-find
|
::
|
||||||
:+ %clay %writ
|
++ install-local
|
||||||
:- ~
|
|= lac=desk
|
||||||
:+ [%y ud+1 rem] /
|
^+ vats
|
||||||
:- %arch
|
?: (~(has by ark) loc)
|
||||||
!> .^(arch %cy /(scot %p our)/[rem]/1)
|
~> %slog.0^leaf/"kiln: already tracking {here:(abed lac)}, ignoring"
|
||||||
|
vats
|
||||||
|
=: loc lac
|
||||||
|
rak [~ *rein]
|
||||||
|
==
|
||||||
|
~> %slog.0^leaf/"kiln: local install {here}"
|
||||||
|
=. vats (update-running-apps (get-apps-diff our loc now rein.rak))
|
||||||
|
=. vats (emit listen:pass)
|
||||||
|
vats
|
||||||
:: +reset: resync after failure
|
:: +reset: resync after failure
|
||||||
::
|
::
|
||||||
|
:: TODO: instead of jumping all the way back to find:pass,
|
||||||
|
:: which will end up skipping all the way until the latest
|
||||||
|
:: remote commit, increment the aeon so we skip only the problematic
|
||||||
|
:: commit and try the commit immediately after it.
|
||||||
|
::
|
||||||
++ reset
|
++ reset
|
||||||
^+ vats
|
^+ vats
|
||||||
~> %slog.0^leaf/"kiln: resetting tracking for {here}"
|
~> %slog.0^leaf/"kiln: resetting tracking for {here}"
|
||||||
=/ cad (diff:give %reset loc rak)
|
=/ cad (diff:give %reset loc rak)
|
||||||
=. aeon.rail.rak 0
|
=/ rel ral
|
||||||
=. next.rak ~
|
=. rail.rak `rel(aeon 0, next ~)
|
||||||
(emil find:pass cad ~)
|
(emil find:pass cad ~)
|
||||||
:: +pause: stop syncing from upstream
|
:: +pause: stop syncing from upstream
|
||||||
::
|
::
|
||||||
++ pause
|
++ pause
|
||||||
|= lac=desk
|
|= lac=desk
|
||||||
^+ vats
|
^+ vats
|
||||||
|
?. is-tracking
|
||||||
|
~> %slog.0^leaf/"kiln: {<lac>} already paused, ignoring"
|
||||||
|
vats
|
||||||
=. vats (abed lac)
|
=. vats (abed lac)
|
||||||
~> %slog. :+ %0 %leaf
|
~> %slog.0^leaf/"kiln: {<lac>} pausing updates"
|
||||||
?: paused.rail.rak
|
=/ rel ral
|
||||||
"kiln: {<lac>} already paused, ignoring"
|
=. rail.rak `rel(paused &, aeon 0)
|
||||||
"kiln: {<lac>} pausing updates"
|
vats
|
||||||
=: paused.rail.rak &
|
:: +remove-upstream: stop listening to an upstream for changes
|
||||||
aeon.rail.rak 0
|
::
|
||||||
==
|
++ remove-upstream
|
||||||
|
|= lac=desk
|
||||||
|
^+ vats
|
||||||
|
=. vats (abed lac)
|
||||||
|
=. rail.rak ~
|
||||||
vats
|
vats
|
||||||
:: +resume: restart tracking from upstream
|
:: +resume: restart tracking from upstream
|
||||||
::
|
::
|
||||||
@ -483,7 +535,7 @@
|
|||||||
^+ vats
|
^+ vats
|
||||||
=. vats (abed lac)
|
=. vats (abed lac)
|
||||||
~> %slog. :+ %0 %leaf
|
~> %slog. :+ %0 %leaf
|
||||||
?. paused.rail.rak
|
?. paused:ral
|
||||||
"kiln: {<lac>} already tracking, ignoring"
|
"kiln: {<lac>} already tracking, ignoring"
|
||||||
"kiln: {<lac>} resuming updates"
|
"kiln: {<lac>} resuming updates"
|
||||||
reset
|
reset
|
||||||
@ -584,7 +636,7 @@
|
|||||||
?: =([~ kel] (read-kelvin-local our desk now))
|
?: =([~ kel] (read-kelvin-local our desk now))
|
||||||
~> %slog.0^leaf/"kiln: {here} already at {<[- +]:kel>}, ignoring"
|
~> %slog.0^leaf/"kiln: {here} already at {<[- +]:kel>}, ignoring"
|
||||||
vats
|
vats
|
||||||
=^ tem next.rak (crank-next %| kel)
|
=^ tem rail.rak (crank-next %| kel)
|
||||||
?^ tem
|
?^ tem
|
||||||
(emit merge-main:pass)
|
(emit merge-main:pass)
|
||||||
=- (emit (pyre:pass leaf/- ~))
|
=- (emit (pyre:pass leaf/- ~))
|
||||||
@ -613,6 +665,7 @@
|
|||||||
%find (take-find syn)
|
%find (take-find syn)
|
||||||
%sync (take-sync syn)
|
%sync (take-sync syn)
|
||||||
%download (take-download syn)
|
%download (take-download syn)
|
||||||
|
%listen (take-listen syn)
|
||||||
%merge-main (take-merge-main syn)
|
%merge-main (take-merge-main syn)
|
||||||
%merge-kids (take-merge-kids syn)
|
%merge-kids (take-merge-kids syn)
|
||||||
==
|
==
|
||||||
@ -621,62 +674,47 @@
|
|||||||
|= syn=sign-arvo
|
|= syn=sign-arvo
|
||||||
^+ vats
|
^+ vats
|
||||||
?> ?=(%writ +<.syn)
|
?> ?=(%writ +<.syn)
|
||||||
?: paused.rail.rak
|
?. is-tracking
|
||||||
vats
|
vats
|
||||||
?~ p.syn
|
?~ p.syn
|
||||||
~> %slog.0^leaf/"kiln: cancelled (1) install into {here}, aborting"
|
~> %slog.0^leaf/"kiln: cancelled (1) install into {here}, aborting"
|
||||||
vats(ark (~(del by ark) loc))
|
vats(ark (~(del by ark) loc))
|
||||||
?. =(our ship.rail.rak)
|
|
||||||
~> %slog.0^leaf/"kiln: activated install into {here}"
|
~> %slog.0^leaf/"kiln: activated install into {here}"
|
||||||
(emit sync-da:pass)
|
(emit sync-da:pass)
|
||||||
~> %slog.0^leaf/"kiln: activated local install into {here}"
|
|
||||||
%- take-sync
|
|
||||||
:+ %clay %writ
|
|
||||||
:- ~
|
|
||||||
:+ [%w da+now desk.rail.rak] /
|
|
||||||
:- %cass
|
|
||||||
!> .^(cass %cw /(scot %p our)/[desk.rail.rak]/(scot %da now))
|
|
||||||
::
|
::
|
||||||
++ take-sync
|
++ take-sync
|
||||||
|= syn=sign-arvo
|
|= syn=sign-arvo
|
||||||
^+ vats
|
^+ vats
|
||||||
?> ?=(%writ +<.syn)
|
?> ?=(%writ +<.syn)
|
||||||
?: paused.rail.rak
|
=* rit u.p.syn
|
||||||
|
?. is-tracking
|
||||||
vats
|
vats
|
||||||
?~ p.syn
|
?~ p.syn
|
||||||
~> %slog.0^leaf/"kiln: cancelled (1) install into {here}, retrying"
|
~> %slog.0^leaf/"kiln: cancelled (1) install into {here}, retrying"
|
||||||
reset
|
reset
|
||||||
=? aeon.rail.rak ?=(%w p.p.u.p.syn) ud:;;(cass:clay q.q.r.u.p.syn)
|
=? rail.rak ?=(%w p.p.rit) `%*(. ral aeon ud:;;(cass:clay q.q.r.rit))
|
||||||
?. =(our ship.rail.rak)
|
|
||||||
~> %slog.0^leaf/"kiln: downloading update for {here}"
|
~> %slog.0^leaf/"kiln: downloading update for {here}"
|
||||||
(emit download:pass)
|
(emit download:pass)
|
||||||
~> %slog.0^leaf/"kiln: loading update for {here}"
|
|
||||||
%- take-download
|
|
||||||
:+ %clay %writ
|
|
||||||
:- ~
|
|
||||||
:+ [%v ud+aeon.rail.rak desk.rail.rak] /
|
|
||||||
:- %dome
|
|
||||||
!> .^(dome:clay %cv /(scot %p our)/[desk.rail.rak]/(scot %ud aeon.rail.rak))
|
|
||||||
::
|
::
|
||||||
++ take-download
|
++ take-download
|
||||||
|= syn=sign-arvo
|
|= syn=sign-arvo
|
||||||
^+ vats
|
^+ vats
|
||||||
?> ?=(%writ +<.syn)
|
?> ?=(%writ +<.syn)
|
||||||
?: paused.rail.rak
|
?. is-tracking
|
||||||
vats
|
vats
|
||||||
?~ p.syn
|
?~ p.syn
|
||||||
~> %slog.0^leaf/"kiln: cancelled (2) install into {here}, retrying"
|
~> %slog.0^leaf/"kiln: cancelled (2) install into {here}, retrying"
|
||||||
reset
|
reset
|
||||||
~> %slog.0^leaf/"kiln: finished downloading update for {here}"
|
~> %slog.0^leaf/"kiln: finished downloading update for {here}"
|
||||||
=/ old-weft `weft`[%zuse zuse]
|
=/ old-weft `weft`[%zuse zuse]
|
||||||
=/ new-weft (read-kelvin-foreign [ship desk aeon]:rail.rak)
|
=/ new-weft (read-kelvin-foreign [ship desk aeon]:ral)
|
||||||
=? vats liv.rein.rak
|
=? vats liv.rein.rak
|
||||||
=/ bill (read-bill-foreign [ship desk aeon]:rail.rak)
|
=/ bill (read-bill-foreign [ship desk aeon]:ral)
|
||||||
=/ wan (sy (get-apps-want bill rein.rak))
|
=/ wan (sy (get-apps-want bill rein.rak))
|
||||||
=/ hav (sy (get-apps-live our loc now))
|
=/ hav (sy (get-apps-live our loc now))
|
||||||
=/ ded ~(tap in (~(dif in hav) wan))
|
=/ ded ~(tap in (~(dif in hav) wan))
|
||||||
(stop-dudes ded)
|
(stop-dudes ded)
|
||||||
=. aeon.rail.rak +(aeon.rail.rak)
|
=. rail.rak `%*(. ral aeon +(aeon:ral))
|
||||||
|^ ^+ vats
|
|^ ^+ vats
|
||||||
?: =(%base loc)
|
?: =(%base loc)
|
||||||
do-base
|
do-base
|
||||||
@ -697,22 +735,24 @@
|
|||||||
^+ vats
|
^+ vats
|
||||||
~> %slog.0^leaf/"kiln: future version {<new-weft>}, enqueueing"
|
~> %slog.0^leaf/"kiln: future version {<new-weft>}, enqueueing"
|
||||||
:: retry upgrade if not blocked anymore
|
:: retry upgrade if not blocked anymore
|
||||||
=/ base=arak (~(got by ark) %base)
|
=. rail.rak `%*(. ral next (snoc next:ral [(dec aeon:ral) new-weft]))
|
||||||
=. next.rak (snoc next.rak [(dec aeon.rail.rak) new-weft])
|
|
||||||
=. ark (~(put by ark) loc rak)
|
=. ark (~(put by ark) loc rak)
|
||||||
=/ =diff [%block loc rak new-weft blockers=(sy %base ~)]
|
=/ =diff [%block loc rak new-weft blockers=(sy %base ~)]
|
||||||
=. vats (emil sync-ud:pass (diff:give diff) ~)
|
=. vats (emil sync-ud:pass (diff:give diff) ~)
|
||||||
?. &(?=(^ next.base) =(~ (get-blockers weft.i.next.base)))
|
=/ base=arak (~(got by ark) %base)
|
||||||
|
?~ rail.base
|
||||||
|
vats
|
||||||
|
=/ rel u.rail.base
|
||||||
|
?. &(?=(^ next.rel) =(~ (get-blockers weft.i.next.rel)))
|
||||||
vats
|
vats
|
||||||
~> %slog.0^leaf/"kiln: unblocked system update, updating"
|
~> %slog.0^leaf/"kiln: unblocked system update, updating"
|
||||||
=. kiln
|
=. kiln (bump-one weft.i.next.rel %base)
|
||||||
(bump-one weft.i.next.base %base)
|
|
||||||
vats
|
vats
|
||||||
::
|
::
|
||||||
++ kelvin-same
|
++ kelvin-same
|
||||||
^+ vats
|
^+ vats
|
||||||
~> %slog.0^leaf/"kiln: merging into {here}"
|
~> %slog.0^leaf/"kiln: merging into {here}"
|
||||||
=. next.rak +:(crank-next %& (dec aeon.rail.rak))
|
=. rail.rak +:(crank-next %& (dec aeon:ral))
|
||||||
(emil ~[merge-main sync-ud]:pass)
|
(emil ~[merge-main sync-ud]:pass)
|
||||||
::
|
::
|
||||||
++ do-base
|
++ do-base
|
||||||
@ -724,17 +764,36 @@
|
|||||||
::
|
::
|
||||||
?. =(~ blockers)
|
?. =(~ blockers)
|
||||||
~> %slog.0^leaf/"kiln: OTA blocked on {<blockers>}"
|
~> %slog.0^leaf/"kiln: OTA blocked on {<blockers>}"
|
||||||
=. next.rak (snoc next.rak [(dec aeon.rail.rak) new-weft])
|
=. rail.rak `%*(. ral next (snoc next:ral [(dec aeon:ral) new-weft]))
|
||||||
=/ =diff [%block loc rak new-weft blockers]
|
=/ =diff [%block loc rak new-weft blockers]
|
||||||
(emil sync-ud:pass (diff:give diff) ~)
|
(emil sync-ud:pass (diff:give diff) ~)
|
||||||
~> %slog.0^leaf/"kiln: applying OTA to {here}, kelvin: {<new-weft>}"
|
~> %slog.0^leaf/"kiln: applying OTA to {here}, kelvin: {<new-weft>}"
|
||||||
=. next.rak +:(crank-next %& (dec aeon.rail.rak))
|
=. rail.rak +:(crank-next %& (dec aeon:ral))
|
||||||
=. wef
|
=. wef
|
||||||
?: =(old-weft new-weft) ~
|
?: =(old-weft new-weft) ~
|
||||||
`new-weft
|
`new-weft
|
||||||
(emil ~[merge-main sync-ud]:pass)
|
(emil ~[merge-main sync-ud]:pass)
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
|
++ take-listen
|
||||||
|
|= syn=sign-arvo
|
||||||
|
^+ vats
|
||||||
|
?> ?=([@ %writ ~ *] syn)
|
||||||
|
=. vats (emit listen:pass)
|
||||||
|
take-commit
|
||||||
|
::
|
||||||
|
++ take-commit
|
||||||
|
^+ vats
|
||||||
|
~> %slog.0^leaf/"kiln: commit detected at {here}"
|
||||||
|
=. vats (emit (diff:give %commit loc rak))
|
||||||
|
=? vats liv.rein.rak
|
||||||
|
(update-running-apps (get-apps-diff our loc now rein.rak))
|
||||||
|
?. =(%base loc)
|
||||||
|
vats
|
||||||
|
=/ kel [- +]:weft:(head next:ral)
|
||||||
|
~> %slog.0^leaf/"kiln: merging %base into %kids at {<kel>}"
|
||||||
|
(emit merge-kids:pass)
|
||||||
|
::
|
||||||
++ take-merge-main
|
++ take-merge-main
|
||||||
|= syn=sign-arvo
|
|= syn=sign-arvo
|
||||||
^+ vats
|
^+ vats
|
||||||
@ -749,14 +808,7 @@
|
|||||||
%- (slog leaf/- p.p.syn)
|
%- (slog leaf/- p.p.syn)
|
||||||
=. vats (emit (diff:give %merge-fail loc rak p.p.syn))
|
=. vats (emit (diff:give %merge-fail loc rak p.p.syn))
|
||||||
vats
|
vats
|
||||||
~> %slog.0^leaf/"kiln: merge into {here} succeeded"
|
take-commit
|
||||||
=. vats (emit (diff:give %merge loc rak))
|
|
||||||
=? vats liv.rein.rak
|
|
||||||
(update-running-apps (get-apps-diff our loc now rein.rak))
|
|
||||||
?. =(%base loc)
|
|
||||||
vats
|
|
||||||
~> %slog.0^leaf/"kiln: bumping {<zuse>}" :: TODO print next
|
|
||||||
(emit merge-kids:pass)
|
|
||||||
::
|
::
|
||||||
++ take-merge-kids
|
++ take-merge-kids
|
||||||
|= syn=sign-arvo
|
|= syn=sign-arvo
|
||||||
@ -768,7 +820,7 @@
|
|||||||
reset
|
reset
|
||||||
?- -.p.syn
|
?- -.p.syn
|
||||||
%& ~> %slog.0^leaf/"kiln: OTA to %kids succeeded"
|
%& ~> %slog.0^leaf/"kiln: OTA to %kids succeeded"
|
||||||
(emit (diff:give %merge %kids rak))
|
(emit (diff:give %commit %kids rak))
|
||||||
%| ~> %slog.0^leaf/"kiln: OTA to %kids failed {<p.p.syn>}"
|
%| ~> %slog.0^leaf/"kiln: OTA to %kids failed {<p.p.syn>}"
|
||||||
(emit (diff:give %merge-fail %kids rak p.p.syn))
|
(emit (diff:give %merge-fail %kids rak p.p.syn))
|
||||||
==
|
==
|
||||||
@ -797,20 +849,27 @@
|
|||||||
|= daz=(list dude)
|
|= daz=(list dude)
|
||||||
~> %slog.0^leaf/"kiln: stopping {<daz>}"
|
~> %slog.0^leaf/"kiln: stopping {<daz>}"
|
||||||
(emil `(list card:agent:gall)`(zing (turn daz stop-dude:pass)))
|
(emil `(list card:agent:gall)`(zing (turn daz stop-dude:pass)))
|
||||||
:: +crank-next: pop stale items from .next.rak until one matches
|
:: +crank-next: pop stale items from .next until one matches
|
||||||
::
|
::
|
||||||
++ crank-next
|
++ crank-next
|
||||||
|= new=(each aeon weft)
|
|= new=(each aeon weft)
|
||||||
^+ [match=*(unit rung) next.rak]
|
^+ [match=*(unit rung) rail.rak]
|
||||||
=/ rog next.rak
|
?~ rail.rak !!
|
||||||
|- ^+ [match=*(unit rung) next.rak]
|
=/ rog next.u.rail.rak
|
||||||
?~ rog [~ next.rak]
|
=- [match `u.rail.rak(next next)]
|
||||||
|
|- ^- [match=(unit rung) next=(list rung)]
|
||||||
|
?~ rog [~ next.u.rail.rak]
|
||||||
?: ?- -.new
|
?: ?- -.new
|
||||||
%& =(p.new aeon.i.rog)
|
%& =(p.new aeon.i.rog)
|
||||||
%| =(p.new weft.i.rog)
|
%| =(p.new weft.i.rog)
|
||||||
==
|
==
|
||||||
[`i.rog t.rog]
|
[`i.rog t.rog]
|
||||||
$(rog t.rog)
|
$(rog t.rog)
|
||||||
|
::
|
||||||
|
++ is-tracking
|
||||||
|
^- ?
|
||||||
|
?~ rail.rak |
|
||||||
|
!paused.u.rail.rak
|
||||||
--
|
--
|
||||||
:: +get-blockers: find desks that would block a kernel update
|
:: +get-blockers: find desks that would block a kernel update
|
||||||
::
|
::
|
||||||
@ -824,7 +883,9 @@
|
|||||||
~
|
~
|
||||||
?. liv.rein.arak
|
?. liv.rein.arak
|
||||||
~
|
~
|
||||||
?: (lien next.arak |=([* k=weft] =(k kel)))
|
?~ rail.arak
|
||||||
|
`desk
|
||||||
|
?: (lien next.u.rail.arak |=([* k=weft] =(k kel)))
|
||||||
~
|
~
|
||||||
`desk
|
`desk
|
||||||
:: +get-germ: select merge strategy into local desk
|
:: +get-germ: select merge strategy into local desk
|
||||||
@ -892,7 +953,9 @@
|
|||||||
=/ =arak
|
=/ =arak
|
||||||
(~(got by ark) %base)
|
(~(got by ark) %base)
|
||||||
=/ kel=weft
|
=/ kel=weft
|
||||||
?~(next.arak zuse+zuse weft.i.next.arak)
|
?~ rail.arak zuse+zuse
|
||||||
|
?~ next.u.rail.arak zuse+zuse
|
||||||
|
weft.i.next.u.rail.arak
|
||||||
abet:(bump:vats kel except force)
|
abet:(bump:vats kel except force)
|
||||||
::
|
::
|
||||||
++ poke-cancel
|
++ poke-cancel
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
+$ diff
|
+$ diff
|
||||||
$% [%block =desk =arak =weft blockers=(set desk)]
|
$% [%block =desk =arak =weft blockers=(set desk)]
|
||||||
[%reset =desk =arak]
|
[%reset =desk =arak]
|
||||||
[%merge =desk =arak]
|
[%commit =desk =arak]
|
||||||
[%merge-sunk =desk =arak =tang]
|
[%merge-sunk =desk =arak =tang]
|
||||||
[%merge-fail =desk =arak =tang]
|
[%merge-fail =desk =arak =tang]
|
||||||
[%suspend =desk =arak]
|
[%suspend =desk =arak]
|
||||||
@ -16,28 +16,33 @@
|
|||||||
:: $arak: foreign vat tracker
|
:: $arak: foreign vat tracker
|
||||||
::
|
::
|
||||||
:: .rail: upstream tracking state, if any
|
:: .rail: upstream tracking state, if any
|
||||||
:: .next: list of pending commits with future kelvins
|
|
||||||
:: .rein: configuration for agents
|
:: .rein: configuration for agents
|
||||||
::
|
::
|
||||||
+$ arak
|
+$ arak
|
||||||
$: =rail
|
$: rail=(unit rail)
|
||||||
next=(list rung)
|
|
||||||
=rein
|
=rein
|
||||||
==
|
==
|
||||||
:: $rail: upstream tracking state
|
:: $rail: upstream tracking state
|
||||||
::
|
::
|
||||||
|
:: .paused: is tracking paused? or live
|
||||||
|
:: .ship: upstream ship (could be .our)
|
||||||
|
:: .desk: name of upstream desk
|
||||||
|
:: .aeon: next aeon to pull from upstream
|
||||||
|
:: .next: list of pending commits with future kelvins
|
||||||
|
::
|
||||||
+$ rail
|
+$ rail
|
||||||
$: paused=?
|
$: paused=?
|
||||||
=ship
|
=ship
|
||||||
=desk
|
=desk
|
||||||
=aeon
|
=aeon
|
||||||
|
next=(list rung)
|
||||||
==
|
==
|
||||||
:: $rung: reference to upstream commit
|
:: $rung: reference to upstream commit
|
||||||
::
|
::
|
||||||
+$ rung [=aeon =weft]
|
+$ rung [=aeon =weft]
|
||||||
:: $rein: diff from desk manifest
|
:: $rein: diff from desk manifest
|
||||||
::
|
::
|
||||||
:: .liv: suspended?
|
:: .liv: suspended? if suspended, no agents should run
|
||||||
:: .add: agents not in manifest that should be running
|
:: .add: agents not in manifest that should be running
|
||||||
:: .sub: agents in manifest that should not be running
|
:: .sub: agents in manifest that should not be running
|
||||||
::
|
::
|
||||||
@ -65,23 +70,25 @@
|
|||||||
=+ .^(=weft %cx /(scot %p our)/[desk]/(scot %da now)/sys/kelvin)
|
=+ .^(=weft %cx /(scot %p our)/[desk]/(scot %da now)/sys/kelvin)
|
||||||
:+ %rose ["" "{<desk>}" "::"]
|
:+ %rose ["" "{<desk>}" "::"]
|
||||||
^- tang
|
^- tang
|
||||||
=- ?: =(~ next.arak) -
|
|
||||||
%+ snoc -
|
|
||||||
leaf/"pending: {<(turn next.arak |=([@ lal=@tas num=@] [lal num]))>}"
|
|
||||||
^- tang
|
|
||||||
=/ meb (mergebase-hashes our desk now arak)
|
=/ meb (mergebase-hashes our desk now arak)
|
||||||
=/ poz ?:(paused.rail.arak "paused" "tracking")
|
=/ poz
|
||||||
|
?~ rail.arak "local"
|
||||||
|
?:(paused.u.rail.arak "paused" "tracking")
|
||||||
=/ sat ?:(liv.rein.arak "running" "suspended")
|
=/ sat ?:(liv.rein.arak "running" "suspended")
|
||||||
|
=/ pen
|
||||||
|
?~ rail.arak "~"
|
||||||
|
<(turn next.u.rail.arak |=([@ lal=@tas num=@] [lal num]))>
|
||||||
:~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
|
:~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
|
||||||
leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
||||||
leaf/"%cz hash: {<hash>}"
|
leaf/"%cz hash: {<hash>}"
|
||||||
leaf/"updates: {sat}"
|
leaf/"updates: {sat}"
|
||||||
leaf/"source ship: {<ship.rail.arak>}"
|
leaf/"source ship: {?~(rail.arak <~> <ship.u.rail.arak>)}"
|
||||||
leaf/"source desk: {<desk.rail.arak>}"
|
leaf/"source desk: {?~(rail.arak <~> <desk.u.rail.arak>)}"
|
||||||
leaf/"source aeon: {<aeon.rail.arak>}"
|
leaf/"source aeon: {?~(rail.arak <~> <aeon.u.rail.arak>)}"
|
||||||
leaf/"agent status: {sat}"
|
leaf/"agent status: {sat}"
|
||||||
leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
|
leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
|
||||||
leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
|
leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
|
||||||
|
leaf/"pending: {pen}"
|
||||||
==
|
==
|
||||||
:: +read-kelvin-foreign: read /sys/kelvin from a foreign desk
|
:: +read-kelvin-foreign: read /sys/kelvin from a foreign desk
|
||||||
::
|
::
|
||||||
@ -109,7 +116,7 @@
|
|||||||
|= [our=ship =desk now=@da]
|
|= [our=ship =desk now=@da]
|
||||||
^- (unit weft)
|
^- (unit weft)
|
||||||
=/ pax (en-beam [our desk da+now] /sys/kelvin)
|
=/ pax (en-beam [our desk da+now] /sys/kelvin)
|
||||||
?~ =<(fil .^(arch cy/pax))
|
?. .^(? cu/pax)
|
||||||
~
|
~
|
||||||
[~ .^(weft cx/pax)]
|
[~ .^(weft cx/pax)]
|
||||||
:: +read-bill-foreign: read /desk/bill from a foreign desk
|
:: +read-bill-foreign: read /desk/bill from a foreign desk
|
||||||
@ -137,7 +144,7 @@
|
|||||||
++ read-bill
|
++ read-bill
|
||||||
|= [our=ship =desk now=@da]
|
|= [our=ship =desk now=@da]
|
||||||
=/ pax (en-beam [our desk da+now] /desk/bill)
|
=/ pax (en-beam [our desk da+now] /desk/bill)
|
||||||
?~ =<(fil .^(arch cy/pax))
|
?. .^(? cu/pax)
|
||||||
*bill
|
*bill
|
||||||
.^(bill cx/pax)
|
.^(bill cx/pax)
|
||||||
:: +is-fish: should dill link .dude?
|
:: +is-fish: should dill link .dude?
|
||||||
@ -179,10 +186,11 @@
|
|||||||
::
|
::
|
||||||
++ mergebase-hashes
|
++ mergebase-hashes
|
||||||
|= [our=@p =desk now=@da =arak]
|
|= [our=@p =desk now=@da =arak]
|
||||||
=/ her (scot %p ship.rail.arak)
|
?> ?=(^ rail.arak)
|
||||||
|
=/ her (scot %p ship.u.rail.arak)
|
||||||
=/ ego (scot %p our)
|
=/ ego (scot %p our)
|
||||||
=/ wen (scot %da now)
|
=/ wen (scot %da now)
|
||||||
%+ turn .^((list tako) %cs ~[ego desk wen %base her desk.rail.arak])
|
%+ turn .^((list tako) %cs ~[ego desk wen %base her desk.u.rail.arak])
|
||||||
|=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
|
|=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
|
||||||
::
|
::
|
||||||
++ enjs
|
++ enjs
|
||||||
@ -241,12 +249,18 @@
|
|||||||
++ arak
|
++ arak
|
||||||
|= a=^arak
|
|= a=^arak
|
||||||
%- pairs
|
%- pairs
|
||||||
:~ ship+s+(scot %p ship.rail.a)
|
:~ rail+?~(rail.a ~ (rail u.rail.a))
|
||||||
desk+s+desk.rail.a
|
|
||||||
paused+b+paused.rail.a
|
|
||||||
aeon+(numb aeon.rail.a)
|
|
||||||
next+a+(turn next.a rung)
|
|
||||||
rein+(rein rein.a)
|
rein+(rein rein.a)
|
||||||
==
|
==
|
||||||
|
::
|
||||||
|
++ rail
|
||||||
|
|= r=^rail
|
||||||
|
%- pairs
|
||||||
|
:~ ship+s+(scot %p ship.r)
|
||||||
|
desk+s+desk.r
|
||||||
|
paused+b+paused.r
|
||||||
|
aeon+(numb aeon.r)
|
||||||
|
next+a+(turn next.r rung)
|
||||||
|
==
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user