Ticket #567: add_version_to_json.darcs.txt

File add_version_to_json.darcs.txt, 19.4 KB (added by freestorm, at 2010-05-30T19:48:36Z)
Line 
1Sun May 30 20:58:22 Paris, Madrid (heure d'été) 2010  freestorm77@gmail.com
2  * add_version_to_json.darcs.txt
3
4New patches:
5
6[add_version_to_json.darcs.txt
7freestorm77@gmail.com**20100530185822
8 Ignore-this: 4bb2aa4f987027f39004385f6d83cf79
9] {
10hunk ./src/allmydata/dirnode.py 25
11 from allmydata.uri import LiteralFileURI, from_string, wrap_dirnode_cap
12 from pycryptopp.cipher.aes import AES
13 from allmydata.util.dictutil import AuxValueDict
14+from allmydata._version import __version__
15 
16 
17 # TODO: {Deleter,MetadataSetter,Adder}.modify all start by unpacking the
18hunk ./src/allmydata/dirnode.py 724
19         self.histograms = {}
20         for k in ["size-files-histogram"]:
21             self.histograms[k] = {} # maps (min,max) to count
22+        self.stats["version"] = str(__version__)
23         self.buckets = [ (0,0), (1,3)]
24         self.root = math.sqrt(10)
25 
26hunk ./src/allmydata/web/check_results.py 10
27 from allmydata.web.operations import ReloadMixin
28 from allmydata.interfaces import ICheckAndRepairResults, ICheckResults
29 from allmydata.util import base32, idlib
30+from allmydata._version import __version__
31 
32 def json_check_counts(d):
33     r = {}
34hunk ./src/allmydata/web/check_results.py 14
35+    r["version"] = str(__version__)
36     r["count-shares-good"] = d["count-shares-good"]
37     r["count-shares-needed"] = d["count-shares-needed"]
38     r["count-shares-expected"] = d["count-shares-expected"]
39hunk ./src/allmydata/web/check_results.py 350
40     def json(self, ctx):
41         inevow.IRequest(ctx).setHeader("content-type", "text/plain")
42         data = {}
43+        data["version"] = str(__version__)
44         data["finished"] = self.monitor.is_finished()
45         res = self.monitor.get_status()
46         data["root-storage-index"] = res.get_root_storage_index_string()
47hunk ./src/allmydata/web/check_results.py 506
48         inevow.IRequest(ctx).setHeader("content-type", "text/plain")
49         res = self.monitor.get_status()
50         data = {}
51+        data["version"] = str(__version__)
52         data["finished"] = self.monitor.is_finished()
53         data["root-storage-index"] = res.get_root_storage_index_string()
54         c = res.get_counters()
55hunk ./src/allmydata/web/directory.py 36
56 from allmydata.web.operations import ReloadMixin
57 from allmydata.web.check_results import json_check_results, \
58      json_check_and_repair_results
59+from allmydata._version import __version__
60 
61 class BlockingFileError(Exception):
62     # TODO: catch and transform
63hunk ./src/allmydata/web/directory.py 931
64             origin_base32 = base32.b2a(m.origin_si)
65         else:
66             origin_base32 = ""
67-        status = { "stats": s["stats"],
68+        status = { "version": str(__version__),
69+                   "stats": s["stats"],
70                    "finished": m.is_finished(),
71                    "origin": origin_base32,
72                    }
73}
74
75Context:
76
77[Document reason for the trialcoverage version requirement being 0.3.3.
78david-sarah@jacaranda.org**20100525004444
79 Ignore-this: 2f9f1df6882838b000c063068f258aec
80]
81[Downgrade version requirement for trialcoverage to 0.3.3 (from 0.3.10), to avoid needing to compile coveragepy on Windows.
82david-sarah@jacaranda.org**20100524233707
83 Ignore-this: 9c397a374c8b8017e2244b8a686432a8
84]
85[Suppress deprecation warning for twisted.web.error.NoResource when using Twisted >= 9.0.0.
86david-sarah@jacaranda.org**20100516205625
87 Ignore-this: 2361a3023cd3db86bde5e1af759ed01
88]
89[docs: CREDITS for Jeremy Visser
90zooko@zooko.com**20100524081829
91 Ignore-this: d7c1465fd8d4e25b8d46d38a1793465b
92]
93[test: show stdout and stderr in case of non-zero exit code from "tahoe" command
94zooko@zooko.com**20100524073348
95 Ignore-this: 695e81cd6683f4520229d108846cd551
96]
97[setup: upgrade bundled zetuptoolz to zetuptoolz-0.6c15dev and make it unpacked and directly loaded by setup.py
98zooko@zooko.com**20100523205228
99 Ignore-this: 24fb32aaee3904115a93d1762f132c7
100 Also fix the relevant "make clean" target behavior.
101]
102[setup: remove bundled zipfile egg of setuptools
103zooko@zooko.com**20100523205120
104 Ignore-this: c68b5f2635bb93d1c1fa7b613a026f9e
105 We're about to replace it with bundled unpacked source code of setuptools, which is much nicer for debugging and evolving under revision control.
106]
107[setup: remove bundled copy of setuptools_trial-0.5.2.tar
108zooko@zooko.com**20100522221539
109 Ignore-this: 140f90eb8fb751a509029c4b24afe647
110 Hopefully it will get installed automatically as needed and we won't bundle it anymore.
111]
112[setup: remove bundled setuptools_darcs-1.2.8.tar
113zooko@zooko.com**20100522015333
114 Ignore-this: 378b1964b513ae7fe22bae2d3478285d
115 This version of setuptools_darcs had a bug when used on Windows which has been fixed in setuptools_darcs-1.2.9. Hopefully we will not need to bundle a copy of setuptools_darcs-1.2.9 in with Tahoe-LAFS and can instead rely on it to be downloaded from PyPI or bundled in the "tahoe deps" separate tarball.
116]
117[tests: fix pyflakes warnings in bench_dirnode.py
118zooko@zooko.com**20100521202511
119 Ignore-this: f23d55b4ed05e52865032c65a15753c4
120]
121[setup: if the string '--reporter=bwverbose-coverage' appears on sys.argv then you need trialcoverage
122zooko@zooko.com**20100521122226
123 Ignore-this: e760c45dcfb5a43c1dc1e8a27346bdc2
124]
125[tests: don't let bench_dirnode.py do stuff and have side-effects at import time (unless __name__ == '__main__')
126zooko@zooko.com**20100521122052
127 Ignore-this: 96144a412250d9bbb5fccbf83b8753b8
128]
129[tests: increase timeout to give François's ARM buildslave a chance to complete the tests
130zooko@zooko.com**20100520134526
131 Ignore-this: 3dd399fdc8b91149c82b52f955b50833
132]
133[run_trial.darcspath
134freestorm77@gmail.com**20100510232829
135 Ignore-this: 5ebb4df74e9ea8a4bdb22b65373d1ff2
136]
137[docs: line-wrap README.txt
138zooko@zooko.com**20100518174240
139 Ignore-this: 670a02d360df7de51ebdcf4fae752577
140]
141[Hush pyflakes warnings
142Kevan Carstensen <kevan@isnotajoke.com>**20100515184344
143 Ignore-this: fd602c3bba115057770715c36a87b400
144]
145[setup: new improved misc/show-tool-versions.py
146zooko@zooko.com**20100516050122
147 Ignore-this: ce9b1de1b35b07d733e6cf823b66335a
148]
149[Improve code coverage of the Tahoe2PeerSelector tests.
150Kevan Carstensen <kevan@isnotajoke.com>**20100515032913
151 Ignore-this: 793151b63ffa65fdae6915db22d9924a
152]
153[Remove a comment that no longer makes sense.
154Kevan Carstensen <kevan@isnotajoke.com>**20100514203516
155 Ignore-this: 956983c7e7c7e4477215494dfce8f058
156]
157[docs: update docs/architecture.txt to more fully and correctly explain the upload procedure
158zooko@zooko.com**20100514043458
159 Ignore-this: 538b6ea256a49fed837500342092efa3
160]
161[Fix up the behavior of #778, per reviewers' comments
162Kevan Carstensen <kevan@isnotajoke.com>**20100514004917
163 Ignore-this: 9c20b60716125278b5456e8feb396bff
164 
165   - Make some important utility functions clearer and more thoroughly
166     documented.
167   - Assert in upload.servers_of_happiness that the buckets attributes
168     of PeerTrackers passed to it are mutually disjoint.
169   - Get rid of some silly non-Pythonisms that I didn't see when I first
170     wrote these patches.
171   - Make sure that should_add_server returns true when queried about a
172     shnum that it doesn't know about yet.
173   - Change Tahoe2PeerSelector.preexisting_shares to map a shareid to a set
174     of peerids, alter dependencies to deal with that.
175   - Remove upload.should_add_servers, because it is no longer necessary
176   - Move upload.shares_of_happiness and upload.shares_by_server to a utility
177     file.
178   - Change some points in Tahoe2PeerSelector.
179   - Compute servers_of_happiness using a bipartite matching algorithm that
180     we know is optimal instead of an ad-hoc greedy algorithm that isn't.
181   - Change servers_of_happiness to just take a sharemap as an argument,
182     change its callers to merge existing_shares and used_peers before
183     calling it.
184   - Change an error message in the encoder to be more appropriate for
185     servers of happiness.
186   - Clarify the wording of an error message in immutable/upload.py
187   - Refactor a happiness failure message to happinessutil.py, and make
188     immutable/upload.py and immutable/encode.py use it.
189   - Move the word "only" as far to the right as possible in failure
190     messages.
191   - Use a better definition of progress during peer selection.
192   - Do read-only peer share detection queries in parallel, not sequentially.
193   - Clean up logging semantics; print the query statistics whenever an
194     upload is unsuccessful, not just in one case.
195 
196]
197[Alter the error message when an upload fails, per some comments in #778.
198Kevan Carstensen <kevan@isnotajoke.com>**20091230210344
199 Ignore-this: ba97422b2f9737c46abeb828727beb1
200 
201 When I first implemented #778, I just altered the error messages to refer to
202 servers where they referred to shares. The resulting error messages weren't
203 very good. These are a bit better.
204]
205[Change "UploadHappinessError" to "UploadUnhappinessError"
206Kevan Carstensen <kevan@isnotajoke.com>**20091205043037
207 Ignore-this: 236b64ab19836854af4993bb5c1b221a
208]
209[Alter the error message returned when peer selection fails
210Kevan Carstensen <kevan@isnotajoke.com>**20091123002405
211 Ignore-this: b2a7dc163edcab8d9613bfd6907e5166
212 
213 The Tahoe2PeerSelector returned either NoSharesError or NotEnoughSharesError
214 for a variety of error conditions that weren't informatively described by them.
215 This patch creates a new error, UploadHappinessError, replaces uses of
216 NoSharesError and NotEnoughSharesError with it, and alters the error message
217 raised with the errors to be more in line with the new servers_of_happiness
218 behavior. See ticket #834 for more information.
219]
220[Eliminate overcounting iof servers_of_happiness in Tahoe2PeerSelector; also reorganize some things.
221Kevan Carstensen <kevan@isnotajoke.com>**20091118014542
222 Ignore-this: a6cb032cbff74f4f9d4238faebd99868
223]
224[Change stray "shares_of_happiness" to "servers_of_happiness"
225Kevan Carstensen <kevan@isnotajoke.com>**20091116212459
226 Ignore-this: 1c971ba8c3c4d2e7ba9f020577b28b73
227]
228[Alter Tahoe2PeerSelector to make sure that it recognizes existing shares on readonly servers, fixing an issue in #778
229Kevan Carstensen <kevan@isnotajoke.com>**20091116192805
230 Ignore-this: 15289f4d709e03851ed0587b286fd955
231]
232[Alter 'immutable/encode.py' and 'immutable/upload.py' to use servers_of_happiness instead of shares_of_happiness.
233Kevan Carstensen <kevan@isnotajoke.com>**20091104111222
234 Ignore-this: abb3283314820a8bbf9b5d0cbfbb57c8
235]
236[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.
237Kevan Carstensen <kevan@isnotajoke.com>**20091104033241
238 Ignore-this: b3a6649a8ac66431beca1026a31fed94
239]
240[Alter CiphertextDownloader to work with servers_of_happiness
241Kevan Carstensen <kevan@isnotajoke.com>**20090924041932
242 Ignore-this: e81edccf0308c2d3bedbc4cf217da197
243]
244[Revisions of the #778 tests, per reviewers' comments
245Kevan Carstensen <kevan@isnotajoke.com>**20100514012542
246 Ignore-this: 735bbc7f663dce633caeb3b66a53cf6e
247 
248 - Fix comments and confusing naming.
249 - Add tests for the new error messages suggested by David-Sarah
250   and Zooko.
251 - Alter existing tests for new error messages.
252 - Make sure that the tests continue to work with the trunk.
253 - Add a test for a mutual disjointedness assertion that I added to
254   upload.servers_of_happiness.
255 - Fix the comments to correctly reflect read-onlyness
256 - Add a test for an edge case in should_add_server
257 - Add an assertion to make sure that share redistribution works as it
258   should
259 - Alter tests to work with revised servers_of_happiness semantics
260 - Remove tests for should_add_server, since that function no longer exists.
261 - Alter tests to know about merge_peers, and to use it before calling
262   servers_of_happiness.
263 - Add tests for merge_peers.
264 - Add Zooko's puzzles to the tests.
265 - Edit encoding tests to expect the new kind of failure message.
266 - Edit tests to expect error messages with the word "only" moved as far
267   to the right as possible.
268 - Extended and cleaned up some helper functions.
269 - Changed some tests to call more appropriate helper functions.
270 - Added a test for the failing redistribution algorithm
271 - Added a test for the progress message
272 - Added a test for the upper bound on readonly peer share discovery.
273 
274]
275[Alter various unit tests to work with the new happy behavior
276Kevan Carstensen <kevan@isnotajoke.com>**20100107181325
277 Ignore-this: 132032bbf865e63a079f869b663be34a
278]
279[Replace "UploadHappinessError" with "UploadUnhappinessError" in tests.
280Kevan Carstensen <kevan@isnotajoke.com>**20091205043453
281 Ignore-this: 83f4bc50c697d21b5f4e2a4cd91862ca
282]
283[Add tests for the behavior described in #834.
284Kevan Carstensen <kevan@isnotajoke.com>**20091123012008
285 Ignore-this: d8e0aa0f3f7965ce9b5cea843c6d6f9f
286]
287[Re-work 'test_upload.py' to be more readable; add more tests for #778
288Kevan Carstensen <kevan@isnotajoke.com>**20091116192334
289 Ignore-this: 7e8565f92fe51dece5ae28daf442d659
290]
291[Test Tahoe2PeerSelector to make sure that it recognizeses existing shares on readonly servers
292Kevan Carstensen <kevan@isnotajoke.com>**20091109003735
293 Ignore-this: 12f9b4cff5752fca7ed32a6ebcff6446
294]
295[Add more tests for comment:53 in ticket #778
296Kevan Carstensen <kevan@isnotajoke.com>**20091104112849
297 Ignore-this: 3bb2edd299a944cc9586e14d5d83ec8c
298]
299[Add a test for upload.shares_by_server
300Kevan Carstensen <kevan@isnotajoke.com>**20091104111324
301 Ignore-this: f9802e82d6982a93e00f92e0b276f018
302]
303[Minor tweak to an existing test -- make the first server read-write, instead of read-only
304Kevan Carstensen <kevan@isnotajoke.com>**20091104034232
305 Ignore-this: a951a46c93f7f58dd44d93d8623b2aee
306]
307[Alter tests to use the new form of set_shareholders
308Kevan Carstensen <kevan@isnotajoke.com>**20091104033602
309 Ignore-this: 3deac11fc831618d11441317463ef830
310]
311[Refactor some behavior into a mixin, and add tests for the behavior described in #778
312"Kevan Carstensen" <kevan@isnotajoke.com>**20091030091908
313 Ignore-this: a6f9797057ca135579b249af3b2b66ac
314]
315[Alter NoNetworkGrid to allow the creation of readonly servers for testing purposes.
316Kevan Carstensen <kevan@isnotajoke.com>**20091018013013
317 Ignore-this: e12cd7c4ddeb65305c5a7e08df57c754
318]
319[Update 'docs/architecture.txt' to reflect readonly share discovery
320kevan@isnotajoke.com**20100514003852
321 Ignore-this: 7ead71b34df3b1ecfdcfd3cb2882e4f9
322]
323[Alter the wording in docs/architecture.txt to more accurately describe the servers_of_happiness behavior.
324Kevan Carstensen <kevan@isnotajoke.com>**20100428002455
325 Ignore-this: 6eff7fa756858a1c6f73728d989544cc
326]
327[Alter wording in 'interfaces.py' to be correct wrt #778
328"Kevan Carstensen" <kevan@isnotajoke.com>**20091205034005
329 Ignore-this: c9913c700ac14e7a63569458b06980e0
330]
331[Update 'docs/configuration.txt' to reflect the servers_of_happiness behavior.
332Kevan Carstensen <kevan@isnotajoke.com>**20091205033813
333 Ignore-this: 5e1cb171f8239bfb5b565d73c75ac2b8
334]
335[Clarify quickstart instructions for installing pywin32
336david-sarah@jacaranda.org**20100511180300
337 Ignore-this: d4668359673600d2acbc7cd8dd44b93c
338]
339[web: add a simple test that you can load directory.xhtml
340zooko@zooko.com**20100510063729
341 Ignore-this: e49b25fa3c67b3c7a56c8b1ae01bb463
342]
343[setup: fix typos in misc/show-tool-versions.py
344zooko@zooko.com**20100510063615
345 Ignore-this: 2181b1303a0e288e7a9ebd4c4855628
346]
347[setup: show code-coverage tool versions in show-tools-versions.py
348zooko@zooko.com**20100510062955
349 Ignore-this: 4b4c68eb3780b762c8dbbd22b39df7cf
350]
351[docs: update README, mv it to README.txt, update setup.py
352zooko@zooko.com**20100504094340
353 Ignore-this: 40e28ca36c299ea1fd12d3b91e5b421c
354]
355[Dependency on Windmill test framework is not needed yet.
356david-sarah@jacaranda.org**20100504161043
357 Ignore-this: be088712bec650d4ef24766c0026ebc8
358]
359[tests: pass z to tar so that BSD tar will know to ungzip
360zooko@zooko.com**20100504090628
361 Ignore-this: 1339e493f255e8fc0b01b70478f23a09
362]
363[setup: update comments and URLs in setup.cfg
364zooko@zooko.com**20100504061653
365 Ignore-this: f97692807c74bcab56d33100c899f829
366]
367[setup: reorder and extend the show-tool-versions script, the better to glean information about our new buildslaves
368zooko@zooko.com**20100504045643
369 Ignore-this: 836084b56b8d4ee8f1de1f4efb706d36
370]
371[CLI: Support for https url in option --node-url
372Francois Deppierraz <francois@ctrlaltdel.ch>**20100430185609
373 Ignore-this: 1717176b4d27c877e6bc67a944d9bf34
374 
375 This patch modifies the regular expression used for verifying of '--node-url'
376 parameter.  Support for accessing a Tahoe gateway over HTTPS was already
377 present, thanks to Python's urllib.
378 
379]
380[backupdb.did_create_directory: use REPLACE INTO, not INSERT INTO + ignore error
381Brian Warner <warner@lothar.com>**20100428050803
382 Ignore-this: 1fca7b8f364a21ae413be8767161e32f
383 
384 This handles the case where we upload a new tahoe directory for a
385 previously-processed local directory, possibly creating a new dircap (if the
386 metadata had changed). Now we replace the old dirhash->dircap record. The
387 previous behavior left the old record in place (with the old dircap and
388 timestamps), so we'd never stop creating new directories and never converge
389 on a null backup.
390]
391["tahoe webopen": add --info flag, to get ?t=info
392Brian Warner <warner@lothar.com>**20100424233003
393 Ignore-this: 126b0bb6db340fabacb623d295eb45fa
394 
395 Also fix some trailing whitespace.
396]
397[docs: install.html http-equiv refresh to quickstart.html
398zooko@zooko.com**20100421165708
399 Ignore-this: 52b4b619f9dde5886ae2cd7f1f3b734b
400]
401[docs: install.html -> quickstart.html
402zooko@zooko.com**20100421155757
403 Ignore-this: 6084e203909306bed93efb09d0e6181d
404 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".
405]
406[Fix another typo in tahoe_storagespace munin plugin
407david-sarah@jacaranda.org**20100416220935
408 Ignore-this: ad1f7aa66b554174f91dfb2b7a3ea5f3
409]
410[Add dependency on windmill >= 1.3
411david-sarah@jacaranda.org**20100416190404
412 Ignore-this: 4437a7a464e92d6c9012926b18676211
413]
414[licensing: phrase the OpenSSL-exemption in the vocabulary of copyright instead of computer technology, and replicate the exemption from the GPL to the TGPPL
415zooko@zooko.com**20100414232521
416 Ignore-this: a5494b2f582a295544c6cad3f245e91
417]
418[munin-tahoe_storagespace
419freestorm77@gmail.com**20100221203626
420 Ignore-this: 14d6d6a587afe1f8883152bf2e46b4aa
421 
422 Plugin configuration rename
423 
424]
425[setup: add licensing declaration for setuptools (noticed by the FSF compliance folks)
426zooko@zooko.com**20100309184415
427 Ignore-this: 2dfa7d812d65fec7c72ddbf0de609ccb
428]
429[setup: fix error in licensing declaration from Shawn Willden, as noted by the FSF compliance division
430zooko@zooko.com**20100309163736
431 Ignore-this: c0623d27e469799d86cabf67921a13f8
432]
433[CREDITS to Jacob Appelbaum
434zooko@zooko.com**20100304015616
435 Ignore-this: 70db493abbc23968fcc8db93f386ea54
436]
437[desert-island-build-with-proper-versions
438jacob@appelbaum.net**20100304013858]
439[docs: a few small edits to try to guide newcomers through the docs
440zooko@zooko.com**20100303231902
441 Ignore-this: a6aab44f5bf5ad97ea73e6976bc4042d
442 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.
443]
444[TAG allmydata-tahoe-1.6.1
445david-sarah@jacaranda.org**20100228062314
446 Ignore-this: eb5f03ada8ea953ee7780e7fe068539
447]
448Patch bundle hash:
4492bb415741d1f44181cc4426d42c579cf223b1cbd