Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

109.snapshot testing.2 #133

Closed
wants to merge 81 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
4a4630e
db schema to accomodate snapshot
vu3rdd May 13, 2020
4a6722f
Use the new schema
vu3rdd May 13, 2020
405e974
dummy snapshot values
vu3rdd May 13, 2020
0850a22
more snapshot changes
vu3rdd May 13, 2020
56484e0
WIP: creation of snapshots
vu3rdd May 13, 2020
91acfaa
store_file_immutable is private
vu3rdd May 13, 2020
c5f5dc6
get the print function
vu3rdd May 13, 2020
9a91eef
create_snapshot_dir is async
vu3rdd May 13, 2020
2121502
author's pubkey should not be a separate input
vu3rdd May 13, 2020
532d8ca
Use SelfConnectedCient from the fixtures to spawn a tahoe node
vu3rdd May 13, 2020
5ae1c0c
add a test
vu3rdd May 13, 2020
c3d5b5f
debug prints
vu3rdd May 13, 2020
4ed257e
mkdir-immutable works
vu3rdd May 14, 2020
f810fa9
work out authorship in a later PR
vu3rdd May 14, 2020
f2d4460
news fragment
vu3rdd May 14, 2020
388953f
test: check if the snapshot URI is a DIR2-CHK uri
vu3rdd May 14, 2020
e4917d1
remove unused imports and variables
vu3rdd May 14, 2020
d2190f5
add another snapshot test
vu3rdd May 15, 2020
f7cbac9
pass a fake DIR2-CHK uri to did_upload_version for now
vu3rdd May 15, 2020
d5c0f44
roll back magic folder db changes
vu3rdd May 19, 2020
6f41cc1
snapshot as a python object
vu3rdd May 19, 2020
75bb363
improve the generation of the representation of parents
vu3rdd May 19, 2020
7267a7b
rename Snapshot class to TahoeSnapshot as that is what it is
vu3rdd May 20, 2020
767e0b1
fail* testtool methods are deprecated, use StartsWith matcher instead
vu3rdd May 20, 2020
e0e334a
logging
vu3rdd May 20, 2020
56efc0e
remove unused imports
vu3rdd May 20, 2020
e785dd4
de-dent 'create_snapshot'
meejah May 20, 2020
e39f239
remove self etc
meejah May 20, 2020
c184e6d
refactor
meejah May 20, 2020
fe8c481
error-handling
meejah May 21, 2020
eda38cd
move snapshot tests
meejah May 21, 2020
d09baeb
whitespace
meejah May 21, 2020
6501a8f
sketch of a treq.testing-based test
meejah May 21, 2020
fbc522f
undo
meejah May 21, 2020
0835547
fix client for put + post
meejah May 21, 2020
c581fa3
prototype more Snapshot etc code
meejah May 27, 2020
c7c8f14
more ideas
meejah May 27, 2020
6f85afe
comments
meejah May 27, 2020
15983bb
notes and updates while pairing with @vu3rdd
meejah May 27, 2020
32bee49
move TahoeClient
meejah May 27, 2020
d21f125
sprinkle in some delicious nacl.signing
meejah May 27, 2020
3ef3c42
flesh out SnapshotAuthor
meejah May 27, 2020
7c08856
notes on signing
meejah May 27, 2020
30a61d0
more thinking about signatures
meejah May 27, 2020
c9a7a0f
test
meejah May 27, 2020
eba4bf8
expand some more
meejah May 27, 2020
9a14a91
move code into tahoe_client.py
meejah May 28, 2020
ac06b1b
unused
meejah May 28, 2020
a07e873
from pairing with exarkun
exarkun Jun 3, 2020
71ad254
fix tests, pairing with vu3rdd
meejah Jun 3, 2020
d8b26f3
check name
meejah Jun 3, 2020
7a37f9d
attempt to verify signatures
meejah Jun 3, 2020
dacc1a0
use current time in LocalSnapshots
vu3rdd Jun 4, 2020
f58add1
Test for a LocalSnapshot with another LocalSnapshot as parent
vu3rdd Jun 4, 2020
cabd007
some notes...
vu3rdd Jun 8, 2020
5a0d68c
new test to create a local snapshot, write to tahoe and read back
vu3rdd Jun 8, 2020
223498f
comment out a debug print
vu3rdd Jun 8, 2020
c570f3e
repair the merge
vu3rdd Jun 8, 2020
82af7ca
MatchesAuthorSignature matcher and test
vu3rdd Jun 9, 2020
70af7a7
WIP: add parents to the Snapshot object
vu3rdd Jun 9, 2020
2e34895
WIP: represent parents as dirnode
vu3rdd Jun 9, 2020
4ee5445
naming
meejah Jun 9, 2020
d7d9972
add 'author' parameter to write_snapshot_to_tahoe()
meejah Jun 9, 2020
c43eae0
upload parents snapshots FIRST (and remember our progress)
meejah Jun 9, 2020
c749eb4
LocalAuthor and RemoteAuthor and sign name too
meejah Jun 9, 2020
7767098
parents are now represented properly on the snapshot
vu3rdd Jun 10, 2020
b766f75
repair tests
vu3rdd Jun 11, 2020
0ed3ed3
parent dirnode: no need for metadata (?)
vu3rdd Jun 10, 2020
85b9070
on a RemoteSnapshot, parents_raw points to caps of parents
vu3rdd Jun 10, 2020
12dc059
unused
meejah Jun 11, 2020
a8cd7bc
better doc
meejah Jun 11, 2020
8fefba0
naming
meejah Jun 11, 2020
7cd9d30
test Author serializer error-cases
meejah Jun 11, 2020
187c5e9
actually use fetch_content()
meejah Jun 11, 2020
b5c610d
verify signatures properly, test for invalid signature
meejah Jun 11, 2020
c12f84a
read/write authors
meejah Jun 12, 2020
e0500f5
improve docs
meejah Jun 12, 2020
6cd6c32
doc
meejah Jun 12, 2020
2bfed97
version information
meejah Jun 12, 2020
3bd5ff1
cleanup tahoe_client
meejah Jun 12, 2020
1de5ece
docstring
meejah Jun 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/109.feature
@@ -0,0 +1 @@
initial implementation of a snapshot represented as a Tahoe-LAFS immutable directory
11 changes: 9 additions & 2 deletions src/magic_folder/common.py
Expand Up @@ -90,12 +90,19 @@ def bad_response(url, response):
body = yield readBody(response)
raise BadResponseCode(url, response.code, body)


def get_node_url(node_directory):
node_url_file = os.path.join(node_directory, u"node.url")
node_url = fileutil.read(node_url_file).strip()
"""
:param str node_directory: A Tahoe client directory

:returns: the base URL for the Tahoe given client.
"""
node_url_file = os.path.join(node_directory, u"node.url")
with open(node_url_file, "r") as f:
node_url = f.read().strip()
return node_url


@inlineCallbacks
def tahoe_mkdir(nodeurl, treq):
"""
Expand Down