Commit graph

38582 commits

Author SHA1 Message Date
jwodder
30defd434e Correct author 2020-12-09 14:11:07 +00:00
jwodder
6c0bd08b9d 2020-12-09 14:09:47 +00:00
Joey Hess
b9c1aa9258
reword 2020-12-08 15:55:00 -04:00
Joey Hess
592e0ada16
update 2020-12-08 15:46:09 -04:00
Joey Hess
d81bf4e018
Merge branch 'message-serialization' 2020-12-08 15:23:43 -04:00
Joey Hess
41f2c308ff
stall detection is working
New config annex.stalldetection, remote.name.annex-stalldetection, which
can be used to deal with remotes that stall during transfers, or are
sometimes too slow to want to use.

This commit was sponsored by Luke Shumaker on Patreon.
2020-12-08 15:22:18 -04:00
Joey Hess
09ed9f7d1f
reminder for later 2020-12-08 15:20:05 -04:00
Joey Hess
c4d489f7d4
add todo
Not going to do this yet, so remember for later.
2020-12-08 15:17:35 -04:00
Joey Hess
794fc72afb
avoid parseDuration succeeding on empty string 2020-12-08 12:51:56 -04:00
Joey Hess
b9cfd15e90
add killTransferrer
There is redundant code in the assistant that does the same thing,
but that code uses a PID, not a ProcessHandle, and gets the PID from,
apparently, the TransferInfo transferPid (although I can't seem to find
where that gets set on non-windows).
2020-12-08 11:43:06 -04:00
Joey Hess
822a8eadf8
rename 2020-12-08 10:53:07 -04:00
Joey Hess
9c4ec1140e
Merge branch 'master' of ssh://git-annex.branchable.com 2020-12-07 16:56:41 -04:00
Joey Hess
2cb3f3a99d
annex.stalldetection docs
Not implemented yet.

This commit was sponsored by Svenne Krap on Patreon.
2020-12-07 16:55:24 -04:00
Joey Hess
d616881057
devblog 2020-12-07 16:54:57 -04:00
Joey Hess
fcc9e01556
finally using transferkeys
Seems to work! Even progress bars. Have not tested prompting or various
error message displays yet.

transferkeys had to be made to operate in different modes for the
Assistant and Annex monads. A bit ugly, but it did relegate that
really ugly Database.Keys.closeDb in transferkeys to only the assistant
code path.

This commit was sponsored by Noam Kremen.
2020-12-07 16:18:26 -04:00
Joey Hess
4c47568876
refactoring
This is groundwork for using git-annex transferkeys to run transfers,
in order to allow stalled transfers to be interrupted and retried.

The new upload and download are closer to what git-annex transferkeys
does, so the plan is to make them use it.

Then things that were left using upload' and download' won't recover
from stalls. Notably, that includes import and export. But
at least get/move/copy will be able to. (Also the assistant hopefully,
but not yet.)

This commit was sponsored by Jake Vosloo on Patreon.
2020-12-07 14:49:17 -04:00
yarikoptic
d5bfa9bdf9 added datalad project tag 2020-12-07 18:23:28 +00:00
jwodder
7db3832e37 2020-12-07 17:36:34 +00:00
Joey Hess
a0e1650a15
Merge branch 'master' into message-serialization 2020-12-07 13:33:14 -04:00
Joey Hess
47016fc656
move TransferrerPool from Assistant state to Annex state
This commit was sponsored by Graham Spencer on Patreon.
2020-12-07 13:21:35 -04:00
Joey Hess
72e5764a87
move TransferrerPool from assistant
This old code will now be useful for git-annex beyond the assistant.

git-annex won't use the CheckTransferrer part, and won't run transferkeys
as a batch process, and will want withTransferrer to not shut down
transferkeys processes. Still, the rest of this is a good fit for what I
need now.

Also removed some dead code, and simplified a little bit.

This commit was sponsored by Mark Reidenbach on Patreon.
2020-12-07 12:50:48 -04:00
Lukey
a1b2271713 Added a comment 2020-12-05 13:07:31 +00:00
Joey Hess
74a5a604bf
reword 2020-12-04 23:52:33 -04:00
Joey Hess
c61a024f59
correction 2020-12-04 23:49:23 -04:00
Joey Hess
0c15d90076
typo 2020-12-04 23:44:49 -04:00
Joey Hess
9e85c95ebe
clarify 2020-12-04 23:43:14 -04:00
Joey Hess
dcca24dc95
simplify 2020-12-04 23:41:44 -04:00
Joey Hess
55c5df5162
Merge branch 'master' of ssh://git-annex.branchable.com 2020-12-04 23:38:42 -04:00
Joey Hess
c9fbf00b96
update 2020-12-04 23:36:52 -04:00
eric.w@eee65cd362d995ced72640c7cfae388ae93a4234
73e8b79cce 2020-12-05 00:43:43 +00:00
eric.w@eee65cd362d995ced72640c7cfae388ae93a4234
7e58bc8e70 2020-12-05 00:42:42 +00:00
kyle
d1ffd246bf bug: alwayscommit=false on windows 2020-12-04 21:05:25 +00:00
Joey Hess
efbc77f505
reword 2020-12-04 15:46:46 -04:00
Joey Hess
fa082f1f4f
fix link 2020-12-04 15:45:37 -04:00
Joey Hess
5fc60b8bd9
devblog 2020-12-04 15:43:03 -04:00
Joey Hess
2878ab4566
Merge branch 'master' of ssh://git-annex.branchable.com 2020-12-04 15:01:12 -04:00
Joey Hess
27f221cd7e
update 2020-12-04 15:00:49 -04:00
Joey Hess
438d5be1f7
support prompt in message serialization
That seems to be the last thing needed for message serialization.
Although it's only used in the assistant currently, so hard to tell if I
forgot something.

