Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added cortexes/pushpull-v2/axon/axon.lmdb/data.mdb
Binary file not shown.
2 changes: 2 additions & 0 deletions cortexes/pushpull-v2/axon/axon.opts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file added cortexes/pushpull-v2/axon/blob.lmdb/data.mdb
Binary file not shown.
2 changes: 2 additions & 0 deletions cortexes/pushpull-v2/axon/blob.opts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
1 change: 1 addition & 0 deletions cortexes/pushpull-v2/axon/cell.guid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
54a7ec684db3db24cc348a51763c01dc
1 change: 1 addition & 0 deletions cortexes/pushpull-v2/axon/cookie.secret
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0e7df0eb91e9f99e05d56197fea62159
Binary file not shown.
2 changes: 2 additions & 0 deletions cortexes/pushpull-v2/axon/slabs/cell.opts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
1 change: 1 addition & 0 deletions cortexes/pushpull-v2/cell.guid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cf8dc42935b289191a4a31a85e4884aa
1 change: 1 addition & 0 deletions cortexes/pushpull-v2/cookie.secret
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2bbcdd2010968d25426bb1a8d67d9f72
1 change: 1 addition & 0 deletions cortexes/pushpull-v2/jsonstor/cell.guid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
81d675e5690c4dd942cf0d605f62405b
1 change: 1 addition & 0 deletions cortexes/pushpull-v2/jsonstor/cookie.secret
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0cf3fa6cfecb5de587e0e85015dff3ab
Binary file not shown.
2 changes: 2 additions & 0 deletions cortexes/pushpull-v2/jsonstor/slabs/cell.opts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file added cortexes/pushpull-v2/slabs/cell.lmdb/data.mdb
Binary file not shown.
2 changes: 2 additions & 0 deletions cortexes/pushpull-v2/slabs/cell.opts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
2 changes: 2 additions & 0 deletions cortexes/pushpull-v2/slabs/graphs.opts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file added cortexes/pushpull-v2/slabs/nexus.lmdb/data.mdb
Binary file not shown.
2 changes: 2 additions & 0 deletions cortexes/pushpull-v2/slabs/nexus.opts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
2 changes: 2 additions & 0 deletions cortexes/pushpull-v2/slabs/queues.opts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--- {}
...
57 changes: 57 additions & 0 deletions scripts/gen-pushpull-v2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import shutil
import asyncio

import synapse.cortex as s_cortex
import synapse.tools.backup as s_backup

import synapse.lib.version as s_version

async def main():

maxver = (2, 217, 0)
if s_version.version > (2, 217, 0):
verstr = '.'.join(map(str, maxver))
mesg = f'This regression cortex MUST be generated with a cortex LTE {verstr}, not {s_version.verstring}.'
raise s_exc.BadVersion(mesg=mesg, curv=s_version.verstring, maxver=maxver)

tmpdir = '/tmp/v/regress'
modldir = 'cortexes/pushpull-v2'

shutil.rmtree(tmpdir, ignore_errors=True)
shutil.rmtree(modldir, ignore_errors=True)

async with await s_cortex.Cortex.anit(tmpdir) as core:

await core.auth.rootuser.setPasswd('secret')
host, port = await core.dmon.listen('tcp://127.0.0.1:0/')

view0, layr0 = await core.callStorm('$view = $lib.view.get().fork() return(($view.iden, $view.layers.0.iden))')
view1, layr1 = await core.callStorm('$view = $lib.view.get().fork() return(($view.iden, $view.layers.0.iden))')
view2, layr2 = await core.callStorm('$view = $lib.view.get().fork() return(($view.iden, $view.layers.0.iden))')
opts = {'vars': {
'view0': view0,
'view1': view1,
'view2': view2,
'layr0': layr0,
'layr1': layr1,
'layr2': layr2,
}}

# view0 -push-> view1 <-pull- view2
await core.callStorm(f'$lib.layer.get($layr0).addPush("tcp://root:secret@127.0.0.1:{port}/*/layer/{layr1}")', opts=opts)
await core.callStorm(f'$lib.layer.get($layr2).addPull("tcp://root:secret@127.0.0.1:{port}/*/layer/{layr1}")', opts=opts)

await core.nodes('[ ps:contact=* ]', opts={'view': view0})

# wait for first write so we can get the correct offset
await core.layers.get(layr2).waitEditOffs(0, timeout=3)
offs = await core.layers.get(layr2).getEditOffs()

await core.nodes('[ ps:contact=* ]', opts={'view': view0})
await core.nodes('[ ps:contact=* ]', opts={'view': view0})
await core.layers.get(layr2).waitEditOffs(offs + 10, timeout=3)

s_backup.backup(tmpdir, modldir)

if __name__ == '__main__':
asyncio.run(main())