mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-19 14:37:18 +03:00
Merge branch 'next/arvo' into jon/remove-plat
This commit is contained in:
commit
5148399c1e
24
.github/workflows/frontend-test.yml
vendored
24
.github/workflows/frontend-test.yml
vendored
@ -1,24 +0,0 @@
|
|||||||
name: frontend-test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'pkg/interface/**'
|
|
||||||
- 'pkg/btc-wallet/**'
|
|
||||||
- 'pkg/npm/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
frontend-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: "Test changed frontend packages"
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- run: git fetch --prune
|
|
||||||
- name: 'Setup root deps'
|
|
||||||
run: npm ci
|
|
||||||
- name: 'Setup dependencies'
|
|
||||||
run: npm run bootstrap
|
|
||||||
- name: 'Run tests'
|
|
||||||
run: npm run test -- --since origin/$GITHUB_BASE_REF --include-dependents
|
|
79
.github/workflows/vere.yml
vendored
79
.github/workflows/vere.yml
vendored
@ -162,86 +162,9 @@ jobs:
|
|||||||
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
run: nix-build -A docker-image
|
run: nix-build -A docker-image
|
||||||
|
|
||||||
mingw:
|
|
||||||
runs-on: windows-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: >
|
|
||||||
C:\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -here -c
|
|
||||||
". <(cygpath '{0}')"
|
|
||||||
working-directory: ./pkg/urbit
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
|
|
||||||
# echo suppresses pacman prompt
|
|
||||||
- run: echo|./configure
|
|
||||||
env:
|
|
||||||
CACHIX_CACHE: ares
|
|
||||||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
||||||
|
|
||||||
- run: mingw32-make build/urbit
|
|
||||||
- run: mingw32-make test
|
|
||||||
- run: >
|
|
||||||
build/urbit -l -d -B ../../bin/solid.pill -F bus &&
|
|
||||||
curl -f --data '{"source":{"dojo":"+hood/exit"},"sink":{"app":"hood"}}'
|
|
||||||
http://localhost:12321
|
|
||||||
|
|
||||||
- name: confirm binary is mostly static
|
|
||||||
run: |
|
|
||||||
if [ -z "$(ldd build/urbit | grep -vi "windows/system32")"]; then
|
|
||||||
echo "it's mostly static"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "dynamic links found:"
|
|
||||||
ldd build/urbit
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
if: inputs.upload
|
|
||||||
with:
|
|
||||||
python-version: 3.7
|
|
||||||
|
|
||||||
- uses: google-github-actions/setup-gcloud@v0.6.0
|
|
||||||
if: inputs.upload
|
|
||||||
env:
|
|
||||||
# see https://github.com/google-github-actions/setup-gcloud/issues/100
|
|
||||||
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
|
|
||||||
with:
|
|
||||||
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
|
|
||||||
project_id: ${{ secrets.GCS_PROJECT }}
|
|
||||||
export_default_credentials: true
|
|
||||||
|
|
||||||
- name: upload binary to bootstrap.urbit.org
|
|
||||||
if: inputs.upload
|
|
||||||
env:
|
|
||||||
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [ "real" == "$VERSION_TYPE" ]; then
|
|
||||||
version="$(cat ./version)"
|
|
||||||
else
|
|
||||||
version="${GITHUB_SHA:0:9}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
system="x86_64-windows"
|
|
||||||
target="gs://${UPLOAD_BASE}/${VERE_PACE}/${version}/vere-v${version}-${system}.exe"
|
|
||||||
|
|
||||||
gsutil cp -n ./build/urbit.exe "$target"
|
|
||||||
exitcode=$?
|
|
||||||
|
|
||||||
test $exitcode -eq 0 &&
|
|
||||||
echo "upload to $target complete." ||
|
|
||||||
echo "upload to $target failed.";
|
|
||||||
exit $exitcode
|
|
||||||
|
|
||||||
|
|
||||||
after:
|
after:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [urbit, mingw]
|
needs: [urbit]
|
||||||
if: inputs.upload
|
if: inputs.upload
|
||||||
steps:
|
steps:
|
||||||
- uses: google-github-actions/setup-gcloud@v0.2.0
|
- uses: google-github-actions/setup-gcloud@v0.2.0
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:3306a5b916caa838c67cb079410c6e5bb158054520129ffb9f9bdb144ab1b691
|
oid sha256:ea8626444e4f0213e39c21ded20607145ee85a947afc592f182f46e7f598ef30
|
||||||
size 7418493
|
size 7748671
|
||||||
|
@ -394,7 +394,10 @@
|
|||||||
:: !=(%kids desk)
|
:: !=(%kids desk)
|
||||||
:: ==
|
:: ==
|
||||||
:: [dap.bowl %no-docket-file-for desk]
|
:: [dap.bowl %no-docket-file-for desk]
|
||||||
`state
|
?. (~(has by charges) desk)
|
||||||
|
`state
|
||||||
|
:- ~[del-fact:cha]
|
||||||
|
state(charges (~(del by charges) desk))
|
||||||
:: always update the docket in state to match clay's
|
:: always update the docket in state to match clay's
|
||||||
::
|
::
|
||||||
=/ =docket docket:cha
|
=/ =docket docket:cha
|
||||||
|
@ -26,6 +26,7 @@ interface NoteProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function NoteContent({ post }) {
|
export function NoteContent({ post }) {
|
||||||
|
console.log(post.contents);
|
||||||
return (
|
return (
|
||||||
<Box color="black" className="md" style={{ overflowWrap: 'break-word', overflow: 'hidden' }}>
|
<Box color="black" className="md" style={{ overflowWrap: 'break-word', overflow: 'hidden' }}>
|
||||||
<GraphContent tall={true} contents={post.contents.slice(1)} showOurContact />
|
<GraphContent tall={true} contents={post.contents.slice(1)} showOurContact />
|
||||||
|
@ -123,7 +123,15 @@
|
|||||||
:: ensure difference
|
:: ensure difference
|
||||||
=/ old=(unit contact:store) (~(get by rolodex) ship)
|
=/ old=(unit contact:store) (~(get by rolodex) ship)
|
||||||
?. ?| ?=(~ old)
|
?. ?| ?=(~ old)
|
||||||
!=(contact(last-updated *@da) u.old(last-updated *@da))
|
:: if new contact is before existing contact, no-op
|
||||||
|
::
|
||||||
|
:: NB: last-updated.contact is often *@da, so this
|
||||||
|
:: effectively stops add from applying if we already have
|
||||||
|
:: a contact for them
|
||||||
|
::
|
||||||
|
?& (gth last-updated.contact last-updated.u.old)
|
||||||
|
!=(contact(last-updated *@da) u.old(last-updated *@da))
|
||||||
|
==
|
||||||
==
|
==
|
||||||
[~ state]
|
[~ state]
|
||||||
~| "cannot add a data url to cover!"
|
~| "cannot add a data url to cover!"
|
||||||
|
@ -54,12 +54,7 @@
|
|||||||
++ on-pull-nack
|
++ on-pull-nack
|
||||||
|= [=resource =tang]
|
|= [=resource =tang]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
%- (slog leaf+"nacked {<resource>}" tang)
|
`this
|
||||||
:_ this
|
|
||||||
?. (~(has in get-keys:gra) resource) ~
|
|
||||||
=- [%pass /pull-nack %agent [our.bowl %graph-store] %poke %graph-update-3 -]~
|
|
||||||
!> ^- update:store
|
|
||||||
[now.bowl [%archive-graph resource]]
|
|
||||||
::
|
::
|
||||||
++ on-pull-kick
|
++ on-pull-kick
|
||||||
|= =resource
|
|= =resource
|
||||||
|
@ -11,16 +11,17 @@
|
|||||||
[%3 network:one:store]
|
[%3 network:one:store]
|
||||||
[%4 network:store]
|
[%4 network:store]
|
||||||
[%5 network:store]
|
[%5 network:store]
|
||||||
state-6
|
[%6 network:store]
|
||||||
|
state-7
|
||||||
==
|
==
|
||||||
::-
|
::-
|
||||||
+$ state-6 [%6 network:store]
|
+$ state-7 [%7 network:store]
|
||||||
++ orm orm:store
|
++ orm orm:store
|
||||||
++ orm-log orm-log:store
|
++ orm-log orm-log:store
|
||||||
++ mar %graph-update-3
|
++ mar %graph-update-3
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
=| state-6
|
=| state-7
|
||||||
=* state -
|
=* state -
|
||||||
::
|
::
|
||||||
%- agent:dbug
|
%- agent:dbug
|
||||||
@ -96,7 +97,43 @@
|
|||||||
(scag 2 (tap:orm-log update-log))
|
(scag 2 (tap:orm-log update-log))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%6 [cards this(state old)]
|
%6
|
||||||
|
=/ old-dms
|
||||||
|
%- ~(gas by *(map resource:store marked-graph:store))
|
||||||
|
%+ skim ~(tap by graphs.old)
|
||||||
|
|=([r=resource:store *] (is-old-dm:upgrade:store r))
|
||||||
|
=/ backup (backup:upgrade:store bowl)
|
||||||
|
%_ $
|
||||||
|
-.old %7
|
||||||
|
archive.old ~
|
||||||
|
update-logs.old
|
||||||
|
%- ~(gas by *(map resource:store update-log:store))
|
||||||
|
%+ murn ~(tap by update-logs.old)
|
||||||
|
|= [r=resource:store =update-log:store]
|
||||||
|
?: (is-old-dm:upgrade:store r)
|
||||||
|
~
|
||||||
|
`[r (strip-sigs-log:upgrade:store update-log)]
|
||||||
|
::
|
||||||
|
graphs.old
|
||||||
|
%- ~(gas by *(map resource:store marked-graph:store))
|
||||||
|
%+ murn ~(tap by graphs.old)
|
||||||
|
|= [r=resource:store =graph:store mar=(unit mark)]
|
||||||
|
?: (is-old-dm:upgrade:store r)
|
||||||
|
~
|
||||||
|
`[r (strip-sigs-graph:upgrade:store graph) mar]
|
||||||
|
::
|
||||||
|
cards
|
||||||
|
;: welp
|
||||||
|
cards
|
||||||
|
::
|
||||||
|
(nuke-groups:upgrade:store bowl)
|
||||||
|
::
|
||||||
|
(turn ~(tap by archive.old) backup)
|
||||||
|
(turn ~(tap by old-dms) backup)
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
%7 [cards this(state old)]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ on-watch
|
++ on-watch
|
||||||
@ -129,9 +166,21 @@
|
|||||||
?+ mark (on-poke:def mark vase)
|
?+ mark (on-poke:def mark vase)
|
||||||
%graph-update-3 (graph-update !<(update:store vase))
|
%graph-update-3 (graph-update !<(update:store vase))
|
||||||
%import (poke-import q.vase)
|
%import (poke-import q.vase)
|
||||||
|
%migrated (poke-migrated !<(resource:store vase))
|
||||||
==
|
==
|
||||||
[cards this]
|
[cards this]
|
||||||
::
|
::
|
||||||
|
++ poke-migrated
|
||||||
|
|= r=resource:res
|
||||||
|
^- (quip card _state)
|
||||||
|
=/ =path /(rap 3 'backup-' (scot %p entity.r) '-' name.r ~)/noun
|
||||||
|
=/ graph (~(got by graphs) r)
|
||||||
|
:- [%pass /migrate %agent [our.bowl %hood] %poke drum-put+!>([path (jam r graph)])]~
|
||||||
|
%_ state
|
||||||
|
graphs (~(del by graphs) r)
|
||||||
|
update-logs (~(del by update-logs) r)
|
||||||
|
==
|
||||||
|
::
|
||||||
++ graph-update
|
++ graph-update
|
||||||
|= =update:store
|
|= =update:store
|
||||||
^- (quip card _state)
|
^- (quip card _state)
|
||||||
|
@ -45,10 +45,7 @@
|
|||||||
++ on-pull-nack
|
++ on-pull-nack
|
||||||
|= [=resource =tang]
|
|= [=resource =tang]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
%- (slog tang)
|
`this
|
||||||
:_ this
|
|
||||||
=- [%pass / %agent [our.bowl %group-store] %poke -]~
|
|
||||||
group-update-0+!>([%remove-group resource ~])
|
|
||||||
::
|
::
|
||||||
++ on-pull-kick
|
++ on-pull-kick
|
||||||
|= =resource
|
|= =resource
|
||||||
|
@ -31,13 +31,17 @@
|
|||||||
::
|
::
|
||||||
/- *group
|
/- *group
|
||||||
/+ store=group-store, default-agent, verb, dbug, resource, *migrate, agentio
|
/+ store=group-store, default-agent, verb, dbug, resource, *migrate, agentio
|
||||||
|
/+ gladio
|
||||||
|%
|
|%
|
||||||
+$ card card:agent:gall
|
+$ card card:agent:gall
|
||||||
|
++ ota-host ~sogryp-dister-dozzod-dozzod
|
||||||
::
|
::
|
||||||
+$ versioned-state
|
+$ versioned-state
|
||||||
$% state-zero
|
$% state-zero
|
||||||
state-one
|
state-one
|
||||||
state-two
|
state-two
|
||||||
|
state-three
|
||||||
|
state-four
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ state-zero
|
+$ state-zero
|
||||||
@ -52,13 +56,25 @@
|
|||||||
$: %2
|
$: %2
|
||||||
=groups
|
=groups
|
||||||
==
|
==
|
||||||
|
::
|
||||||
|
+$ state-three
|
||||||
|
$: %3
|
||||||
|
=groups
|
||||||
|
wait=(set ship)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ state-four
|
||||||
|
$: %4
|
||||||
|
=groups
|
||||||
|
wait=(set ship)
|
||||||
|
==
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
=| state-two
|
=| state-four
|
||||||
=* state -
|
=* state -
|
||||||
::
|
::
|
||||||
%- agent:dbug
|
%- agent:dbug
|
||||||
%+ verb |
|
%+ verb &
|
||||||
^- agent:gall
|
^- agent:gall
|
||||||
=<
|
=<
|
||||||
|_ =bowl:gall
|
|_ =bowl:gall
|
||||||
@ -72,10 +88,32 @@
|
|||||||
++ on-load
|
++ on-load
|
||||||
|= =old=vase
|
|= =old=vase
|
||||||
=/ old !<(versioned-state old-vase)
|
=/ old !<(versioned-state old-vase)
|
||||||
|
=| cards=(list card)
|
||||||
|^
|
|^
|
||||||
?- -.old
|
?- -.old
|
||||||
%2 `this(state old)
|
%4 [(flop cards) this(state old)]
|
||||||
::
|
::
|
||||||
|
%3
|
||||||
|
%_ $
|
||||||
|
old [%4 +.old]
|
||||||
|
cards
|
||||||
|
:_ cards
|
||||||
|
[%pass /pyre/rebuild %agent [our dap]:bowl %poke noun+!>(%rebuild)]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
%2
|
||||||
|
%_ $
|
||||||
|
old [%3 groups.old ~]
|
||||||
|
cards
|
||||||
|
%- welp
|
||||||
|
:_ cards
|
||||||
|
:~ [%pass /pyre/export %agent [our dap]:bowl %poke noun+!>(%export)]
|
||||||
|
[%pass /pyre/migrate %agent [our dap]:bowl %poke noun+!>(%migrate)]
|
||||||
|
[%pass / %agent [our %hood]:bowl %poke %kiln-install !>([%groups ota-host %groups])]
|
||||||
|
[%pass / %agent [our %hood]:bowl %poke %kiln-install !>([%talk ota-host %talk])]
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
%1
|
%1
|
||||||
%_ $
|
%_ $
|
||||||
-.old %2
|
-.old %2
|
||||||
@ -112,6 +150,13 @@
|
|||||||
=^ cards state
|
=^ cards state
|
||||||
?+ mark (on-poke:def mark vase)
|
?+ mark (on-poke:def mark vase)
|
||||||
%sane (poke-sane:gc !<(?(%check %fix) vase))
|
%sane (poke-sane:gc !<(?(%check %fix) vase))
|
||||||
|
::
|
||||||
|
%noun
|
||||||
|
?+ q.vase !!
|
||||||
|
%migrate poke-migrate:gc
|
||||||
|
%export poke-export:gc
|
||||||
|
%rebuild poke-rebuild:gc
|
||||||
|
==
|
||||||
::
|
::
|
||||||
?(%group-update-0 %group-action)
|
?(%group-update-0 %group-action)
|
||||||
(poke-group-update:gc !<(update:store vase))
|
(poke-group-update:gc !<(update:store vase))
|
||||||
@ -125,6 +170,8 @@
|
|||||||
|= =path
|
|= =path
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
?> (team:title our.bowl src.bowl)
|
?> (team:title our.bowl src.bowl)
|
||||||
|
?: ?=([%wait ~] path)
|
||||||
|
`this
|
||||||
?> ?=([%groups ~] path)
|
?> ?=([%groups ~] path)
|
||||||
:_ this
|
:_ this
|
||||||
[%give %fact ~ %group-update-0 !>([%initial groups])]~
|
[%give %fact ~ %group-update-0 !>([%initial groups])]~
|
||||||
@ -135,6 +182,8 @@
|
|||||||
|= =path
|
|= =path
|
||||||
^- (unit (unit cage))
|
^- (unit (unit cage))
|
||||||
?+ path (on-peek:def path)
|
?+ path (on-peek:def path)
|
||||||
|
[%x %wait ~]
|
||||||
|
``ships+!>(~(tap in wait))
|
||||||
[%y %groups ~]
|
[%y %groups ~]
|
||||||
``noun+!>(`(set resource)`~(key by groups))
|
``noun+!>(`(set resource)`~(key by groups))
|
||||||
::
|
::
|
||||||
@ -159,28 +208,38 @@
|
|||||||
++ on-agent
|
++ on-agent
|
||||||
|= [=wire =sign:agent:gall]
|
|= [=wire =sign:agent:gall]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
?. ?=([%try-rejoin @ *] wire)
|
=^ cards state
|
||||||
(on-agent:def wire sign)
|
?+ wire [- state]:(on-agent:def wire sign)
|
||||||
?> ?=(%poke-ack -.sign)
|
[%pyre *] (take-pyre:gc t.wire sign)
|
||||||
=/ rid=resource (de-path:resource t.t.wire)
|
[%gladio @ ~] (take-migrate:gc sign)
|
||||||
?~ p.sign
|
::
|
||||||
=/ =cage
|
[%try-rejoin @ *]
|
||||||
[%pull-hook-action !>([%add entity.rid rid])]
|
?> ?=(%poke-ack -.sign)
|
||||||
:_ this
|
=/ rid=resource (de-path:resource t.t.wire)
|
||||||
[%pass / %agent [our.bowl %group-pull-hook] %poke cage]~
|
?~ p.sign
|
||||||
=/ nack-count=@ud (slav %ud i.t.wire)
|
=/ =cage
|
||||||
=/ wakeup=@da
|
[%pull-hook-action !>([%add entity.rid rid])]
|
||||||
(add now.bowl (mul ~s1 (bex (min 19 nack-count))))
|
:_ state
|
||||||
:_ this
|
[%pass / %agent [our.bowl %group-pull-hook] %poke cage]~
|
||||||
[%pass wire %arvo %b %wait wakeup]~
|
=/ nack-count=@ud (slav %ud i.t.wire)
|
||||||
|
=/ wakeup=@da
|
||||||
|
(add now.bowl (mul ~s1 (bex (min 19 nack-count))))
|
||||||
|
:_ state
|
||||||
|
[%pass wire %arvo %b %wait wakeup]~
|
||||||
|
==
|
||||||
|
[cards this]
|
||||||
::
|
::
|
||||||
++ on-arvo
|
++ on-arvo
|
||||||
|= [=wire =sign-arvo]
|
|= [=(pole knot) =sign-arvo]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
?. ?=([%try-rejoin @ *] wire)
|
?: ?=([%gladio %backoff ship=@ ~] pole)
|
||||||
(on-arvo:def wire sign-arvo)
|
=^ cards state
|
||||||
=/ =resource (de-path:resource t.t.wire)
|
(take-backoff:gc (slav %p ship.pole) sign-arvo)
|
||||||
=/ nack-count=@ud (slav %ud i.t.wire)
|
[cards this]
|
||||||
|
?. ?=([%try-rejoin count=@ res=*] pole)
|
||||||
|
(on-arvo:def pole sign-arvo)
|
||||||
|
=/ =resource (de-path:resource res.pole)
|
||||||
|
=/ nack-count=@ud (slav %ud count.pole)
|
||||||
?> ?=([%behn %wake *] sign-arvo)
|
?> ?=([%behn %wake *] sign-arvo)
|
||||||
~? ?=(^ error.sign-arvo)
|
~? ?=(^ error.sign-arvo)
|
||||||
"behn errored in backoff timers, continuing anyway"
|
"behn errored in backoff timers, continuing anyway"
|
||||||
@ -192,6 +251,107 @@
|
|||||||
::
|
::
|
||||||
|_ bol=bowl:gall
|
|_ bol=bowl:gall
|
||||||
+* io ~(. agentio bol)
|
+* io ~(. agentio bol)
|
||||||
|
++ poke-rebuild
|
||||||
|
^- (quip card _state)
|
||||||
|
|^
|
||||||
|
=. wait
|
||||||
|
put-missing
|
||||||
|
=^ cards state
|
||||||
|
rewatch
|
||||||
|
[cards state]
|
||||||
|
::
|
||||||
|
++ rewatch
|
||||||
|
=/ wait ~(tap in wait)
|
||||||
|
=| cards=(list card)
|
||||||
|
|-
|
||||||
|
?~ wait
|
||||||
|
[cards state]
|
||||||
|
=/ wir /gladio/(scot %p i.wait)
|
||||||
|
=. cards
|
||||||
|
:_(cards (watch-init-migrate i.wait))
|
||||||
|
:: if we have a subscription already, leave first to restart
|
||||||
|
=? cards
|
||||||
|
(~(has by wex.bol) [wir i.wait %groups])
|
||||||
|
:_(cards [%pass wir %agent [i.wait %groups] %leave ~])
|
||||||
|
$(wait t.wait)
|
||||||
|
::
|
||||||
|
++ put-missing
|
||||||
|
=/ wex ~(tap by wex.bol)
|
||||||
|
|-
|
||||||
|
?~ wex
|
||||||
|
wait
|
||||||
|
=/ [[=wire =ship =term] [acked=? =(pole knot)]]
|
||||||
|
i.wex
|
||||||
|
?. ?=([%gladio ship=@ ~] pole)
|
||||||
|
$(wex t.wex)
|
||||||
|
$(wex t.wex, wait (~(put in wait) (slav %p ship.pole)))
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ poke-export
|
||||||
|
^- (quip card _state)
|
||||||
|
:_ state
|
||||||
|
=; =cage
|
||||||
|
[%pass /export %agent [our.bol %hood] %poke cage]~
|
||||||
|
drum-put+!>([/groups/jam ~(export gladio bol)])
|
||||||
|
::
|
||||||
|
++ poke-migrate
|
||||||
|
^- (quip card _state)
|
||||||
|
=^ cards-1=(list card) wait
|
||||||
|
(~(migrate-start gladio bol) wait)
|
||||||
|
=/ cards-2=(list card)
|
||||||
|
(turn ~(tap in wait) watch-init-migrate)
|
||||||
|
=/ cards (welp cards-1 cards-2)
|
||||||
|
[cards state(wait wait)]
|
||||||
|
::
|
||||||
|
++ watch-init-migrate
|
||||||
|
|= =ship
|
||||||
|
^- card
|
||||||
|
[%pass /gladio/(scot %p ship) %agent [ship %groups] %watch /init]
|
||||||
|
::
|
||||||
|
++ backoff-migrate
|
||||||
|
|= =ship
|
||||||
|
^- card
|
||||||
|
[%pass /gladio/backoff/(scot %p ship) %arvo %b %wait (add ~h1 now.bol)]
|
||||||
|
::
|
||||||
|
++ take-pyre
|
||||||
|
|= [=wire =sign:agent:gall]
|
||||||
|
^- (quip card _state)
|
||||||
|
:_ state
|
||||||
|
?> ?=(%poke-ack -.sign)
|
||||||
|
?~ p.sign
|
||||||
|
~
|
||||||
|
[%pass / %pyre leaf/"{<wire>} failed" u.p.sign]~
|
||||||
|
::
|
||||||
|
++ take-backoff
|
||||||
|
|= [=ship sign=sign-arvo]
|
||||||
|
^- (quip card _state)
|
||||||
|
?> ?=([%behn %wake *] sign)
|
||||||
|
?: ?=(^ error.sign)
|
||||||
|
`state
|
||||||
|
:_ state
|
||||||
|
~[(watch-init-migrate ship)]
|
||||||
|
::
|
||||||
|
++ take-migrate
|
||||||
|
|= =sign:agent:gall
|
||||||
|
^- (quip card _state)
|
||||||
|
?. (~(has in wait) src.bol)
|
||||||
|
:: already succeeded
|
||||||
|
`state
|
||||||
|
?- -.sign
|
||||||
|
?(%poke-ack %fact) `state
|
||||||
|
%kick :_(state (watch-init-migrate src.bol)^~)
|
||||||
|
%watch-ack
|
||||||
|
?~ p.sign
|
||||||
|
:: they have public release
|
||||||
|
~& migrating/src.bol
|
||||||
|
=. wait (~(del in wait) src.bol)
|
||||||
|
:_ state
|
||||||
|
:- [%give %fact ~[/wait] ships+!>(~(tap in wait))]
|
||||||
|
(~(migrate-ship gladio bol) src.bol)
|
||||||
|
:_ state
|
||||||
|
~[(backoff-migrate src.bol)]
|
||||||
|
==
|
||||||
|
::
|
||||||
++ peek-group
|
++ peek-group
|
||||||
|= rid=resource
|
|= rid=resource
|
||||||
^- (unit group)
|
^- (unit group)
|
||||||
@ -243,8 +403,8 @@
|
|||||||
|= arc=*
|
|= arc=*
|
||||||
^- (quip card _state)
|
^- (quip card _state)
|
||||||
|^
|
|^
|
||||||
=/ sty=state-two
|
=/ sty=state-four
|
||||||
[%2 (remake-groups ;;((tree [resource tree-group]) +.arc))]
|
[%4 (remake-groups ;;((tree [resource tree-group]) +.arc)) ~]
|
||||||
:_ sty
|
:_ sty
|
||||||
%+ roll ~(tap by groups.sty)
|
%+ roll ~(tap by groups.sty)
|
||||||
|= [[rid=resource grp=group] out=(list card)]
|
|= [[rid=resource grp=group] out=(list card)]
|
||||||
|
@ -321,15 +321,7 @@
|
|||||||
++ on-pull-nack
|
++ on-pull-nack
|
||||||
|= [=resource =tang]
|
|= [=resource =tang]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
=/ =associations:metadata
|
`this
|
||||||
(metadata-for-group:met resource)
|
|
||||||
:_ this
|
|
||||||
%+ turn ~(tap by associations)
|
|
||||||
|= [=md-resource:metadata =association:metadata]
|
|
||||||
%+ poke-our:pass:io:hc %metadata-store
|
|
||||||
:- %metadata-update-2
|
|
||||||
!> ^- update:metadata
|
|
||||||
[%remove resource md-resource]
|
|
||||||
::
|
::
|
||||||
++ on-pull-kick
|
++ on-pull-kick
|
||||||
|= =resource
|
|= =resource
|
||||||
|
@ -9,12 +9,14 @@
|
|||||||
+$ card card:agent:gall
|
+$ card card:agent:gall
|
||||||
+$ versioned-state
|
+$ versioned-state
|
||||||
$% state-zero
|
$% state-zero
|
||||||
|
state-one
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ state-zero [%0 =credentials =configuration]
|
+$ state-zero [%0 =credentials:zero:past =configuration:zero:past]
|
||||||
|
+$ state-one [%1 =credentials =configuration]
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
=| state-zero
|
=| state-one
|
||||||
=* state -
|
=* state -
|
||||||
::
|
::
|
||||||
%- agent:dbug
|
%- agent:dbug
|
||||||
@ -28,8 +30,28 @@
|
|||||||
++ on-init on-init:def
|
++ on-init on-init:def
|
||||||
++ on-save !>(state)
|
++ on-save !>(state)
|
||||||
++ on-load
|
++ on-load
|
||||||
|= old-vase=vase
|
|= =vase
|
||||||
[~ this(state !<(state-zero old-vase))]
|
=/ old !<(versioned-state vase)
|
||||||
|
|^
|
||||||
|
?- -.old
|
||||||
|
%1 `this(state old)
|
||||||
|
%0 `this(state (state-0-to-1 old))
|
||||||
|
==
|
||||||
|
++ state-0-to-1
|
||||||
|
|= zer=state-zero
|
||||||
|
^- state-one
|
||||||
|
:* %1
|
||||||
|
credentials.zer
|
||||||
|
(configuration-0-to-1 configuration.zer)
|
||||||
|
==
|
||||||
|
++ configuration-0-to-1
|
||||||
|
|= conf=configuration:zero:past
|
||||||
|
^- ^configuration
|
||||||
|
:* buckets.conf
|
||||||
|
current-bucket.conf
|
||||||
|
''
|
||||||
|
==
|
||||||
|
--
|
||||||
::
|
::
|
||||||
++ on-poke
|
++ on-poke
|
||||||
~/ %s3-poke
|
~/ %s3-poke
|
||||||
@ -56,6 +78,9 @@
|
|||||||
::
|
::
|
||||||
%set-secret-access-key
|
%set-secret-access-key
|
||||||
state(secret-access-key.credentials secret-access-key.act)
|
state(secret-access-key.credentials secret-access-key.act)
|
||||||
|
::
|
||||||
|
%set-region
|
||||||
|
state(region.configuration region.act)
|
||||||
::
|
::
|
||||||
%set-current-bucket
|
%set-current-bucket
|
||||||
%_ state
|
%_ state
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
:~ title+'Groups'
|
|
||||||
info+'A suite of applications to communicate on Urbit'
|
|
||||||
color+0xee.5432
|
|
||||||
glob-http+['https://bootstrap.urbit.org/glob-0v7.2rpmd.966js.dt2sj.ggv4a.n15nq.glob' 0v7.2rpmd.966js.dt2sj.ggv4a.n15nq]
|
|
||||||
|
|
||||||
base+'landscape'
|
|
||||||
version+[1 1 0]
|
|
||||||
website+'https://tlon.io'
|
|
||||||
license+'MIT'
|
|
||||||
==
|
|
10
pkg/landscape/gen/s3-store/set-region.hoon
Normal file
10
pkg/landscape/gen/s3-store/set-region.hoon
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
:: s3-store|set-current-bucket: set current bucket for S3
|
||||||
|
::
|
||||||
|
/- *s3
|
||||||
|
:- %say
|
||||||
|
|= $: [now=@da eny=@uvJ =beak]
|
||||||
|
[[region=@t ~] ~]
|
||||||
|
==
|
||||||
|
:- %s3-action
|
||||||
|
^- action
|
||||||
|
[%set-region region]
|
193
pkg/landscape/lib/gladio.hoon
Normal file
193
pkg/landscape/lib/gladio.hoon
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
:: Migrate scripts
|
||||||
|
/- gra=graph-store
|
||||||
|
/- met=metadata-store
|
||||||
|
/- grp=group-store
|
||||||
|
/- i=migrate
|
||||||
|
/- *group
|
||||||
|
|_ =bowl:gall
|
||||||
|
+$ card card:agent:gall
|
||||||
|
:: if false, indicates that OTA should be done in one go, in order to
|
||||||
|
:: allow for testing on partial testnets
|
||||||
|
++ split-ota &
|
||||||
|
++ import-club
|
||||||
|
|= [=^groups =associations:met =network:gra]
|
||||||
|
%- ~(gas by *imports:club:i)
|
||||||
|
%+ murn ~(tap by graphs.network)
|
||||||
|
|= [=flag:i graph=graph:gra mar=(unit mark)]
|
||||||
|
^- (unit [flag:i import:club:i])
|
||||||
|
?. =(mar `%graph-validator-chat)
|
||||||
|
~
|
||||||
|
?~ assoc=(~(get by associations) [%graph flag])
|
||||||
|
~& missing-assoc-club/flag
|
||||||
|
~
|
||||||
|
?~ group=(~(get by groups) group.u.assoc)
|
||||||
|
~& missing-group/[flag group.u.assoc]
|
||||||
|
~
|
||||||
|
?. hidden.u.group
|
||||||
|
~
|
||||||
|
`[flag members.u.group u.assoc graph]
|
||||||
|
::
|
||||||
|
++ import-flags
|
||||||
|
|= [our=ship =^groups =associations:met =network:gra]
|
||||||
|
|= =mark
|
||||||
|
^- (set flag:i)
|
||||||
|
%- ~(gas in *(set flag:i))
|
||||||
|
%+ skim
|
||||||
|
~(tap in ~(key by ((import-for-mark ~ groups associations network) mark)))
|
||||||
|
|= =flag:i
|
||||||
|
!=(our p.flag)
|
||||||
|
::
|
||||||
|
++ import-for-mark
|
||||||
|
|= [her=(unit ship) =^groups =associations:met =network:gra]
|
||||||
|
|= =mark
|
||||||
|
^- imports:graph:i
|
||||||
|
%- ~(gas by *imports:graph:i)
|
||||||
|
%+ murn ~(tap by graphs.network)
|
||||||
|
|= [=flag:i graph=graph:gra mar=(unit ^mark)]
|
||||||
|
?. |(=(`p.flag her) =(her ~))
|
||||||
|
~
|
||||||
|
?. =(mar `mark) :: XX: correct detection?
|
||||||
|
~
|
||||||
|
?~ assoc=(~(get by associations) [%graph flag])
|
||||||
|
~& missing-assoc/flag^mark
|
||||||
|
~
|
||||||
|
?~ group=(~(get by groups) group.u.assoc)
|
||||||
|
~& missing-group/[flag group.u.assoc]
|
||||||
|
~
|
||||||
|
?: hidden.u.group
|
||||||
|
~
|
||||||
|
=/ writers=(set ship)
|
||||||
|
(~(get ju tags.u.group) %graph flag %writers)
|
||||||
|
?~ log=(~(get by update-logs.network) flag)
|
||||||
|
~& missing-log/flag :: XX: doesn't need to fail, but suspect case
|
||||||
|
~
|
||||||
|
`[flag writers u.assoc u.log graph]
|
||||||
|
|
||||||
|
++ scry
|
||||||
|
|= [=dude:gall =path]
|
||||||
|
%- welp
|
||||||
|
:_ path
|
||||||
|
/gx/(scot %p our.bowl)/[dude]/(scot %da now.bowl)
|
||||||
|
++ groups
|
||||||
|
~+ .^([@ =^groups *] (scry %group-store /export/noun))
|
||||||
|
++ groups-raw
|
||||||
|
.^(* (scry %group-store /export/noun))
|
||||||
|
++ network
|
||||||
|
~+ .^([@ =network:gra] (scry %graph-store /export/noun))
|
||||||
|
++ network-raw
|
||||||
|
.^(* (scry %graph-store /export/noun))
|
||||||
|
++ associations
|
||||||
|
~+ .^([@ =associations:met ~] (scry %metadata-store /export/noun))
|
||||||
|
++ associations-raw
|
||||||
|
.^(* (scry %metadata-store /export/noun))
|
||||||
|
++ export
|
||||||
|
%- jam
|
||||||
|
^- *
|
||||||
|
:~ [%group-store groups-raw]
|
||||||
|
[%metadata-store associations-raw]
|
||||||
|
==
|
||||||
|
++ peers
|
||||||
|
|= =network:gra
|
||||||
|
=- (~(del in -) our.bowl)
|
||||||
|
%- ~(gas in *(set ship))
|
||||||
|
(turn ~(tap in ~(key by graphs.network)) head)
|
||||||
|
++ poke-our
|
||||||
|
|= [=dude:gall =cage]
|
||||||
|
[%pass /gladio %agent [our.bowl dude] %poke cage]
|
||||||
|
++ migrate-start
|
||||||
|
|= wait=(set ship)
|
||||||
|
^- (quip card (set ship))
|
||||||
|
=+ network
|
||||||
|
=+ associations
|
||||||
|
=+ groups
|
||||||
|
=/ ships (peers network)
|
||||||
|
=/ dms (~(get by graphs:network) [our.bowl %dm-inbox])
|
||||||
|
=/ import (import-for-mark `our.bowl groups associations network)
|
||||||
|
=/ clubs (import-club groups associations network)
|
||||||
|
=/ chats=imports:graph:i
|
||||||
|
(import %graph-validator-chat)
|
||||||
|
=/ diarys=imports:graph:i
|
||||||
|
(import %graph-validator-publish)
|
||||||
|
=/ links=imports:graph:i
|
||||||
|
(import %graph-validator-link)
|
||||||
|
=/ =imports:groups:i
|
||||||
|
%- ~(gas by *imports:groups:i)
|
||||||
|
%+ murn ~(tap by groups)
|
||||||
|
|= [=flag:i =group]
|
||||||
|
^- (unit [_flag import:groups:i])
|
||||||
|
?: hidden.group
|
||||||
|
~
|
||||||
|
?~ assoc=(~(get by associations) [%groups flag])
|
||||||
|
~& missing-group-assoc/flag
|
||||||
|
~
|
||||||
|
=/ chans=(map flag:i association:met)
|
||||||
|
%- ~(gas by *(map flag:i association:met))
|
||||||
|
%+ murn ~(tap by associations)
|
||||||
|
|= [res=md-resource:met ass=association:met]
|
||||||
|
^- (unit [flag:i association:met])
|
||||||
|
?. =(group.ass flag) ~
|
||||||
|
`[resource.res ass]
|
||||||
|
=/ roles=(set flag:i)
|
||||||
|
%- ~(gas in *(set flag:i))
|
||||||
|
%+ murn ~(tap by chans)
|
||||||
|
|= [=flag:i =association:met]
|
||||||
|
^- (unit flag:i)
|
||||||
|
?^ link=(~(get by links) flag)
|
||||||
|
?: =(writers.u.link ~) ~
|
||||||
|
`flag
|
||||||
|
?^ diary=(~(get by diarys) flag)
|
||||||
|
?: =(writers.u.diary ~) ~
|
||||||
|
`flag
|
||||||
|
?^ chat=(~(get by chats) flag)
|
||||||
|
?: =(writers.u.chat ~) ~
|
||||||
|
`flag
|
||||||
|
~
|
||||||
|
`[flag u.assoc chans roles group]
|
||||||
|
=/ dms (~(get by graphs:network) [our.bowl %dm-inbox])
|
||||||
|
=/ flag-importer (import-flags our.bowl groups associations network)
|
||||||
|
=+ :* chat-flags=(flag-importer %graph-validator-chat)
|
||||||
|
heap-flags=(flag-importer %graph-validator-link)
|
||||||
|
diary-flags=(flag-importer %graph-validator-publish)
|
||||||
|
==
|
||||||
|
=/ setup=(list card)
|
||||||
|
%+ welp (migrate-ship our.bowl)
|
||||||
|
:* (poke-our %groups group-import+!>(imports))
|
||||||
|
(poke-our %chat import-flags+!>(chat-flags))
|
||||||
|
(poke-our %heap import-flags+!>(heap-flags))
|
||||||
|
(poke-our %diary import-flags+!>(diary-flags))
|
||||||
|
(poke-our %chat club-imports+!>(clubs))
|
||||||
|
?~ dms ~
|
||||||
|
(poke-our %chat dm-imports+!>(p.u.dms))^~
|
||||||
|
==
|
||||||
|
?. split-ota
|
||||||
|
:_ ~
|
||||||
|
(welp setup (zing (turn ~(tap in (~(del in ships) our.bowl)) migrate-ship)))
|
||||||
|
[setup (~(uni in ships) wait)]
|
||||||
|
::
|
||||||
|
++ migrate-ship
|
||||||
|
|= her=ship
|
||||||
|
^- (list card)
|
||||||
|
=+ groups
|
||||||
|
=+ network
|
||||||
|
=+ associations
|
||||||
|
=/ import (import-for-mark `her groups associations network)
|
||||||
|
=/ chats=imports:graph:i
|
||||||
|
(import %graph-validator-chat)
|
||||||
|
=/ diarys=imports:graph:i
|
||||||
|
(import %graph-validator-publish)
|
||||||
|
=/ links=imports:graph:i
|
||||||
|
(import %graph-validator-link)
|
||||||
|
=/ graph-flags
|
||||||
|
%. ~(key by links)
|
||||||
|
=- ~(uni in -)
|
||||||
|
(~(uni in ~(key by chats)) ~(key by diarys))
|
||||||
|
%+ welp
|
||||||
|
%+ turn ~(tap in graph-flags)
|
||||||
|
|= =flag:i
|
||||||
|
^- card
|
||||||
|
(poke-our %graph-store migrated+!>(flag))
|
||||||
|
:~ (poke-our %chat graph-imports+!>(chats))
|
||||||
|
(poke-our %diary graph-imports+!>(diarys))
|
||||||
|
(poke-our %heap graph-imports+!>(links))
|
||||||
|
==
|
||||||
|
--
|
@ -528,6 +528,81 @@
|
|||||||
::
|
::
|
||||||
++ upgrade
|
++ upgrade
|
||||||
|%
|
|%
|
||||||
|
++ is-old-dm |=(r=resource =('dm--' (end [3 4] name.r)))
|
||||||
|
++ backup
|
||||||
|
|= =bowl:gall
|
||||||
|
|= [r=resource m=marked-graph]
|
||||||
|
^- card:agent:gall
|
||||||
|
=/ pax /(rap 3 'archive-' (scot %p entity.r) '-' name.r ~)/noun
|
||||||
|
=/ =cage drum-put+!>([pax (jam r m)])
|
||||||
|
[%pass /archive %agent [our.bowl %hood] %poke cage]
|
||||||
|
++ strip-sigs-graph
|
||||||
|
|= g=graph
|
||||||
|
^+ g
|
||||||
|
=* loop $
|
||||||
|
%+ gas:orm *graph
|
||||||
|
%+ turn (tap:orm g)
|
||||||
|
|= [key=@ val=node] :: optional: also strip out deleted messages?
|
||||||
|
=? children.val ?=(%graph -.children.val)
|
||||||
|
[%graph loop(g p.children.val)]
|
||||||
|
:- key
|
||||||
|
?. ?=(%& -.post.val)
|
||||||
|
val
|
||||||
|
val(signatures.p.post ~)
|
||||||
|
++ strip-sigs-log
|
||||||
|
|= u=update-log
|
||||||
|
%+ gas:orm-log *update-log
|
||||||
|
%+ turn (tap:orm-log u)
|
||||||
|
|= [key=@ upd=logged-update]
|
||||||
|
:- key
|
||||||
|
:- p.upd
|
||||||
|
?+ -.q.upd q.upd
|
||||||
|
%add-graph
|
||||||
|
q.upd(graph (strip-sigs-graph graph.q.upd))
|
||||||
|
::
|
||||||
|
%add-signatures
|
||||||
|
q.upd(signatures ~)
|
||||||
|
::
|
||||||
|
%remove-signatures
|
||||||
|
q.upd(signatures ~)
|
||||||
|
::
|
||||||
|
%add-nodes
|
||||||
|
%= q.upd
|
||||||
|
nodes
|
||||||
|
%- ~(run by nodes.q.upd)
|
||||||
|
|= =node
|
||||||
|
^+ node
|
||||||
|
%= node
|
||||||
|
children
|
||||||
|
?. ?=(%graph -.children.node)
|
||||||
|
children.node
|
||||||
|
[%graph (strip-sigs-graph p.children.node)]
|
||||||
|
::
|
||||||
|
post
|
||||||
|
?. ?=(%& -.post.node)
|
||||||
|
post.node
|
||||||
|
=. signatures.p.post.node ~
|
||||||
|
post.node
|
||||||
|
==
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ nuke-groups
|
||||||
|
|= =bowl:gall
|
||||||
|
|^ ^- (list card:agent:gall)
|
||||||
|
?. .^(? (gall-scry %u %groups))
|
||||||
|
~
|
||||||
|
=+ .^(=desk (gall-scry %d %groups))
|
||||||
|
:~ [%pass /nuke %agent [our.bowl %hood] %poke kiln-nuke+!>([desk &])]
|
||||||
|
[%pass /nuke %agent [our.bowl %docket] %poke docket-uninstall+!>(desk)]
|
||||||
|
[%pass /nuke %agent [our.bowl %docket] %poke docket-uninstall+!>(%talk)]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ gall-scry
|
||||||
|
|= [=care:clay dap=dude:gall]
|
||||||
|
^- path
|
||||||
|
/(cat 3 %g care)/(scot %p our.bowl)/[dap]/(scot %da now.bowl)
|
||||||
|
--
|
||||||
::
|
::
|
||||||
:: +two
|
:: +two
|
||||||
::
|
::
|
||||||
@ -758,9 +833,9 @@
|
|||||||
--
|
--
|
||||||
++ import
|
++ import
|
||||||
|= [arc=* our=ship]
|
|= [arc=* our=ship]
|
||||||
^- (quip card:agent:gall [%6 network])
|
^- (quip card:agent:gall [%7 network])
|
||||||
|^
|
|^
|
||||||
=/ sty [%6 (remake-network ;;(tree-network +.arc))]
|
=/ sty [%7 (remake-network ;;(tree-network +.arc))]
|
||||||
:_ sty
|
:_ sty
|
||||||
%+ turn ~(tap by graphs.sty)
|
%+ turn ~(tap by graphs.sty)
|
||||||
|= [rid=resource =marked-graph]
|
|= [rid=resource =marked-graph]
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
:~ [%set-endpoint so:dejs]
|
:~ [%set-endpoint so:dejs]
|
||||||
[%set-access-key-id so:dejs]
|
[%set-access-key-id so:dejs]
|
||||||
[%set-secret-access-key so:dejs]
|
[%set-secret-access-key so:dejs]
|
||||||
|
[%set-region so:dejs]
|
||||||
[%add-bucket so:dejs]
|
[%add-bucket so:dejs]
|
||||||
[%remove-bucket so:dejs]
|
[%remove-bucket so:dejs]
|
||||||
[%set-current-bucket so:dejs]
|
[%set-current-bucket so:dejs]
|
||||||
@ -25,6 +26,7 @@
|
|||||||
:~ ?- -.upd
|
:~ ?- -.upd
|
||||||
%set-current-bucket [%'setCurrentBucket' s+bucket.upd]
|
%set-current-bucket [%'setCurrentBucket' s+bucket.upd]
|
||||||
%add-bucket [%'addBucket' s+bucket.upd]
|
%add-bucket [%'addBucket' s+bucket.upd]
|
||||||
|
%set-region [%'setRegion' s+region.upd]
|
||||||
%remove-bucket [%'removeBucket' s+bucket.upd]
|
%remove-bucket [%'removeBucket' s+bucket.upd]
|
||||||
%set-endpoint [%'setEndpoint' s+endpoint.upd]
|
%set-endpoint [%'setEndpoint' s+endpoint.upd]
|
||||||
%set-access-key-id [%'setAccessKeyId' s+access-key-id.upd]
|
%set-access-key-id [%'setAccessKeyId' s+access-key-id.upd]
|
||||||
@ -44,6 +46,7 @@
|
|||||||
%- pairs:enjs
|
%- pairs:enjs
|
||||||
:~ [%buckets a+(turn ~(tap in buckets.configuration.upd) |=(a=@t s+a))]
|
:~ [%buckets a+(turn ~(tap in buckets.configuration.upd) |=(a=@t s+a))]
|
||||||
[%'currentBucket' s+current-bucket.configuration.upd]
|
[%'currentBucket' s+current-bucket.configuration.upd]
|
||||||
|
[%'region' s+region.configuration.upd]
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
|
23
pkg/landscape/sur/migrate.hoon
Normal file
23
pkg/landscape/sur/migrate.hoon
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/- met=metadata-store, gra=graph-store
|
||||||
|
/- *group
|
||||||
|
|%
|
||||||
|
+$ flag (pair ship term)
|
||||||
|
++ graph
|
||||||
|
|%
|
||||||
|
+$ import
|
||||||
|
[writers=(set ship) =association:met =update-log:gra =graph:gra]
|
||||||
|
+$ imports (map flag import)
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ groups
|
||||||
|
|%
|
||||||
|
+$ import [=association:met chans=(map flag =association:met) roles=(set flag) =group]
|
||||||
|
+$ imports (map flag import)
|
||||||
|
--
|
||||||
|
++ club
|
||||||
|
|%
|
||||||
|
+$ import [ships=(set ship) =association:met =graph:gra]
|
||||||
|
+$ imports (map flag import)
|
||||||
|
--
|
||||||
|
--
|
||||||
|
|
27
pkg/landscape/sur/s3-0.hoon
Normal file
27
pkg/landscape/sur/s3-0.hoon
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|%
|
||||||
|
+$ credentials
|
||||||
|
$: endpoint=@t
|
||||||
|
access-key-id=@t
|
||||||
|
secret-access-key=@t
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ configuration
|
||||||
|
$: buckets=(set @t)
|
||||||
|
current-bucket=@t
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ action
|
||||||
|
$% [%set-endpoint endpoint=@t]
|
||||||
|
[%set-access-key-id access-key-id=@t]
|
||||||
|
[%set-secret-access-key secret-access-key=@t]
|
||||||
|
[%add-bucket bucket=@t]
|
||||||
|
[%remove-bucket bucket=@t]
|
||||||
|
[%set-current-bucket bucket=@t]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ update
|
||||||
|
$% [%credentials =credentials]
|
||||||
|
[%configuration =configuration]
|
||||||
|
action
|
||||||
|
==
|
||||||
|
--
|
@ -1,4 +1,9 @@
|
|||||||
|
/- zer=s3-0
|
||||||
|%
|
|%
|
||||||
|
++ past
|
||||||
|
|%
|
||||||
|
++ zero zer
|
||||||
|
--
|
||||||
+$ credentials
|
+$ credentials
|
||||||
$: endpoint=@t
|
$: endpoint=@t
|
||||||
access-key-id=@t
|
access-key-id=@t
|
||||||
@ -8,6 +13,7 @@
|
|||||||
+$ configuration
|
+$ configuration
|
||||||
$: buckets=(set @t)
|
$: buckets=(set @t)
|
||||||
current-bucket=@t
|
current-bucket=@t
|
||||||
|
region=@t
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ action
|
+$ action
|
||||||
@ -17,6 +23,7 @@
|
|||||||
[%add-bucket bucket=@t]
|
[%add-bucket bucket=@t]
|
||||||
[%remove-bucket bucket=@t]
|
[%remove-bucket bucket=@t]
|
||||||
[%set-current-bucket bucket=@t]
|
[%set-current-bucket bucket=@t]
|
||||||
|
[%set-region region=@t]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ update
|
+$ update
|
||||||
|
19
pkg/landscape/ted/graph/recover-archive.hoon
Normal file
19
pkg/landscape/ted/graph/recover-archive.hoon
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/- spider, graph=graph-store, met=metadata-store, *group, group-store, push-hook
|
||||||
|
/+ strandio, resource, graph-view
|
||||||
|
=>
|
||||||
|
|%
|
||||||
|
++ strand strand:spider
|
||||||
|
++ poke poke:strandio
|
||||||
|
++ poke-our poke-our:strandio
|
||||||
|
--
|
||||||
|
=, strand=strand:spider
|
||||||
|
^- thread:spider
|
||||||
|
|= arg=vase
|
||||||
|
=/ m (strand ,vase)
|
||||||
|
^- form:m
|
||||||
|
=+ !<([~ pax=path] arg)
|
||||||
|
;< =bowl:spider bind:m get-bowl:strandio
|
||||||
|
=+ .^([rid=resource mar=marked-graph:graph] %cx pax)
|
||||||
|
;< ~ bind:m
|
||||||
|
(poke-our:strandio %graph-store %graph-update-3 !>([now.bowl %add-graph p.mar q.mar &]))
|
||||||
|
(pure:m *vase)
|
14
pkg/landscape/ted/keep.hoon
Normal file
14
pkg/landscape/ted/keep.hoon
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/- spider, docket
|
||||||
|
/+ strandio
|
||||||
|
=, strand=strand:spider
|
||||||
|
^- thread:spider
|
||||||
|
|= arg=vase
|
||||||
|
=/ m (strand ,vase)
|
||||||
|
^- form:m
|
||||||
|
=+ !<(jim=@ arg)
|
||||||
|
;< =bowl:spider bind:m get-bowl:strandio
|
||||||
|
=/ home=path /(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)
|
||||||
|
=/ =path /(cat 3 'backup-' (scot %da now.bowl))/noun
|
||||||
|
:: XX remove prints
|
||||||
|
;< ~ bind:m (poke-our:strandio %hood drum-put+!>([path jim]))
|
||||||
|
(pure:m *vase)
|
91
pkg/landscape/ted/migrate.hoon
Normal file
91
pkg/landscape/ted/migrate.hoon
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
:: Migrate scripts
|
||||||
|
/- spider
|
||||||
|
/- gra=graph-store
|
||||||
|
/- met=metadata-store
|
||||||
|
/- grp=group-store
|
||||||
|
/- i=migrate
|
||||||
|
/- *group
|
||||||
|
/+ strandio
|
||||||
|
=, strand=strand:spider
|
||||||
|
|%
|
||||||
|
++ import-for-mark
|
||||||
|
|= [=groups =associations:met =network:gra]
|
||||||
|
|= =mark
|
||||||
|
^- imports:graph:i
|
||||||
|
%- ~(gas by *imports:graph:i)
|
||||||
|
%+ murn ~(tap by graphs.network)
|
||||||
|
|= [=flag:i graph=graph:gra mar=(unit ^mark)]
|
||||||
|
?. =(mar `mark) :: XX: correct detection?
|
||||||
|
~
|
||||||
|
?~ assoc=(~(get by associations) [%graph flag])
|
||||||
|
~& missing-assoc/flag^mark
|
||||||
|
~
|
||||||
|
?~ group=(~(get by groups) group.u.assoc)
|
||||||
|
~& missing-group/[flag group.u.assoc]
|
||||||
|
~
|
||||||
|
=/ writers=(set ship)
|
||||||
|
(~(get ju tags.u.group) %graph flag %writers)
|
||||||
|
?~ log=(~(get by update-logs.network) flag)
|
||||||
|
~& missing-log/flag :: XX: doesn't need to fail, but suspect case
|
||||||
|
~
|
||||||
|
`[flag writers u.assoc u.log graph]
|
||||||
|
::
|
||||||
|
--
|
||||||
|
^- thread:spider
|
||||||
|
|= arg=vase
|
||||||
|
=/ m (strand ,vase)
|
||||||
|
^- form:m
|
||||||
|
;< =bowl:spider bind:m get-bowl:strandio
|
||||||
|
;< [%2 =groups] bind:m
|
||||||
|
(scry:strandio ,[%2 =groups] /gx/group-store/export/noun)
|
||||||
|
;< [%6 =network:gra] bind:m
|
||||||
|
(scry:strandio ,[%6 =network:gra] /gx/graph-store/export/noun)
|
||||||
|
;< =associations:met bind:m
|
||||||
|
(scry:strandio ,associations:met /gx/metadata-store/associations/noun)
|
||||||
|
=/ import (import-for-mark groups associations network)
|
||||||
|
=/ chats=imports:graph:i
|
||||||
|
(import %graph-validator-chat)
|
||||||
|
=/ diarys=imports:graph:i
|
||||||
|
(import %graph-validator-publish)
|
||||||
|
=/ links=imports:graph:i
|
||||||
|
(import %graph-validator-link)
|
||||||
|
=/ =imports:groups:i
|
||||||
|
%- ~(gas by *imports:groups:i)
|
||||||
|
%+ murn ~(tap by groups)
|
||||||
|
|= [=flag:i =group]
|
||||||
|
^- (unit [_flag import:groups:i])
|
||||||
|
?~ assoc=(~(get by associations) [%groups flag])
|
||||||
|
~& missing-group-assoc/flag
|
||||||
|
~
|
||||||
|
=/ chans=(map flag:i association:met)
|
||||||
|
%- ~(gas by *(map flag:i association:met))
|
||||||
|
%+ murn ~(tap by associations)
|
||||||
|
|= [res=md-resource:met ass=association:met]
|
||||||
|
^- (unit [flag:i association:met])
|
||||||
|
?. =(group.ass flag) ~
|
||||||
|
`[resource.res ass]
|
||||||
|
=/ roles=(set flag:i)
|
||||||
|
%- ~(gas in *(set flag:i))
|
||||||
|
%+ murn ~(tap by chans)
|
||||||
|
|= [=flag:i =association:met]
|
||||||
|
^- (unit flag:i)
|
||||||
|
?^ link=(~(get by links) flag)
|
||||||
|
?: =(writers.u.link ~) ~
|
||||||
|
`flag
|
||||||
|
?^ diary=(~(get by diarys) flag)
|
||||||
|
?: =(writers.u.diary ~) ~
|
||||||
|
`flag
|
||||||
|
?^ chat=(~(get by chats) flag)
|
||||||
|
?: =(writers.u.chat ~) ~
|
||||||
|
`flag
|
||||||
|
~
|
||||||
|
`[flag u.assoc chans roles group]
|
||||||
|
;< ~ bind:m (poke-our:strandio %groups group-import+!>(imports))
|
||||||
|
;< ~ bind:m (poke-our:strandio %chat graph-imports+!>(chats))
|
||||||
|
;< ~ bind:m (poke-our:strandio %diary graph-imports+!>(diarys))
|
||||||
|
;< ~ bind:m (poke-our:strandio %heap graph-imports+!>(links))
|
||||||
|
;< ~ bind:m
|
||||||
|
?~ dms=(~(get by graphs.network) [our.bowl %dm-inbox])
|
||||||
|
(pure:(strand ,~) ~)
|
||||||
|
(poke-our:strandio %chat %dm-imports !>(p.u.dms))
|
||||||
|
(pure:m *vase)
|
@ -1 +1 @@
|
|||||||
1.13
|
1.15
|
Loading…
Reference in New Issue
Block a user