From da5f78df18d44b67a1f00c78f92da94239b72d8a Mon Sep 17 00:00:00 2001 From: Isaac Visintainer Date: Mon, 4 May 2020 20:55:41 -0600 Subject: [PATCH 1/3] publish: allow crash case to no-op instead --- pkg/arvo/app/publish.hoon | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkg/arvo/app/publish.hoon b/pkg/arvo/app/publish.hoon index f8b9cff3e..9837999ab 100644 --- a/pkg/arvo/app/publish.hoon +++ b/pkg/arvo/app/publish.hoon @@ -1857,8 +1857,9 @@ :: %remove =/ app-path [(scot %p author.del) /[book.del]] - =/ group-path (group-from-book app-path) - [(metadata-poke [%remove group-path [%publish app-path]])]~ + =/ group-path=(unit path) (group-from-book app-path) + ?~ group-path ~ + [(metadata-poke [%remove u.group-path [%publish app-path]])]~ == :: ++ add @@ -1884,11 +1885,11 @@ :: ++ group-from-book |= app-path=path - ^- path + ^- (unit path) ?. .^(? %gu (scot %p our.bol) %metadata-store (scot %da now.bol) ~) ?: ?=([@ ^] app-path) ~& [%assuming-ported-legacy-publish app-path] - [%'~' app-path] + `[%'~' app-path] ~| [%weird-publish app-path] !! =/ resource-indices @@ -1899,8 +1900,10 @@ (scot %da now.bol) /resource-indices == - =/ groups=(set path) (~(got by resource-indices) [%publish app-path]) - (snag 0 ~(tap in groups)) + =/ groups=(unit (set path)) + (~(get by resource-indices) [%publish app-path]) + ?~ groups ~ + `(snag 0 ~(tap in u.groups)) -- :: ++ metadata-hook-poke From a91a3e50e12ffb3b50244d52dd3f6a8626235b52 Mon Sep 17 00:00:00 2001 From: Isaac Visintainer Date: Mon, 4 May 2020 21:35:56 -0600 Subject: [PATCH 2/3] publish: no-op on some other cases as well --- pkg/arvo/app/publish.hoon | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/app/publish.hoon b/pkg/arvo/app/publish.hoon index 9837999ab..dbcea4f17 100644 --- a/pkg/arvo/app/publish.hoon +++ b/pkg/arvo/app/publish.hoon @@ -1890,8 +1890,7 @@ ?: ?=([@ ^] app-path) ~& [%assuming-ported-legacy-publish app-path] `[%'~' app-path] - ~| [%weird-publish app-path] - !! + ~&([%weird-publish app-path] ~) =/ resource-indices .^ (jug resource group-path) %gy @@ -1903,7 +1902,9 @@ =/ groups=(unit (set path)) (~(get by resource-indices) [%publish app-path]) ?~ groups ~ - `(snag 0 ~(tap in u.groups)) + =/ group-paths ~(tap in u.groups) + ?~ group-paths ~ + `i.group-paths -- :: ++ metadata-hook-poke From b9c5699ee425c32462767be95b1d39430f50d96f Mon Sep 17 00:00:00 2001 From: Isaac Visintainer Date: Mon, 4 May 2020 21:39:57 -0600 Subject: [PATCH 3/3] publish: add debug poke to reset the warp loop --- pkg/arvo/app/publish.hoon | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/app/publish.hoon b/pkg/arvo/app/publish.hoon index dbcea4f17..538da047e 100644 --- a/pkg/arvo/app/publish.hoon +++ b/pkg/arvo/app/publish.hoon @@ -331,9 +331,16 @@ ?+ mar (on-poke:def mar vas) :: %noun - ?: =(q.vas %flush-limbo) - [~ this(limbo [~ ~])] - [~ this] + ?+ q.vas + [~ this] + :: + %flush-limbo [~ this(limbo [~ ~])] + :: + %reset-warp + =/ rav [%sing %t [%da now.bol] /app/publish/notebooks] + :_ this + [%pass /read/paths %arvo %c %warp our.bol q.byk.bol `rav]~ + == :: %handle-http-request =+ !<([id=@ta req=inbound-request:eyre] vas)