From 5ef68d38c7a5be3a706f6ce7b21fc00ff4d9fae0 Mon Sep 17 00:00:00 2001 From: fang Date: Sun, 4 Apr 2021 17:22:41 +0200 Subject: [PATCH] gall: stop sending %onto Gall would send %onto gifts to notify about app updates and update failures. This would end up in dill, which printed some appropriate text. Here, we make gall responsible for doing this printing itself (by having it explicitly ask dill to print some tape/tank), instead of relying on the receiving end of some bespoke notification protocol. --- pkg/arvo/app/hood.hoon | 1 - pkg/arvo/lib/hood/drum.hoon | 19 ------------------- pkg/arvo/sys/lull.hoon | 1 - pkg/arvo/sys/vane/dill.hoon | 11 +---------- pkg/arvo/sys/vane/gall.hoon | 22 ++++++++++++++++------ pkg/arvo/sys/vane/jael.hoon | 11 ++--------- 6 files changed, 19 insertions(+), 46 deletions(-) diff --git a/pkg/arvo/app/hood.hoon b/pkg/arvo/app/hood.hoon index 27ef5005ca..31f881e070 100644 --- a/pkg/arvo/app/hood.hoon +++ b/pkg/arvo/app/hood.hoon @@ -112,7 +112,6 @@ |= [=wire syn=sign-arvo] ^- step:agent:gall ?+ wire ~|([%hood-bad-wire wire] !!) - [%drum *] =^(c drum.state (take-arvo:drum-core t.wire syn) [c this]) [%helm *] =^(c helm.state (take-arvo:helm-core t.wire syn) [c this]) [%kiln *] =^(c kiln.state (take-arvo:kiln-core t.wire syn) [c this]) == diff --git a/pkg/arvo/lib/hood/drum.hoon b/pkg/arvo/lib/hood/drum.hoon index 4b83c1d4bf..9b8aa85308 100644 --- a/pkg/arvo/lib/hood/drum.hoon +++ b/pkg/arvo/lib/hood/drum.hoon @@ -344,12 +344,6 @@ :: (se-drop & gyl) :: -++ take-arvo - |= [=wire =sign-arvo] - %+ take-onto wire - ?> ?=(%onto +<.sign-arvo) - +>.sign-arvo -:: ++ take-coup-phat :: ack poke |= [way=wire saw=(unit tang)] =< se-abet =< se-view @@ -360,19 +354,6 @@ :_ u.saw >[%drum-coup-fail src.hid gyl]< :: -++ take-onto :: ack start - |= [way=wire saw=(each suss:gall tang)] - =< se-abet =< se-view - ?> ?=([@ @ ~] way) - ?> (~(has by fur) i.t.way) - =/ wel=well:gall [i.way i.t.way] - ?- saw - [%| *] (se-dump p.saw) - [%& *] ?> =(q.wel p.p.saw) - :: =. +>.$ (se-text "live {}") - +>.$(fur (~(put by fur) q.wel `[p.wel %da r.p.saw])) - == -:: ++ take-agent |= [=wire =sign:agent:gall] ?+ wire ~|([%drum-bad-take-agent wire -.sign] !!) diff --git a/pkg/arvo/sys/lull.hoon b/pkg/arvo/sys/lull.hoon index ff8f8639fc..c622d5aff7 100644 --- a/pkg/arvo/sys/lull.hoon +++ b/pkg/arvo/sys/lull.hoon @@ -1611,7 +1611,6 @@ +$ gift :: outgoing result $% [%boon payload=*] :: ames response [%done error=(unit error:ames)] :: ames message (n)ack - [%onto p=(each suss tang)] :: about agent [%unto p=sign:agent] :: == :: +$ task :: incoming request diff --git a/pkg/arvo/sys/vane/dill.hoon b/pkg/arvo/sys/vane/dill.hoon index e20f618e9f..952bfda934 100644 --- a/pkg/arvo/sys/vane/dill.hoon +++ b/pkg/arvo/sys/vane/dill.hoon @@ -78,10 +78,7 @@ $>(%blit gift:dill) :: == :: $: %gall :: - $> $? %onto :: - %unto :: - == :: - gift:gall :: + $>(%unto gift:gall) :: == == :: :::::::: :: dill tiles -- @@ -248,12 +245,6 @@ |= [tea=wire sih=sign] ^+ +> ?- sih - [%gall %onto *] - ?- -.+>.sih - %| (crud %onto p.p.+>.sih) - %& (fore (tuba "{(t q)}ed %{(t p)}":[t=trip p.p.sih]) ~) - == - :: [%gall %unto *] :: ~& [%take-gall-unto +>.sih] ?- -.+>.sih diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index a481307874..c27e57fcce 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -159,7 +159,7 @@ ~< %slog.[0 leaf+"gall: molted"] :: +molt should never notify its client about agent changes :: - =- [(skip -< |=(move ?=([* %give %onto *] +<))) ->] + =- [(skip -< |=(move ?=([* %pass [%sys %say ~] *] +<))) ->] =/ adult adult-core =. state.adult [%7 system-duct outstanding contacts yokes=~ blocked]:spore @@ -263,12 +263,22 @@ :: +mo-abet: finalize, reversing moves :: +mo-pass: prepend a standard %pass to the current list of moves :: +mo-give: prepend a standard %give to the current list of moves + :: +mo-talk: build task to print config report or failure trace :: ++ mo-core . ++ mo-abed |=(hun=duct mo-core(hen hun)) ++ mo-abet [(flop moves) gall-payload] ++ mo-pass |=(p=[wire note-arvo] mo-core(moves [[hen pass+p] moves])) ++ mo-give |=(g=gift mo-core(moves [[hen give+g] moves])) + ++ mo-talk + |= rup=(each suss tang) + ^- [wire note-arvo] + :+ /sys/say %d + ^- task:dill + ?- -.rup + %& [%text "gall: {(t q)}ed %{(t p)}":[t=trip p.rup]] + %| [%talk leaf+"gall: failed" (flop p.rup)] + == :: +mo-boot: ask %ford to build us a core for the specified agent. :: ++ mo-boot @@ -346,12 +356,12 @@ =/ ap-core +.wag ?^ maybe-tang =. mo-core old - (mo-give %onto %.n u.maybe-tang) + (mo-pass (mo-talk %.n u.maybe-tang)) :: =. mo-core ap-abet:ap-core =. mo-core (mo-clear-queue dap) =/ =suss [dap %boot now] - (mo-give %onto [%.y suss]) + (mo-pass (mo-talk %.y suss)) :: +mo-subscribe-to-agent-builds: request agent update notices :: :: Also subscribe to our own source path, in case we get reloaded @@ -541,7 +551,7 @@ ++ fail |= =tang ^+ mo-core - =. mo-core (mo-give %onto |+tang) + =. mo-core (mo-pass (mo-talk |+tang)) =/ =case [%da tim] =/ =wire /sys/cor/[dap]/[her]/[desk]/(scot case) (mo-pass wire %c %warp p.beak desk ~ %next %a case /app/[dap]/hoon) @@ -1017,8 +1027,8 @@ :: =/ running (~(put by yokes.state) agent-name current-agent) =/ moves - =/ giver |=(report=(each suss tang) [hen %give %onto report]) - =/ from-suss (turn agent-config giver) + =/ talker |=(report=(each suss tang) [hen %pass (mo-talk report)]) + =/ from-suss (turn agent-config talker) :(weld agent-moves from-suss moves) :: %_ mo-core diff --git a/pkg/arvo/sys/vane/jael.hoon b/pkg/arvo/sys/vane/jael.hoon index 3bda44586f..e4948fdfd7 100644 --- a/pkg/arvo/sys/vane/jael.hoon +++ b/pkg/arvo/sys/vane/jael.hoon @@ -107,11 +107,8 @@ $>(%wake gift:behn) :: == :: $: %gall :: - $> $? %onto :: - %unto :: - == :: - gift:gall :: - == + $>(%unto gift:gall) :: + == :: == :: -- :: :: :::: @@ -557,10 +554,6 @@ =/ ships (~(get ju ship-sources-reverse.etn) source-id) %- curd =< abet (sources:~(feel su hen now pki etn) ships source) - :: - [%gall %onto *] - ~& [%jael-onto tea hin] - +>.$ :: [%gall %unto *] ?- +>-.hin