2021-09-02 00:37:56 +03:00
|
|
|
=, clay
|
|
|
|
=* dude dude:gall
|
|
|
|
|%
|
2022-10-07 01:46:45 +03:00
|
|
|
+$ pike
|
|
|
|
$: sync=(unit [=ship =desk])
|
|
|
|
hash=@uv
|
|
|
|
=zest
|
|
|
|
wic=(set weft)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ pikes (map desk pike)
|
|
|
|
::
|
2021-09-06 17:27:17 +03:00
|
|
|
:: $rung: reference to upstream commit
|
|
|
|
::
|
|
|
|
+$ rung [=aeon =weft]
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
2022-09-13 07:22:22 +03:00
|
|
|
+$ sync-state [nun=@ta kid=(unit desk) let=@ud]
|
|
|
|
+$ sink (unit [her=@p sud=desk kid=(unit desk) let=@ud])
|
2023-04-28 02:23:34 +03:00
|
|
|
:: +truncate-hash: get last 5 digits of hash and convert to tape
|
|
|
|
::
|
|
|
|
++ truncate-hash
|
|
|
|
|= hash=@uv
|
|
|
|
^- tape
|
|
|
|
(slag 2 <`@uv`(mod hash 0v1.00000)>)
|
2023-04-14 00:33:54 +03:00
|
|
|
:: +report-prep: get data required for reports
|
|
|
|
::
|
|
|
|
++ report-prep
|
|
|
|
|= [our=@p now=@da]
|
|
|
|
=/ ego (scot %p our)
|
|
|
|
=/ wen (scot %da now)
|
|
|
|
:* .^(rock:tire %cx /[ego]//[wen]/tire)
|
|
|
|
.^(=cone %cx /[ego]//[wen]/domes)
|
|
|
|
.^((map desk [ship desk]) %gx /[ego]/hood/[wen]/kiln/sources/noun)
|
|
|
|
.^ (map [desk ship desk] sync-state) %gx
|
|
|
|
/[ego]/hood/[wen]/kiln/syncs/noun
|
2023-03-21 00:59:27 +03:00
|
|
|
==
|
2023-04-14 00:33:54 +03:00
|
|
|
==
|
|
|
|
:: +report-vats: report on all desk installations
|
|
|
|
::
|
|
|
|
++ report-vats
|
|
|
|
|= [our=@p now=@da desks=(list desk) filt=@tas verb=?]
|
|
|
|
=/ ego (scot %p our)
|
|
|
|
=/ wen (scot %da now)
|
|
|
|
=/ prep (report-prep our now)
|
|
|
|
?~ filt
|
|
|
|
%+ turn (flop desks)
|
|
|
|
|=(syd=@tas (report-vat prep our now syd verb))
|
|
|
|
=/ deks
|
|
|
|
?~ desks ~(tap in -.prep)
|
|
|
|
%+ skip ~(tap in -.prep)
|
|
|
|
|=([syd=@tas *] =(~ (find ~[syd] desks)))
|
|
|
|
?: =(filt %blocking)
|
|
|
|
=/ base-wic
|
|
|
|
%+ sort ~(tap by wic:(~(got by -.prep) %base))
|
|
|
|
|=([[* a=@ud] [* b=@ud]] (gth a b))
|
|
|
|
?~ base-wic ~[leaf+"%base already up-to-date"]
|
|
|
|
=/ blockers=(list desk)
|
|
|
|
%+ turn
|
|
|
|
%+ skip ~(tap in -.prep)
|
|
|
|
|= [* [zest=@tas wic=(set weft)]]
|
|
|
|
?. =(zest %live) &
|
|
|
|
(~(has in wic) i.base-wic)
|
|
|
|
|=([syd=desk *] syd)
|
|
|
|
?~ blockers ~[leaf+"No desks blocking upgrade, run |bump to apply"]
|
|
|
|
:- [%rose [" %" "To unblock upgrade run |suspend %" ""] blockers]
|
|
|
|
%+ turn (flop blockers)
|
|
|
|
|=(syd=desk (report-vat prep our now syd verb))
|
|
|
|
%+ turn
|
|
|
|
?+ filt !!
|
|
|
|
::
|
|
|
|
%exists
|
|
|
|
%+ skip deks
|
|
|
|
|=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0))
|
|
|
|
::
|
|
|
|
%running
|
|
|
|
%+ skim deks
|
|
|
|
|=([* [zest=@tas *]] =(zest %live))
|
|
|
|
::
|
|
|
|
%suspended
|
|
|
|
%+ skip deks
|
|
|
|
|= [syd=@tas [zest=@tas *]]
|
|
|
|
?| =(syd %kids)
|
|
|
|
=(zest %live)
|
|
|
|
=(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
%exists-not
|
|
|
|
%+ skim deks
|
|
|
|
|=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0))
|
|
|
|
==
|
|
|
|
|=([syd=desk *] (report-vat prep our now syd verb))
|
|
|
|
:: +report-vat: report on a single desk installation
|
|
|
|
::
|
|
|
|
++ report-vat
|
|
|
|
|= $: $: tyr=rock:tire =cone sor=(map desk [ship desk])
|
|
|
|
zyn=(map [desk ship desk] sync-state)
|
2022-09-13 07:22:22 +03:00
|
|
|
==
|
2023-04-14 00:33:54 +03:00
|
|
|
our=ship now=@da syd=desk verb=?
|
2022-09-13 07:22:22 +03:00
|
|
|
==
|
2023-04-14 00:33:54 +03:00
|
|
|
^- tank
|
|
|
|
=/ ego (scot %p our)
|
|
|
|
=/ wen (scot %da now)
|
|
|
|
=+ .^(=cass %cw /[ego]/[syd]/[wen])
|
|
|
|
?: =(ud.cass 0)
|
|
|
|
leaf+"desk does not yet exist: {<syd>}"
|
|
|
|
?: =(%kids syd)
|
|
|
|
=+ .^(hash=@uv %cz /[ego]/[syd]/[wen])
|
|
|
|
leaf+"%kids %cz hash: {<hash>}"
|
|
|
|
=/ kel-path
|
|
|
|
/[ego]/[syd]/[wen]/sys/kelvin
|
|
|
|
?. .^(? %cu kel-path)
|
|
|
|
leaf+"bad desk: {<syd>}"
|
|
|
|
=+ .^(=waft %cx kel-path)
|
|
|
|
:+ %rose ["" "{<syd>}" "::"]
|
|
|
|
^- tang
|
|
|
|
=/ hash .^(@uv %cz /[ego]/[syd]/[wen])
|
|
|
|
=/ =sink
|
|
|
|
?~ s=(~(get by sor) syd)
|
|
|
|
~
|
|
|
|
?~ z=(~(get by zyn) syd u.s)
|
|
|
|
~
|
|
|
|
`[-.u.s +.u.s +.u.z]
|
|
|
|
=/ meb=(list @uv)
|
|
|
|
?~ sink [hash]~
|
|
|
|
(mergebase-hashes our syd now her.u.sink sud.u.sink)
|
|
|
|
=/ dek (~(got by tyr) syd)
|
|
|
|
=/ =dome (~(got by cone) our syd)
|
|
|
|
=/ [on=(list [@tas ?]) of=(list [@tas ?])]
|
|
|
|
(skid ~(tap by ren.dome) |=([* ?] +<+))
|
|
|
|
=/ sat
|
|
|
|
?- zest.dek
|
|
|
|
%live "running"
|
|
|
|
%dead "suspended"
|
|
|
|
%held "suspended until next update"
|
|
|
|
==
|
|
|
|
=/ kul=tape
|
|
|
|
%+ roll
|
|
|
|
%+ sort
|
|
|
|
~(tap in (waft-to-wefts:clay waft))
|
|
|
|
|= [a=weft b=weft]
|
|
|
|
?: =(lal.a lal.b)
|
|
|
|
(lte num.a num.b)
|
|
|
|
(lte lal.a lal.b)
|
|
|
|
|= [=weft =tape]
|
|
|
|
(welp " {<[lal num]:weft>}" tape)
|
|
|
|
?. verb
|
2023-04-28 02:23:34 +03:00
|
|
|
=/ cut=(list tape) (turn meb truncate-hash)
|
2023-04-28 04:10:53 +03:00
|
|
|
=/ len (lent cut)
|
2023-04-28 02:23:34 +03:00
|
|
|
=/ base-hash
|
2023-04-28 04:10:53 +03:00
|
|
|
?: =(0 len) "~"
|
|
|
|
?: =(1 len) (head cut)
|
2023-04-28 02:23:34 +03:00
|
|
|
"~[{`tape`(zing (join " " `(list tape)`cut))}]"
|
2023-04-22 00:13:46 +03:00
|
|
|
:~ leaf/"/sys/kelvin: {kul}"
|
2023-04-28 02:23:34 +03:00
|
|
|
leaf/"base hash ends in: {base-hash}"
|
|
|
|
leaf/"%cz hash ends in: {(truncate-hash hash)}"
|
2023-04-22 00:13:46 +03:00
|
|
|
leaf/"app status: {sat}"
|
|
|
|
leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
|
2023-04-14 00:33:54 +03:00
|
|
|
==
|
|
|
|
:~ leaf/"/sys/kelvin: {kul}"
|
|
|
|
leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
|
|
|
leaf/"%cz hash: {<hash>}"
|
|
|
|
::
|
|
|
|
leaf/"app status: {sat}"
|
|
|
|
leaf/"force on: {?:(=(~ on) "~" <on>)}"
|
|
|
|
leaf/"force off: {?:(=(~ of) "~" <of>)}"
|
|
|
|
::
|
|
|
|
leaf/"publishing ship: {?~(sink <~> <(get-publisher our syd now)>)}"
|
|
|
|
leaf/"updates: {?~(sink "local" "remote")}"
|
|
|
|
leaf/"source ship: {?~(sink <~> <her.u.sink>)}"
|
|
|
|
leaf/"source desk: {?~(sink <~> <sud.u.sink>)}"
|
|
|
|
leaf/"source aeon: {?~(sink <~> <let.u.sink>)}"
|
|
|
|
leaf/"kids desk: {?~(sink <~> ?~(kid.u.sink <~> <u.kid.u.sink>))}"
|
|
|
|
leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
|
|
|
|
==
|
|
|
|
:: +report-kids: non-vat cz hash report for kids desk
|
|
|
|
::
|
|
|
|
++ report-kids
|
|
|
|
|= [our=ship now=@da]
|
|
|
|
^- tank
|
|
|
|
=/ syd %kids
|
|
|
|
=/ ego (scot %p our)
|
|
|
|
=/ wen (scot %da now)
|
|
|
|
?. (~(has in .^((set desk) %cd /[ego]//[wen])) syd)
|
|
|
|
leaf/"no %kids desk"
|
|
|
|
=+ .^(hash=@uv %cz /[ego]/[syd]/[wen])
|
|
|
|
leaf/"%kids %cz hash: {<hash>}"
|
2021-09-13 01:35:17 +03:00
|
|
|
:: +read-bill-foreign: read /desk/bill from a foreign desk
|
|
|
|
::
|
|
|
|
++ read-bill-foreign
|
|
|
|
|= [=ship =desk =aeon]
|
2021-09-27 00:03:26 +03:00
|
|
|
^- (list dude)
|
2021-09-27 23:57:38 +03:00
|
|
|
~| +<
|
2021-09-13 01:35:17 +03:00
|
|
|
=/ her (scot %p ship)
|
|
|
|
=/ syd (scot %tas desk)
|
|
|
|
=/ yon (scot %ud aeon)
|
|
|
|
::
|
2023-04-22 00:13:46 +03:00
|
|
|
=/ dom .^(domo cv/~[her syd yon])
|
2021-09-27 23:57:38 +03:00
|
|
|
=/ tak ~| aeons=~(key by hit.dom)
|
|
|
|
(scot %uv (~(got by hit.dom) aeon))
|
2021-09-13 01:35:17 +03:00
|
|
|
=/ yak .^(yaki cs/~[her syd yon %yaki tak])
|
2021-09-27 04:54:36 +03:00
|
|
|
=/ fil (~(get by q.yak) /desk/bill)
|
|
|
|
?~ fil ~
|
|
|
|
=/ lob (scot %uv u.fil)
|
2022-04-13 10:15:31 +03:00
|
|
|
=/ peg .^(page cs/~[her syd yon %blob lob])
|
|
|
|
;;((list dude) q.peg)
|
2021-09-02 00:37:56 +03:00
|
|
|
:: +read-bill: read contents of /desk/bill manifest
|
|
|
|
::
|
|
|
|
++ read-bill
|
2021-09-27 23:57:38 +03:00
|
|
|
|= [our=ship =desk now=@da]
|
2021-09-02 00:37:56 +03:00
|
|
|
=/ pax (en-beam [our desk da+now] /desk/bill)
|
2021-09-16 19:25:02 +03:00
|
|
|
?. .^(? cu/pax)
|
2021-09-27 00:03:26 +03:00
|
|
|
*(list dude)
|
|
|
|
.^((list dude) cx/pax)
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
2021-09-27 21:50:58 +03:00
|
|
|
++ get-remote-diff
|
|
|
|
|= [our=ship here=desk now=@da her=ship there=desk when=aeon]
|
|
|
|
=+ .^(our-hash=@uv cz/[(scot %p our) here (scot %da now) ~])
|
|
|
|
=+ .^(her-hash=@uv cz/[(scot %p her) there (scot %ud when) ~])
|
|
|
|
!=(our-hash her-hash)
|
|
|
|
::
|
2021-09-29 06:26:30 +03:00
|
|
|
++ get-publisher
|
|
|
|
|= [our=ship =desk now=@da]
|
|
|
|
^- (unit ship)
|
|
|
|
=/ pax /(scot %p our)/[desk]/(scot %da now)/desk/ship
|
|
|
|
?. .^(? %cu pax) ~
|
|
|
|
`.^(ship %cx pax)
|
|
|
|
::
|
2022-09-13 07:51:39 +03:00
|
|
|
++ get-apps-live
|
|
|
|
|= [our=ship =desk now=@da]
|
|
|
|
^- (list dude)
|
|
|
|
%+ murn (get-apps-have our desk now)
|
|
|
|
|=([=dude live=?] ?.(live ~ `dude))
|
2022-09-08 08:56:12 +03:00
|
|
|
:: +get-apps-have: find which apps Gall is running on a desk
|
|
|
|
::
|
|
|
|
++ get-apps-have
|
|
|
|
|= [our=ship =desk now=@da]
|
|
|
|
^- (list [=dude live=?])
|
|
|
|
%~ tap in
|
2023-04-27 03:25:23 +03:00
|
|
|
.^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now)/$)
|
2022-09-13 07:51:39 +03:00
|
|
|
::
|
2022-09-02 06:47:28 +03:00
|
|
|
++ mergebase-hashes
|
2022-09-13 07:22:22 +03:00
|
|
|
|= [our=@p syd=desk now=@da her=ship sud=desk]
|
|
|
|
=/ her (scot %p her)
|
2022-09-02 06:47:28 +03:00
|
|
|
=/ ego (scot %p our)
|
|
|
|
=/ wen (scot %da now)
|
|
|
|
%+ turn .^((list tako) %cs ~[ego syd wen %base her sud])
|
|
|
|
|=(=tako .^(@uv %cs ~[ego syd wen %hash (scot %uv tako)]))
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
|
|
|
++ enjs
|
|
|
|
=, enjs:format
|
|
|
|
|%
|
|
|
|
++ tim
|
|
|
|
|= t=@
|
|
|
|
^- json
|
|
|
|
(numb (fall (mole |.((unm:chrono:userlib t))) 0))
|
|
|
|
::
|
|
|
|
++ cass
|
|
|
|
|= c=^cass
|
|
|
|
%- pairs
|
|
|
|
:~ ud+(numb ud.c)
|
|
|
|
da+(tim da.c)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ weft
|
|
|
|
|= w=^weft
|
|
|
|
%- pairs
|
|
|
|
:~ name+s+lal.w
|
|
|
|
kelvin+(numb num.w)
|
|
|
|
==
|
|
|
|
::
|
2021-09-07 07:37:36 +03:00
|
|
|
++ rung
|
|
|
|
|= r=^rung
|
2021-09-02 00:37:56 +03:00
|
|
|
%- pairs
|
2021-09-07 07:37:36 +03:00
|
|
|
:~ aeon+(numb aeon.r)
|
|
|
|
weft+(weft weft.r)
|
2021-09-02 00:37:56 +03:00
|
|
|
==
|
|
|
|
--
|
|
|
|
--
|