Tue May 18 23:51:46 MDT 2010 zooko@zooko.com * tests: refactor test_web.py to have less duplication of literal caps-from-the-future This is a prelude to a patch which will add tests of caps from the future which have non-ascii chars in them. Wed May 19 00:06:23 MDT 2010 zooko@zooko.com * add tests of caps from the future that have non-ASCII characters in them Current trunk fails these tests. The changes to test_uri.py, test_client.py, and test_dirnode.py add tests of non-ascii-future-caps (in Python unicode objects) in addition to the current tests of all-ascii-future-caps (in Python str objects). The changes to test_web.py just replace the tests of all-ascii-future-caps with tests of non-ascii-future-caps. New patches: [tests: refactor test_web.py to have less duplication of literal caps-from-the-future zooko@zooko.com**20100519055146 Ignore-this: 49e5412e6cc4566ca67f069ffd850af6 This is a prelude to a patch which will add tests of caps from the future which have non-ascii chars in them. ] { hunk ./src/allmydata/test/test_web.py 38 timeout = 480 # Most of these take longer than 240 seconds on Francois's arm box. +unknown_rwcap = "lafs://from_the_future" +unknown_rocap = "ro.lafs://readonly_from_the_future" +unknown_immcap = "imm.lafs://immutable_from_the_future" + class FakeStatsProvider: def get_stats(self): stats = {'stats': {}, 'counters': {}} hunk ./src/allmydata/test/test_web.py 2180 filecap2 = make_mutable_file_uri() node3 = self.s.create_node_from_uri(make_mutable_file_uri()) filecap3 = node3.get_readonly_uri() - unknown_rwcap = "lafs://from_the_future" - unknown_rocap = "ro.lafs://readonly_from_the_future" - unknown_immcap = "imm.lafs://immutable_from_the_future" node4 = self.s.create_node_from_uri(make_mutable_file_uri()) dircap = DirectoryNode(node4, None, None).get_uri() litdircap = "URI:DIR2-LIT:ge3dumj2mewdcotyfqydulbshj5x2lbm" hunk ./src/allmydata/test/test_web.py 2215 tnode = create_chk_filenode("immutable directory contents\n"*10) dnode = DirectoryNode(tnode, None, None) assert not dnode.is_mutable() - unknown_immcap = "imm.lafs://immutable_from_the_future" immdircap = dnode.get_uri() litdircap = "URI:DIR2-LIT:ge3dumj2mewdcotyfqydulbshj5x2lbm" emptydircap = "URI:DIR2-LIT:" hunk ./src/allmydata/test/test_web.py 2456 return d def test_POST_link_uri_unknown_bad(self): - newuri = "lafs://from_the_future" - d = self.POST(self.public_url + "/foo", t="uri", name="future.txt", uri=newuri) + d = self.POST(self.public_url + "/foo", t="uri", name="future.txt", uri=unknown_rwcap) d.addBoth(self.shouldFail, error.Error, "POST_link_uri_unknown_bad", "400 Bad Request", hunk ./src/allmydata/test/test_web.py 2464 return d def test_POST_link_uri_unknown_ro_good(self): - newuri = "ro.lafs://readonly_from_the_future" - d = self.POST(self.public_url + "/foo", t="uri", name="future-ro.txt", uri=newuri) + d = self.POST(self.public_url + "/foo", t="uri", name="future-ro.txt", uri=unknown_rocap) d.addCallback(self.failUnlessURIMatchesROChild, self._foo_node, u"future-ro.txt") return d hunk ./src/allmydata/test/test_web.py 2469 def test_POST_link_uri_unknown_imm_good(self): - newuri = "imm.lafs://immutable_from_the_future" - d = self.POST(self.public_url + "/foo", t="uri", name="future-imm.txt", uri=newuri) + d = self.POST(self.public_url + "/foo", t="uri", name="future-imm.txt", uri=unknown_immcap) d.addCallback(self.failUnlessURIMatchesROChild, self._foo_node, u"future-imm.txt") return d hunk ./src/allmydata/test/test_web.py 2760 return d def test_PUT_NEWFILEURL_uri_unknown_bad(self): - new_uri = "lafs://from_the_future" - d = self.PUT(self.public_url + "/foo/put-future.txt?t=uri", new_uri) + d = self.PUT(self.public_url + "/foo/put-future.txt?t=uri", unknown_rwcap) d.addBoth(self.shouldFail, error.Error, "POST_put_uri_unknown_bad", "400 Bad Request", hunk ./src/allmydata/test/test_web.py 2768 return d def test_PUT_NEWFILEURL_uri_unknown_ro_good(self): - new_uri = "ro.lafs://readonly_from_the_future" - d = self.PUT(self.public_url + "/foo/put-future-ro.txt?t=uri", new_uri) + d = self.PUT(self.public_url + "/foo/put-future-ro.txt?t=uri", unknown_rocap) d.addCallback(self.failUnlessURIMatchesROChild, self._foo_node, u"put-future-ro.txt") return d hunk ./src/allmydata/test/test_web.py 2774 def test_PUT_NEWFILEURL_uri_unknown_imm_good(self): - new_uri = "imm.lafs://immutable_from_the_future" - d = self.PUT(self.public_url + "/foo/put-future-imm.txt?t=uri", new_uri) + d = self.PUT(self.public_url + "/foo/put-future-imm.txt?t=uri", unknown_immcap) d.addCallback(self.failUnlessURIMatchesROChild, self._foo_node, u"put-future-imm.txt") return d hunk ./src/allmydata/test/test_web.py 3367 self.uris = {} self.fileurls = {} - future_write_uri = "x-tahoe-crazy://I_am_from_the_future." - future_read_uri = "x-tahoe-crazy-readonly://I_am_from_the_future." # the future cap format may contain slashes, which must be tolerated hunk ./src/allmydata/test/test_web.py 3368 - expected_info_url = "uri/%s?t=info" % urllib.quote(future_write_uri, + expected_info_url = "uri/%s?t=info" % urllib.quote(unknown_rwcap, safe="") if immutable: hunk ./src/allmydata/test/test_web.py 3373 name = u"future-imm" - future_node = UnknownNode(None, future_read_uri, deep_immutable=True) + future_node = UnknownNode(None, unknown_immcap, deep_immutable=True) d = c0.create_immutable_dirnode({name: (future_node, {})}) else: name = u"future" hunk ./src/allmydata/test/test_web.py 3377 - future_node = UnknownNode(future_write_uri, future_read_uri) + future_node = UnknownNode(unknown_rwcap, unknown_rocap) d = c0.create_dirnode() def _stash_root_and_create_file(n): hunk ./src/allmydata/test/test_web.py 3411 f = data[1]["children"][name] self.failUnlessEqual(f[0], "unknown") if expect_rw_uri: - self.failUnlessEqual(f[1]["rw_uri"], future_write_uri) + self.failUnlessEqual(f[1]["rw_uri"], unknown_rwcap) else: self.failIfIn("rw_uri", f[1]) if immutable: hunk ./src/allmydata/test/test_web.py 3415 - self.failUnlessEqual(f[1]["ro_uri"], "imm." + future_read_uri) + self.failUnlessEqual(f[1]["ro_uri"], unknown_immcap, data) else: hunk ./src/allmydata/test/test_web.py 3417 - self.failUnlessEqual(f[1]["ro_uri"], "ro." + future_read_uri) + self.failUnlessEqual(f[1]["ro_uri"], unknown_rocap) self.failUnless("metadata" in f[1]) d.addCallback(_check_directory_json, expect_rw_uri=not immutable) hunk ./src/allmydata/test/test_web.py 3424 def _check_info(res, expect_rw_uri, expect_ro_uri): self.failUnlessIn("Object Type: unknown", res) if expect_rw_uri: - self.failUnlessIn(future_write_uri, res) + self.failUnlessIn(unknown_rwcap, res) if expect_ro_uri: hunk ./src/allmydata/test/test_web.py 3426 - self.failUnlessIn(future_read_uri, res) + if immutable: + self.failUnlessIn(unknown_immcap, res) + else: + self.failUnlessIn(unknown_rocap, res) else: hunk ./src/allmydata/test/test_web.py 3431 - self.failIfIn(future_read_uri, res) + self.failIfIn(unknown_rocap, res) self.failIfIn("Raw data as", res) self.failIfIn("Directory writecap", res) self.failIfIn("Checker Operations", res) hunk ./src/allmydata/test/test_web.py 3450 data = simplejson.loads(res) self.failUnlessEqual(data[0], "unknown") if expect_rw_uri: - self.failUnlessEqual(data[1]["rw_uri"], future_write_uri) + self.failUnlessEqual(data[1]["rw_uri"], unknown_rwcap) else: self.failIfIn("rw_uri", data[1]) hunk ./src/allmydata/test/test_web.py 3455 if immutable: - self.failUnlessEqual(data[1]["ro_uri"], "imm." + future_read_uri) + self.failUnlessEqual(data[1]["ro_uri"], unknown_immcap) self.failUnlessEqual(data[1]["mutable"], False) elif expect_rw_uri: hunk ./src/allmydata/test/test_web.py 3458 - self.failUnlessEqual(data[1]["ro_uri"], "ro." + future_read_uri) + self.failUnlessEqual(data[1]["ro_uri"], unknown_rocap) self.failUnlessEqual(data[1]["mutable"], True) else: hunk ./src/allmydata/test/test_web.py 3461 - self.failUnlessEqual(data[1]["ro_uri"], "ro." + future_read_uri) + self.failUnlessEqual(data[1]["ro_uri"], unknown_rocap) self.failIf("mutable" in data[1], data[1]) # TODO: check metadata contents hunk ./src/allmydata/test/test_web.py 3471 d.addCallback(_check_json, expect_rw_uri=not immutable) # and make sure that a read-only version of the directory can be - # rendered too. This version will not have future_write_uri, whether + # rendered too. This version will not have unknown_rwcap, whether # or not future_node was immutable. d.addCallback(lambda ign: self.GET(self.rourl)) if immutable: hunk ./src/allmydata/test/test_web.py 3650 # this tests that deep-check and stream-manifest will ignore # UnknownNode instances. Hopefully this will also cover deep-stats. - future_write_uri = "x-tahoe-crazy://I_am_from_the_future." - future_read_uri = "x-tahoe-crazy-readonly://I_am_from_the_future." - future_node = UnknownNode(future_write_uri, future_read_uri) + future_node = UnknownNode(unknown_rwcap, unknown_rocap) d.addCallback(lambda ign: self.rootnode.set_node(u"future", future_node)) def _clobber_shares(ignored): } [add tests of caps from the future that have non-ASCII characters in them zooko@zooko.com**20100519060623 Ignore-this: 754e6f060da9d96b13feab58e9b60cb9 Current trunk fails these tests. The changes to test_uri.py, test_client.py, and test_dirnode.py add tests of non-ascii-future-caps (in Python unicode objects) in addition to the current tests of all-ascii-future-caps (in Python str objects). The changes to test_web.py just replace the tests of all-ascii-future-caps with tests of non-ascii-future-caps. ] { hunk ./src/allmydata/test/test_client.py 1 +# -*- coding: utf-8 -*- import os from twisted.trial import unittest hunk ./src/allmydata/test/test_client.py 304 self.failUnlessEqual(n.get_uri(), unknown_rw) self.failUnlessEqual(n.get_write_uri(), unknown_rw) self.failUnlessEqual(n.get_readonly_uri(), "ro." + unknown_ro) + + unknown_rw = u"lafs://from_the_future_fw-蜔쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴" + unknown_ro = u"lafs://readonly_from_the_future_fo-ą쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴" + n = c.create_node_from_uri(unknown_rw, unknown_ro) + self.failUnless(IFilesystemNode.providedBy(n)) + self.failIf(IFileNode.providedBy(n)) + self.failIf(IImmutableFileNode.providedBy(n)) + self.failIf(IMutableFileNode.providedBy(n)) + self.failIf(IDirectoryNode.providedBy(n)) + self.failUnless(n.is_unknown()) + self.failUnlessEqual(n.get_uri(), unknown_rw) + self.failUnlessEqual(n.get_write_uri(), unknown_rw) + self.failUnlessEqual(n.get_readonly_uri(), "ro." + unknown_ro) hunk ./src/allmydata/test/test_dirnode.py 1 +# -*- coding: utf-8 -*- import time from zope.interface import implements hunk ./src/allmydata/test/test_dirnode.py 49 mut_read_uri = "URI:SSK-RO:jf6wkflosyvntwxqcdo7a54jvm:euw4iw7bbnkrrwpzuburbhppuxhc3gwxv26f6imekhz7zyw2ojnq" future_write_uri = "x-tahoe-crazy://I_am_from_the_future." future_read_uri = "x-tahoe-crazy-readonly://I_am_from_the_future." +future_nonascii_write_uri = u"x-tahoe-even-more-crazy://I_am_from_the_fw-蜔쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴." +future_nonascii_read_uri = u"x-tahoe-even-more-crazy-readonly://I_am_from_the_fo-ą쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴." class Dirnode(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin, testutil.StallMixin, ErrorMixin): hunk ./src/allmydata/test/test_dirnode.py 85 u"mut": (nm.create_from_cap(mut_write_uri, mut_read_uri), {}), u"fut": (nm.create_from_cap(future_write_uri, future_read_uri), {}), u"fro": (nm.create_from_cap(None, future_read_uri), {}), + u"fut-unic": (nm.create_from_cap(future_nonascii_read_uri, future_nonascii_read_uri), {}), + u"fro-unic": (nm.create_from_cap(None, future_nonascii_read_uri), {}), u"empty_litdir": (nm.create_from_cap(empty_litdir_uri), {}), u"tiny_litdir": (nm.create_from_cap(tiny_litdir_uri), {}), } hunk ./src/allmydata/test/test_dirnode.py 106 def _check_kids(children): self.failUnlessEqual(set(children.keys()), - set([u"one", u"two", u"mut", u"fut", u"fro", u"empty_litdir", u"tiny_litdir"])) + set([u"one", u"two", u"mut", u"fut", u"fro", u"fut-unic", u"fro-unic", u"empty_litdir", u"tiny_litdir"])) one_node, one_metadata = children[u"one"] two_node, two_metadata = children[u"two"] mut_node, mut_metadata = children[u"mut"] hunk ./src/allmydata/test/test_dirnode.py 112 fut_node, fut_metadata = children[u"fut"] fro_node, fro_metadata = children[u"fro"] + futna_node, futna_metadata = children[u"fut-unic"] + frona_node, frona_metadata = children[u"fro-unic"] emptylit_node, emptylit_metadata = children[u"empty_litdir"] tinylit_node, tinylit_metadata = children[u"tiny_litdir"] hunk ./src/allmydata/test/test_dirnode.py 135 self.failUnlessEqual(fut_node.get_uri(), future_write_uri) self.failUnlessEqual(fut_node.get_readonly_uri(), "ro." + future_read_uri) self.failUnless(isinstance(fut_metadata, dict), fut_metadata) - + + self.failUnless(futna_node.is_unknown()) + self.failUnlessEqual(futna_node.get_uri(), future_nonascii_write_uri) + self.failUnlessEqual(futna_node.get_readonly_uri(), "ro." + future_nonascii_read_uri) + self.failUnless(isinstance(futna_metadata, dict), futna_metadata) + self.failUnless(fro_node.is_unknown()) self.failUnlessEqual(fro_node.get_uri(), "ro." + future_read_uri) self.failUnlessEqual(fut_node.get_readonly_uri(), "ro." + future_read_uri) hunk ./src/allmydata/test/test_dirnode.py 146 self.failUnless(isinstance(fro_metadata, dict), fro_metadata) + self.failUnless(frona_node.is_unknown()) + self.failUnlessEqual(frona_node.get_uri(), "ro." + future_nonascii_read_uri) + self.failUnlessEqual(futna_node.get_readonly_uri(), "ro." + future_nonascii_read_uri) + self.failUnless(isinstance(frona_metadata, dict), frona_metadata) + self.failIf(emptylit_node.is_unknown()) self.failUnlessEqual(emptylit_node.get_storage_index(), None) self.failIf(tinylit_node.is_unknown()) hunk ./src/allmydata/test/test_dirnode.py 200 u"two": (nm.create_from_cap(setup_py_uri), {"metakey": "metavalue"}), u"fut": (nm.create_from_cap(None, future_read_uri), {}), + u"futna": (nm.create_from_cap(None, future_nonascii_read_uri), {}), u"empty_litdir": (nm.create_from_cap(empty_litdir_uri), {}), u"tiny_litdir": (nm.create_from_cap(tiny_litdir_uri), {}), } hunk ./src/allmydata/test/test_dirnode.py 223 def _check_kids(children): self.failUnlessEqual(set(children.keys()), - set([u"one", u"two", u"fut", u"empty_litdir", u"tiny_litdir"])) + set([u"one", u"two", u"fut", u"futna", u"empty_litdir", u"tiny_litdir"])) one_node, one_metadata = children[u"one"] two_node, two_metadata = children[u"two"] fut_node, fut_metadata = children[u"fut"] hunk ./src/allmydata/test/test_dirnode.py 227 + futna_node, futna_metadata = children[u"futna"] emptylit_node, emptylit_metadata = children[u"empty_litdir"] tinylit_node, tinylit_metadata = children[u"tiny_litdir"] hunk ./src/allmydata/test/test_dirnode.py 246 self.failUnlessEqual(fut_node.get_readonly_uri(), "imm." + future_read_uri) self.failUnless(isinstance(fut_metadata, dict), fut_metadata) + self.failUnless(futna_node.is_unknown()) + self.failUnlessEqual(futna_node.get_uri(), "imm." + future_nonascii_read_uri) + self.failUnlessEqual(futna_node.get_readonly_uri(), "imm." + future_nonascii_read_uri) + self.failUnless(isinstance(futna_metadata, dict), futna_metadata) + self.failIf(emptylit_node.is_unknown()) self.failUnlessEqual(emptylit_node.get_storage_index(), None) self.failIf(tinylit_node.is_unknown()) hunk ./src/allmydata/test/test_dirnode.py 1304 # Create a mutable directory that contains unknown URI types, and make sure # we tolerate them properly. d = self.nodemaker.create_new_mutable_directory() - future_write_uri = "x-tahoe-crazy://I_am_from_the_future." - future_read_uri = "x-tahoe-crazy-readonly://I_am_from_the_future." - future_imm_uri = "x-tahoe-crazy-immutable://I_am_from_the_future." + future_write_uri = u"x-tahoe-crazy://I_am_from_the_future_fw-蜔쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴" + future_read_uri = u"x-tahoe-crazy-readonly://I_am_from_the_future_fo-ą쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴" + future_imm_uri = u"x-tahoe-crazy-immutable://I_am_from_the_future_fi-Ā쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴" future_node = UnknownNode(future_write_uri, future_read_uri) def _then(n): self._node = n hunk ./src/allmydata/test/test_uri.py 1 +# -*- coding: utf-8 -*- from twisted.trial import unittest from allmydata import uri hunk ./src/allmydata/test/test_uri.py 233 self.failUnless(u2.get_readonly() is None) self.failUnless(isinstance(u2.get_error(), CapConstraintError)) + # Future caps might have non-ASCII chars in them. (Or maybe not, who can tell about the future?) + future_uri = u"I am a cap from the †‣‡ future. Whatever you " + u = uri.from_string(future_uri) + self.failUnless(isinstance(u, uri.UnknownURI)) + self.failUnlessEqual(u.to_string(), future_uri) + self.failUnless(u.get_readonly() is None) + self.failUnless(u.get_error() is None) + + u2 = uri.UnknownURI(future_uri, error=CapConstraintError("...")) + self.failUnlessEqual(u.to_string(), future_uri) + self.failUnless(u2.get_readonly() is None) + self.failUnless(isinstance(u2.get_error(), CapConstraintError)) + class Constraint(unittest.TestCase): def test_constraint(self): good="http://127.0.0.1:3456/uri/URI%3ADIR2%3Agh3l5rbvnv2333mrfvalmjfr4i%3Alz6l7u3z3b7g37s4zkdmfpx5ly4ib4m6thrpbusi6ys62qtc6mma/" hunk ./src/allmydata/test/test_web.py 1 +# -*- coding: utf-8 -*- + import os.path, re, urllib import simplejson from StringIO import StringIO hunk ./src/allmydata/test/test_web.py 40 timeout = 480 # Most of these take longer than 240 seconds on Francois's arm box. -unknown_rwcap = "lafs://from_the_future" -unknown_rocap = "ro.lafs://readonly_from_the_future" -unknown_immcap = "imm.lafs://immutable_from_the_future" +unknown_rwcap = u"lafs://from_the_future_fw-蜔쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴" +unknown_rocap = u"ro.lafs://readonly_from_the_future_fo-ą쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴" +unknown_immcap = u"imm.lafs://immutable_from_the_future_fi-‡쳨欝遃䝦舜琇襇邤䍏㵦☚✸킾궑蒴犏띎냔㳆㼿졨浴䒉ΐ屝稜퍙鉧迴" class FakeStatsProvider: def get_stats(self): } Context: [docs: line-wrap README.txt zooko@zooko.com**20100518174240 Ignore-this: 670a02d360df7de51ebdcf4fae752577 ] [Hush pyflakes warnings Kevan Carstensen **20100515184344 Ignore-this: fd602c3bba115057770715c36a87b400 ] [setup: new improved misc/show-tool-versions.py zooko@zooko.com**20100516050122 Ignore-this: ce9b1de1b35b07d733e6cf823b66335a ] [Improve code coverage of the Tahoe2PeerSelector tests. Kevan Carstensen **20100515032913 Ignore-this: 793151b63ffa65fdae6915db22d9924a ] [Remove a comment that no longer makes sense. Kevan Carstensen **20100514203516 Ignore-this: 956983c7e7c7e4477215494dfce8f058 ] [docs: update docs/architecture.txt to more fully and correctly explain the upload procedure zooko@zooko.com**20100514043458 Ignore-this: 538b6ea256a49fed837500342092efa3 ] [Fix up the behavior of #778, per reviewers' comments Kevan Carstensen **20100514004917 Ignore-this: 9c20b60716125278b5456e8feb396bff - Make some important utility functions clearer and more thoroughly documented. - Assert in upload.servers_of_happiness that the buckets attributes of PeerTrackers passed to it are mutually disjoint. - Get rid of some silly non-Pythonisms that I didn't see when I first wrote these patches. - Make sure that should_add_server returns true when queried about a shnum that it doesn't know about yet. - Change Tahoe2PeerSelector.preexisting_shares to map a shareid to a set of peerids, alter dependencies to deal with that. - Remove upload.should_add_servers, because it is no longer necessary - Move upload.shares_of_happiness and upload.shares_by_server to a utility file. - Change some points in Tahoe2PeerSelector. - Compute servers_of_happiness using a bipartite matching algorithm that we know is optimal instead of an ad-hoc greedy algorithm that isn't. - Change servers_of_happiness to just take a sharemap as an argument, change its callers to merge existing_shares and used_peers before calling it. - Change an error message in the encoder to be more appropriate for servers of happiness. - Clarify the wording of an error message in immutable/upload.py - Refactor a happiness failure message to happinessutil.py, and make immutable/upload.py and immutable/encode.py use it. - Move the word "only" as far to the right as possible in failure messages. - Use a better definition of progress during peer selection. - Do read-only peer share detection queries in parallel, not sequentially. - Clean up logging semantics; print the query statistics whenever an upload is unsuccessful, not just in one case. ] [Alter the error message when an upload fails, per some comments in #778. Kevan Carstensen **20091230210344 Ignore-this: ba97422b2f9737c46abeb828727beb1 When I first implemented #778, I just altered the error messages to refer to servers where they referred to shares. The resulting error messages weren't very good. These are a bit better. ] [Change "UploadHappinessError" to "UploadUnhappinessError" Kevan Carstensen **20091205043037 Ignore-this: 236b64ab19836854af4993bb5c1b221a ] [Alter the error message returned when peer selection fails Kevan Carstensen **20091123002405 Ignore-this: b2a7dc163edcab8d9613bfd6907e5166 The Tahoe2PeerSelector returned either NoSharesError or NotEnoughSharesError for a variety of error conditions that weren't informatively described by them. This patch creates a new error, UploadHappinessError, replaces uses of NoSharesError and NotEnoughSharesError with it, and alters the error message raised with the errors to be more in line with the new servers_of_happiness behavior. See ticket #834 for more information. ] [Eliminate overcounting iof servers_of_happiness in Tahoe2PeerSelector; also reorganize some things. Kevan Carstensen **20091118014542 Ignore-this: a6cb032cbff74f4f9d4238faebd99868 ] [Change stray "shares_of_happiness" to "servers_of_happiness" Kevan Carstensen **20091116212459 Ignore-this: 1c971ba8c3c4d2e7ba9f020577b28b73 ] [Alter Tahoe2PeerSelector to make sure that it recognizes existing shares on readonly servers, fixing an issue in #778 Kevan Carstensen **20091116192805 Ignore-this: 15289f4d709e03851ed0587b286fd955 ] [Alter 'immutable/encode.py' and 'immutable/upload.py' to use servers_of_happiness instead of shares_of_happiness. Kevan Carstensen **20091104111222 Ignore-this: abb3283314820a8bbf9b5d0cbfbb57c8 ] [Alter the signature of set_shareholders in IEncoder to add a 'servermap' parameter, which gives IEncoders enough information to perform a sane check for servers_of_happiness. Kevan Carstensen **20091104033241 Ignore-this: b3a6649a8ac66431beca1026a31fed94 ] [Alter CiphertextDownloader to work with servers_of_happiness Kevan Carstensen **20090924041932 Ignore-this: e81edccf0308c2d3bedbc4cf217da197 ] [Revisions of the #778 tests, per reviewers' comments Kevan Carstensen **20100514012542 Ignore-this: 735bbc7f663dce633caeb3b66a53cf6e - Fix comments and confusing naming. - Add tests for the new error messages suggested by David-Sarah and Zooko. - Alter existing tests for new error messages. - Make sure that the tests continue to work with the trunk. - Add a test for a mutual disjointedness assertion that I added to upload.servers_of_happiness. - Fix the comments to correctly reflect read-onlyness - Add a test for an edge case in should_add_server - Add an assertion to make sure that share redistribution works as it should - Alter tests to work with revised servers_of_happiness semantics - Remove tests for should_add_server, since that function no longer exists. - Alter tests to know about merge_peers, and to use it before calling servers_of_happiness. - Add tests for merge_peers. - Add Zooko's puzzles to the tests. - Edit encoding tests to expect the new kind of failure message. - Edit tests to expect error messages with the word "only" moved as far to the right as possible. - Extended and cleaned up some helper functions. - Changed some tests to call more appropriate helper functions. - Added a test for the failing redistribution algorithm - Added a test for the progress message - Added a test for the upper bound on readonly peer share discovery. ] [Alter various unit tests to work with the new happy behavior Kevan Carstensen **20100107181325 Ignore-this: 132032bbf865e63a079f869b663be34a ] [Replace "UploadHappinessError" with "UploadUnhappinessError" in tests. Kevan Carstensen **20091205043453 Ignore-this: 83f4bc50c697d21b5f4e2a4cd91862ca ] [Add tests for the behavior described in #834. Kevan Carstensen **20091123012008 Ignore-this: d8e0aa0f3f7965ce9b5cea843c6d6f9f ] [Re-work 'test_upload.py' to be more readable; add more tests for #778 Kevan Carstensen **20091116192334 Ignore-this: 7e8565f92fe51dece5ae28daf442d659 ] [Test Tahoe2PeerSelector to make sure that it recognizeses existing shares on readonly servers Kevan Carstensen **20091109003735 Ignore-this: 12f9b4cff5752fca7ed32a6ebcff6446 ] [Add more tests for comment:53 in ticket #778 Kevan Carstensen **20091104112849 Ignore-this: 3bb2edd299a944cc9586e14d5d83ec8c ] [Add a test for upload.shares_by_server Kevan Carstensen **20091104111324 Ignore-this: f9802e82d6982a93e00f92e0b276f018 ] [Minor tweak to an existing test -- make the first server read-write, instead of read-only Kevan Carstensen **20091104034232 Ignore-this: a951a46c93f7f58dd44d93d8623b2aee ] [Alter tests to use the new form of set_shareholders Kevan Carstensen **20091104033602 Ignore-this: 3deac11fc831618d11441317463ef830 ] [Refactor some behavior into a mixin, and add tests for the behavior described in #778 "Kevan Carstensen" **20091030091908 Ignore-this: a6f9797057ca135579b249af3b2b66ac ] [Alter NoNetworkGrid to allow the creation of readonly servers for testing purposes. Kevan Carstensen **20091018013013 Ignore-this: e12cd7c4ddeb65305c5a7e08df57c754 ] [Update 'docs/architecture.txt' to reflect readonly share discovery kevan@isnotajoke.com**20100514003852 Ignore-this: 7ead71b34df3b1ecfdcfd3cb2882e4f9 ] [Alter the wording in docs/architecture.txt to more accurately describe the servers_of_happiness behavior. Kevan Carstensen **20100428002455 Ignore-this: 6eff7fa756858a1c6f73728d989544cc ] [Alter wording in 'interfaces.py' to be correct wrt #778 "Kevan Carstensen" **20091205034005 Ignore-this: c9913c700ac14e7a63569458b06980e0 ] [Update 'docs/configuration.txt' to reflect the servers_of_happiness behavior. Kevan Carstensen **20091205033813 Ignore-this: 5e1cb171f8239bfb5b565d73c75ac2b8 ] [Clarify quickstart instructions for installing pywin32 david-sarah@jacaranda.org**20100511180300 Ignore-this: d4668359673600d2acbc7cd8dd44b93c ] [web: add a simple test that you can load directory.xhtml zooko@zooko.com**20100510063729 Ignore-this: e49b25fa3c67b3c7a56c8b1ae01bb463 ] [setup: fix typos in misc/show-tool-versions.py zooko@zooko.com**20100510063615 Ignore-this: 2181b1303a0e288e7a9ebd4c4855628 ] [setup: show code-coverage tool versions in show-tools-versions.py zooko@zooko.com**20100510062955 Ignore-this: 4b4c68eb3780b762c8dbbd22b39df7cf ] [Dependency on Windmill test framework is not needed yet. david-sarah@jacaranda.org**20100504161043 Ignore-this: be088712bec650d4ef24766c0026ebc8 ] [docs: update README, mv it to README.txt, update setup.py zooko@zooko.com**20100504094340 Ignore-this: 40e28ca36c299ea1fd12d3b91e5b421c ] [tests: pass z to tar so that BSD tar will know to ungzip zooko@zooko.com**20100504090628 Ignore-this: 1339e493f255e8fc0b01b70478f23a09 ] [setup: update comments and URLs in setup.cfg zooko@zooko.com**20100504061653 Ignore-this: f97692807c74bcab56d33100c899f829 ] [CLI: Support for https url in option --node-url Francois Deppierraz **20100430185609 Ignore-this: 1717176b4d27c877e6bc67a944d9bf34 This patch modifies the regular expression used for verifying of '--node-url' parameter. Support for accessing a Tahoe gateway over HTTPS was already present, thanks to Python's urllib. ] [backupdb.did_create_directory: use REPLACE INTO, not INSERT INTO + ignore error Brian Warner **20100428050803 Ignore-this: 1fca7b8f364a21ae413be8767161e32f This handles the case where we upload a new tahoe directory for a previously-processed local directory, possibly creating a new dircap (if the metadata had changed). Now we replace the old dirhash->dircap record. The previous behavior left the old record in place (with the old dircap and timestamps), so we'd never stop creating new directories and never converge on a null backup. ] ["tahoe webopen": add --info flag, to get ?t=info Brian Warner **20100424233003 Ignore-this: 126b0bb6db340fabacb623d295eb45fa Also fix some trailing whitespace. ] [setup: reorder and extend the show-tool-versions script, the better to glean information about our new buildslaves zooko@zooko.com**20100504045643 Ignore-this: 836084b56b8d4ee8f1de1f4efb706d36 ] [docs: install.html http-equiv refresh to quickstart.html zooko@zooko.com**20100421165708 Ignore-this: 52b4b619f9dde5886ae2cd7f1f3b734b ] [docs: install.html -> quickstart.html zooko@zooko.com**20100421155757 Ignore-this: 6084e203909306bed93efb09d0e6181d It is not called "installing" because that implies that it is going to change the configuration of your operating system. It is not called "building" because that implies that you need developer tools like a compiler. Also I added a stern warning against looking at the "InstallDetails" wiki page, which I have renamed to "AdvancedInstall". ] [Fix another typo in tahoe_storagespace munin plugin david-sarah@jacaranda.org**20100416220935 Ignore-this: ad1f7aa66b554174f91dfb2b7a3ea5f3 ] [Add dependency on windmill >= 1.3 david-sarah@jacaranda.org**20100416190404 Ignore-this: 4437a7a464e92d6c9012926b18676211 ] [licensing: phrase the OpenSSL-exemption in the vocabulary of copyright instead of computer technology, and replicate the exemption from the GPL to the TGPPL zooko@zooko.com**20100414232521 Ignore-this: a5494b2f582a295544c6cad3f245e91 ] [munin-tahoe_storagespace freestorm77@gmail.com**20100221203626 Ignore-this: 14d6d6a587afe1f8883152bf2e46b4aa Plugin configuration rename ] [setup: add licensing declaration for setuptools (noticed by the FSF compliance folks) zooko@zooko.com**20100309184415 Ignore-this: 2dfa7d812d65fec7c72ddbf0de609ccb ] [setup: fix error in licensing declaration from Shawn Willden, as noted by the FSF compliance division zooko@zooko.com**20100309163736 Ignore-this: c0623d27e469799d86cabf67921a13f8 ] [CREDITS to Jacob Appelbaum zooko@zooko.com**20100304015616 Ignore-this: 70db493abbc23968fcc8db93f386ea54 ] [desert-island-build-with-proper-versions jacob@appelbaum.net**20100304013858] [docs: a few small edits to try to guide newcomers through the docs zooko@zooko.com**20100303231902 Ignore-this: a6aab44f5bf5ad97ea73e6976bc4042d These edits were suggested by my watching over Jake Appelbaum's shoulder as he completely ignored/skipped/missed install.html and also as he decided that debian.txt wouldn't help him with basic installation. Then I threw in a few docs edits that have been sitting around in my sandbox asking to be committed for months. ] [TAG allmydata-tahoe-1.6.1 david-sarah@jacaranda.org**20100228062314 Ignore-this: eb5f03ada8ea953ee7780e7fe068539 ] Patch bundle hash: 8d679b706a82f068012361b83fdf2ba6c860595f