Commit Graph

357 Commits

Author SHA1 Message Date
Jean-Paul Calderone
f4950cff46 Convert some code to show it off 2019-03-07 13:14:52 -05:00
Jean-Paul Calderone
0be2cbccc9 We don't need quoting in Eliot structured logs.
Also quote_filepath seems to be doing the wrong thing but it's not entirely
clear how.
2019-03-04 11:00:08 -05:00
Jean-Paul Calderone
fa3429f1cc Serialize queue items using their path and type 2019-03-04 10:47:05 -05:00
Jean-Paul Calderone
3b804d84bf Restore the log event that the integration tests depend on 2019-02-27 09:12:09 -05:00
Jean-Paul Calderone
46692b5835 remove the duplicate reporting of this failure
it bubbles out of _process and the caller logs it
2019-02-26 15:10:33 -05:00
Jean-Paul Calderone
f89fe3a5ad get this item status in the right action context 2019-02-26 15:10:24 -05:00
Jean-Paul Calderone
42d8e8dba4 overcome finger muscle memory 2019-02-26 15:09:55 -05:00
Jean-Paul Calderone
9351e47ae6 improve events reporting 2019-02-26 15:09:48 -05:00
Jean-Paul Calderone
ebeeba456f fix conflict logging 2019-02-26 14:38:24 -05:00
Jean-Paul Calderone
3fca501d45 unused 2019-02-26 14:38:00 -05:00
Jean-Paul Calderone
92449563d4 no callers remain 2019-02-26 14:26:45 -05:00
Jean-Paul Calderone
7d8d74425c Convert Downloader._process 2019-02-26 14:26:37 -05:00
Jean-Paul Calderone
248449fefa convert _filter_batch_to_deque 2019-02-26 14:26:00 -05:00
Jean-Paul Calderone
354dceda79 Get rid of last returnValue use
Supporting it with Eliot is challenging and we don't actually need it.
2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
79bfb8acb6 can't log self! bluh 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
437084c300 pull this up and use it more 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
15601a37e9 it's a set apparently 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
436b91b463 oops @log_call is not Deferred friendly 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
92cf9b8232 done with those! 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
9efed05571 partial conversion of complex _process 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
e820698194 Simplified _perform_scan conversion 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
ef69bb83f4 another improvement to scan_listing 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
17597e53c9 improvement to scan_listing 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
7790820efd convert start_downloading 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
3b38a228b0 Relax restriction on mtime 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
91d86363ec Convert the rest of _write_downloaded_file 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
529389a48c Convert _write_downloaded_file 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
ad5cfd0e45 convert a couple rename helpers 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
03f480e5be convert _real_notify 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
c3e50a4536 convert _notify 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
bfb039c6c6 convert _scan 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
5410acd745 use this helper
it might even let us refactor someday
2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
999b8bdbd7 convert _full_scan 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
d7bb97ae05 Factor out repeated queue processor identification 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
f553469944 convert add_pending 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
2761d38ce2 convert start_uploading 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
28a4a61dab convert stop(_monitoring) 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
44a8ac8161 convert start_monitoring 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
c88b66fb05 remove unused helper 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
491e0ecde3 Convert another _process and some helpers 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
83c4056a5d Convert _process_deque 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
2b9e6784ab news fragment 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
d52e9ccc6f unused attribute 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
587f50882e Convert _begin_processing 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
9207e07407 There need be no "debug log". 2019-02-26 13:45:39 -05:00
Jean-Paul Calderone
89e59dde05 Revert _perform_scan to inlineCallbacks style 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
121fdc141b Slightly improved API documentation 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
42c1d3939f _begin_processing cleanups 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
7d2827b93d Better docs for QueueMixin.stop 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
049a535048 reduce repetition 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
a2b4455229 try to reduce the size of the diff relative to master 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
7a9f52d2e5 make sure shutdown failures go somewhere good 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
88eb368db1 Further Eliotification 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
f1a7dcf309 A fair bit more Eliot conversion 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
9966cb26d2 Basic _process logging 2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
7e89776349 Convert various logging to use Eliot
This unfortunately also involves refactoring some inlineCallbacks-using code
to not use inlineCallbacks.
2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
89bb68254b Speed up MagicFolder service shutdown
Also work-around a tricky, mysterious failure in the test suite by explicitly
flushing the eventual call queue.  I don't understand where the call that is
landing there comes from or why some other part of the code isn't properly
waiting on it.
2019-01-31 08:16:57 -05:00
Jean-Paul Calderone
7e9e447d5b Disable Twisted's Docker check wrt inotify support
It breaks our container-based CI, which is perfectly happy to give us inotify
functionality, as is Docker in general as long as you don't use overlayfs.
2019-01-24 14:00:50 -05:00
meejah
cce4a92900 fix path-creation cases after merge 2018-08-25 02:12:02 -06:00
meejah
c219102afc
Merge pull request #492 from exarkun/2879.magic-folder-create-and-umask.0
Create the magic-folder local directory if necessary
2018-05-07 09:49:39 -06:00
meejah
c9e00a988a
Merge pull request #475 from meejah/2909.backup-behavior.0
#2909 fix .backup file behavior and (some of) the incorrect .conflict cases (#2911)
2018-05-01 15:52:10 -06:00
Jean-Paul Calderone
4cc1c2171d Merge remote-tracking branch 'origin/master' into 2879.magic-folder-create-and-umask.0 2018-05-01 14:24:54 -04:00
meejah
6352db9c01 comment + logging cleanup 2018-04-30 14:55:51 -06:00
meejah
b53ea0a11c redundant 2018-04-30 14:55:51 -06:00
meejah
fbc142d346 re-jig 'the logic' 2018-04-30 14:55:51 -06:00
meejah
6d5355fda3 moar unit-tests 2018-04-30 14:55:51 -06:00
meejah
5f417c5179 objects_conflicted fixup 2018-04-30 14:55:51 -06:00
meejah
99c3d7f23f this shouldn't have gotten removed 2018-04-30 14:55:51 -06:00
meejah
927ee097e5 remove prints 2018-04-30 14:55:51 -06:00
meejah
65ceda3a32 fix conflict behavior 2018-04-30 14:55:51 -06:00
meejah
7975efbe8d whitespace and a comment 2018-04-30 14:55:51 -06:00
meejah
cc93a12a85 Test fixups 2018-04-30 14:55:51 -06:00
meejah
435b30c7aa use local last_uploaded_uri, last class of conflict from spec 2018-04-30 14:55:51 -06:00
meejah
affb80e39e test fixups 2018-04-30 14:55:51 -06:00
meejah
47b1787633 stop writing .backup files for normal overwrites 2018-04-30 14:55:51 -06:00
meejah
a1db8f4708 some logging fixups and notes on backup behavior 2018-04-30 14:55:51 -06:00
Jean-Paul Calderone
64243527eb Remove the strange option to not use flog 2018-04-26 15:08:14 -04:00
Jean-Paul Calderone
a7218cb16f Some nice documnetation and proper exception types 2018-04-23 18:46:12 -04:00
Jean-Paul Calderone
169ccbfbca directory creation fixes 2018-04-23 18:46:07 -04:00
Jean-Paul Calderone
cfa33332a5 Add missing information/import 2018-04-23 11:09:24 -04:00
Jean-Paul Calderone
8d104dab1c Move the complicated MagicFolder constructor
All that complexity can be part of MagicFolder itself.
2018-04-23 10:59:33 -04:00
Jean-Paul Calderone
ac6269dd2d Only read magic-folder config from config reader
Also, fix the umask feature which was completely broken previously due
to failure to parse the umask string into an integer.
2018-04-23 10:41:48 -04:00
Jean-Paul Calderone
0bdabacce3 document the node_directory parameter 2018-04-23 10:41:48 -04:00
meejah
57cc877c57 add some context to logging 2018-03-20 11:40:49 -06:00
meejah
30811d8818 typo 2018-03-20 11:40:49 -06:00
meejah
797932244d log failure properly, add test 2018-03-20 11:40:49 -06:00
meejah
39080852cc ensure 'in progress' items return status 2018-03-20 11:40:49 -06:00
meejah
dbc9f7e06c remove code that sets item size (from review) 2018-03-20 11:40:49 -06:00
meejah
1b16e1f792 Some documentation for QueueMixin 2018-03-20 11:40:49 -06:00
meejah
bfabfeba64 add 'size' to tests, print unicode 2018-03-20 11:40:49 -06:00
meejah
0ebb587666 report download sizes in magic-folder status 2018-03-20 11:40:49 -06:00
meejah
0431be14fa log inotify callback errors 2018-03-20 11:40:49 -06:00
meejah
42766da553 add a 'size' to pending uploads 2018-03-20 11:40:49 -06:00
meejah
8ac63cf5bd only keep history for items that are processed 2018-03-20 11:40:49 -06:00
meejah
bcdd15394b ensure there are no gaps in magic-folder status 2018-03-20 11:40:49 -06:00
meejah
0b25cad71e documentation fixups from daira's review 2018-02-06 15:28:02 -07:00
meejah
1171bf13af ticket #2882: preserve user mtime 2018-02-06 15:27:56 -07:00
meejah
68783d8b8a directories get +x, files do not 2018-01-09 01:26:37 -07:00
Brian Warner
5e62118e14 hush somewhat-real problems found by static analysis
These would have caused problems if a certain unlikely code path was taken:
mostly error-handling pathways.
2017-12-31 00:23:43 +01:00
Brian Warner
da4e7dcfbe hush a bunch of not-really-problems caught by the lgtm.com static analyzer
This is all minor stuff: unreachable debug code (that should be commented-out
instead of in an 'if False:' block), unnecessary 'pass' and 'global'
statements, redundantly-initialized variables. No behavior changes. Nothing
here was actually broken, it just looked suspicious to the static analysis at
https://lgtm.com/projects/g/tahoe-lafs/tahoe-lafs/alerts/?mode=list .
2017-12-31 00:19:41 +01:00