At this point, it should be possible to start using transferkeys
when performing transfers, which will allow killing a transferkeys
process if a transfer times out or stalls. But that's for another day.

This commit was sponsored by Ethan Aubin.
2020-12-04 14:54:09 -04:00
Joey Hess
581792bcf0
Merge branch 'master' into message-serialization 2020-12-04 13:55:49 -04:00
Joey Hess
e5b170aa1c
switch back to POSIXTime
turned out not to need Read MeterState
2020-12-04 13:54:33 -04:00
Joey Hess
31e417f351
finish message serialization of progress meters
Any given transfer can only display 1 progress meter at a time, or so
this code assumes. In some cases, there are progress meters for
different stages of a transfer, perhaps, and that is supported by this.

This commit was sponsored by Ethan Aubin.
2020-12-04 13:50:46 -04:00
Joey Hess
4efecaebd6
generalize to allow running in Assistant monad 2020-12-04 13:07:30 -04:00
Joey Hess
7a9b618d5d
fix problem with last commit and assistant
liftAnnex blocks all others calls, so avoid using it with a long-duration
call to readResponse.
2020-12-04 12:20:04 -04:00
Joey Hess
4d9f416949
idea 2020-12-04 00:00:40 -04:00
Joey Hess
bf76ae2c90
mention new branch 2020-12-03 16:29:22 -04:00
Joey Hess
cad147cbbf
new protocol for transferkeys, with message serialization
Necessarily threw out the old protocol, so if an old git-annex assistant
is running, and starts a transferkeys from the new git-annex, it would
fail. But, that seems unlikely; the assistant starts up transferkeys
processes and then keeps them running. Still, may need to test that
scenario.

The new protocol is simple read/show and looks like this:

TransferRequest Download (Right "origin") (Key {keyName = "f8f8766a836fb6120abf4d5328ce8761404e437529e997aaa0363bdd4fecd7bb", keyVariety = SHA2Key (HashSize 256) (HasExt True), keySize = Just 30, keyMtime = Nothing, keyChunkSize = Nothing, keyChunkNum = Nothing}) (AssociatedFile (Just "foo"))
TransferOutput (ProgressMeter (Just 30) (MeterState {meterBytesProcessed = BytesProcessed 0, meterTimeStamp = 1.6070268727892535e9}) (MeterState {meterBytesProcessed = BytesProcessed 30, meterTimeStamp = 1.6070268728043e9}))
TransferOutput (OutputMessage "(checksum...) ")
TransferResult True

Granted, this is not optimally fast, but it seems good enough, and is
probably nearly as fast as the old protocol anyhow.

emitSerializedOutput for ProgressMeter is not yet implemented. It needs
to somehow start or update a progress meter. There may need to be a new
message that allocates a progress meter, and then have ProgressMeter
update it.

This commit was sponsored by Ethan Aubin
2020-12-03 16:21:20 -04:00
Joey Hess
82dbc4387c
comments 2020-12-03 14:57:22 -04:00
Joey Hess
e7f42e2ec7
when serializing messages, include json objects
This is done always, it's up to the comsumer to decide if it wants to
output the json objects or the messages.

Messages.JSON.finalize changed to not need a JSONOptions.
As far as I can see, this does not change its behavior,
since addErrorMessage appends to any list that's already there.

This commit was sponsored by Ethan Aubin.
2020-12-03 14:47:04 -04:00
Joey Hess
5a41e46bd4
start on serializing Messages
Json objects not yet handled, and some other special cases, but this is
the bulk of the messages.

For progress meters, POSIXTime does not have a Read instance (or a
suitable Show instance), so had to switch to using a Double for progress
meters.

This commit was sponsored by Ethan Aubin on Patreon.
2020-12-03 13:03:03 -04:00
rshalaev@3e2130a1e3cb0aaff7dd80aba7548ad9be0ea2d4
c82048ba79 Added a comment: Windows 10 NTFS hardlinks not working 2020-12-03 11:43:08 +00:00