From c80fb8231869ed50873c2f06ae7b5a83f90d81e1 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Thu, 23 Sep 2021 18:07:13 -0400 Subject: [PATCH] clay,kiln,landscape/notify: migration runs --- pkg/arvo/lib/hood/kiln.hoon | 17 ++++++++++------- pkg/arvo/sys/vane/clay.hoon | 26 +++++++++++++++++++++++--- pkg/base-dev/sur/hood.hoon | 3 ++- pkg/landscape/app/notify.hoon | 1 + 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/pkg/arvo/lib/hood/kiln.hoon b/pkg/arvo/lib/hood/kiln.hoon index 24008ac0f..a6c3b85a4 100644 --- a/pkg/arvo/lib/hood/kiln.hoon +++ b/pkg/arvo/lib/hood/kiln.hoon @@ -332,11 +332,8 @@ ?> ?=(%7 -.old) =. state old :: - =^ caz state - ?: (gte old-version %7) [~ state] - ::NOTE does migration to softdist logic, synchronous install - on-init - :: + =? kiln (lth old-version %7) + abet:(install:vats %base our %base) =? kiln ?=(^ old-ota) abet:(install:vats %base [her sud]:u.old-ota) =? kiln ?=(^ wef) @@ -391,7 +388,13 @@ ~_ leaf/"kiln: {} not installed" vats(loc lac, rak (~(got by ark) lac)) :: - ++ here "{} from {<[ship desk]:ral>}" + ++ here + ^- tape + =/ dek (trip loc) + ?~ rail.rak + dek + :(weld dek " from " <[ship desk]:u.rail.rak>) + :: ++ make-wire |=(step=@tas /kiln/vats/[loc]/[step]) ++ from-wire |= =wire @@ -495,7 +498,7 @@ =: loc lac rak [~ *rein] == - ~> %slog.0^leaf/"kiln: local install {here}" + ~> %slog.0^leaf/"kiln: local install {}" =. vats (update-running-apps (get-apps-diff our loc now rein.rak)) =. vats (emit listen:pass) vats diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index 40c57352b..d8661c3cd 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -342,6 +342,11 @@ == :: gift :: == :: + $: %gall + $> $? %unto + == + gift:gall + == $: %jael :: $>(%public-keys gift:jael) :: == == :: @@ -1149,6 +1154,12 @@ |= mof=(list move) %_(+> mow (weld (flop mof) mow)) :: + :: Queue a list of moves, to be emitted before the rest + :: + ++ lime + |= mof=(list move) + %_(+> mow (weld mow (flop mof))) + :: :: Produce either null or a result along a subscription. :: :: Producing null means subscription has been completed or cancelled. @@ -1586,14 +1597,15 @@ ++ migrate-dist ~> %slog.0^'clay: migrating for third-party software distribution' |^ ^+ ..park - =. ..park (install-from-tmp %base) - =. ..park (install-from-tmp %garden) + :: NOTE: reverse order, since we're prepending moves each time =. ..park (install-from-tmp %landscape) + =. ..park (install-from-tmp %garden) + =. ..park (install-from-tmp %base) ..park(dist-upgraded.ruf &) :: ++ install-from-tmp |= =desk - %- emil + %- lime :~ :^ hen %pass /dist/[desk]/create %^ new-desk:cloy desk (latest-tako desk) @@ -4748,6 +4760,13 @@ ^+ [*(list move) ..^$] ?^ dud ~|(%clay-take-dud (mean tang.u.dud)) + ?: ?=([%dist *] tea) + ?> ?=(%unto +<.hin) + ?> ?=(%poke-ack -.p.hin) + ?~ p.p.hin + [~ ..^$] + =+ ((slog 'clay: dist migration failed' u.p.p.hin) ~) + !! :: ?: ?=([%merge @ @ @ @ ~] tea) ?> ?=(%writ +<.hin) @@ -4901,6 +4920,7 @@ :: %boon !! %lost !! + %unto !! %writ %- (slog leaf+"clay: strange writ (expected on upgrade to Fusion)" ~) [~ ..^$] diff --git a/pkg/base-dev/sur/hood.hoon b/pkg/base-dev/sur/hood.hoon index e05655438..ace3e9a06 100644 --- a/pkg/base-dev/sur/hood.hoon +++ b/pkg/base-dev/sur/hood.hoon @@ -204,7 +204,8 @@ :: ++ mergebase-hashes |= [our=@p =desk now=@da =arak] - ?> ?=(^ rail.arak) + ?~ rail.arak + ~ =/ her (scot %p ship.u.rail.arak) =/ ego (scot %p our) =/ wen (scot %da now) diff --git a/pkg/landscape/app/notify.hoon b/pkg/landscape/app/notify.hoon index ce127fe74..cd9ebc9b0 100644 --- a/pkg/landscape/app/notify.hoon +++ b/pkg/landscape/app/notify.hoon @@ -67,6 +67,7 @@ :: %0 %_ $ + -.old %1 :: cards %+ welp cards