Commit graph

38589 commits

Author SHA1 Message Date
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
Lukey
b0320b1108 Added a comment 2020-12-03 07:38:31 +00:00
rshalaev@3e2130a1e3cb0aaff7dd80aba7548ad9be0ea2d4
894d7c07aa removed 2020-12-03 01:44:01 +00:00
rshalaev@3e2130a1e3cb0aaff7dd80aba7548ad9be0ea2d4
08c6ffa117 Added a comment 2020-12-03 01:43:20 +00:00
rshalaev@3e2130a1e3cb0aaff7dd80aba7548ad9be0ea2d4
c9b33c553d Added a comment 2020-12-03 01:43:00 +00:00
Joey Hess
63839532c9
remove uses of warningIO
It's not concurrent-output safe, and doesn't support
--json-error-messages.

Using Annex.makeRunner is a bit scary, because what if it's run in a
different thread from an active annex action? Normally the same Annex
state is not used concurrently in several threads, and it's not designed
to be fully concurrency safe. (Annex.Concurrent exists to deal with
that.) I think it will be ok in these simple cases though. Eg,
when buffering a warning message to json, Annex.changeState is used,
and it modifies the MVar in a concurrency safe way.

The only warningIO remaining is not a problem.
2020-12-02 14:57:43 -04:00
Joey Hess
1858b65d88
design work 2020-12-02 14:31:24 -04:00
falsifian
cf649b5753 Added a comment 2020-12-02 16:52:10 +00:00
basak
439e3f8e24 Added a comment 2020-12-02 02:12:59 +00:00
https://launchpad.net/~barthelemy
6360c0f53c Added a comment 2020-12-01 21:55:31 +00:00
Joey Hess
0540e987b3
improve p2p protocol handling of requested object not available
Avoid spurious "verification of content failed" message when downloading
content from a ssh or tor remote fails due to the remote no longer having a
copy of the content.

The P2P protocol already handled this case by sending DATA 0, followed by
VALID. But VALID was not really right, because the data is not the
requested data. So, send DATA 0, followed by INVALID. Old versions of
git-annex handle INVALID the same as VALID in this case. Now new versions
avoid displaying an incorrect message.

It would be better for the P2P protocol to have a different way to indicate
this, like perhaps sending INVALID without DATA. But that would be a
breaking change and need a new protocol verison. Since INVALID already is
part of the protocol and already needs to be handled, using it for this
special case too seems ok, and avoids the complication of another protocol
version.

This commit was sponsored by Jochen Bartl on Patreon.
2020-12-01 16:05:55 -04:00
Joey Hess
ca4a928635
add show instance 2020-12-01 15:39:57 -04:00
Joey Hess
92136284b1
avoid hGetMetered 0 closing the handle
This is an edge case, which happened to be triggered by the P2P protocol
seeing DATA 0. When reading 0 bytes, getting an empty string does
not mean the handle has reached EOF.

I verified there was in fact a bug, where get of an empty file followed
by another file would get the empty file and then fail
with "handle is closed". This fixes it.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2020-12-01 15:39:22 -04:00
Joey Hess
41bb873319
comment 2020-12-01 12:59:10 -04:00
falsifian
a9ade9e6f8 2020-11-30 20:35:21 +00:00
dzhu
17ce86e2d3 Added a comment 2020-11-30 19:10:54 +00:00
Joey Hess
3416997174
remove digression 2020-11-30 13:31:02 -04:00
Joey Hess
ee86972f66
thought 2020-11-30 13:27:45 -04:00
Joey Hess
e843334a40
comment 2020-11-30 13:13:56 -04:00
Joey Hess
7776677a5f
Fix hang on shutdown of external special remote using ASYNC protocol extension.
Reversion introduced in version 8.20201007, one release after the 1st
release with the extension.

Surprisingly, hClose can hang if another thread is reading from the
handle. This is because it uses takeMVar.

The use of cancel here does mean that, if receiveMessageAddonProcess
or Remote.External.AsyncExtension.receiveloop allocated some resource in
a non-async-exception safe way, they might not get a chance to clean it up.
They do not appear to, and anyway, this only happens when git-annex is
shutting down, so any recource that did leak would not be a problem.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2020-11-30 13:04:02 -04:00
Joey Hess
1dc802a445
comment 2020-11-30 12:44:40 -04:00
Joey Hess
267bdaaac1
close 2020-11-30 12:28:20 -04:00
kyle
8d7b14e2f3 Added a comment 2020-11-30 15:18:58 +00:00
Lukey
7081811757 Added a comment 2020-11-30 07:36:41 +00:00
filipg@7e6a4a5ad3a393bcea174bf8fd6664deffc76c25
390411a835 Added a comment 2020-11-30 07:20:35 +00:00
dzhu
3be9dc6e1d fix typo (CONFIGSEND -> CONFIGEND) 2020-11-30 00:11:16 +00:00
Lukey
878dc46acd Added a comment 2020-11-29 20:57:25 +00:00
filipg@7e6a4a5ad3a393bcea174bf8fd6664deffc76c25
9804a0d0a6 2020-11-29 20:13:14 +00:00
Lukey
36b4a253e7 2020-11-29 19:06:37 +00:00
Lukey
7e86da7701 2020-11-29 19:04:34 +00:00
Lukey
e206f36361 Added a comment 2020-11-29 15:37:21 +00:00
dzhu
4383ab5a80 2020-11-29 02:36:23 +00:00
tcurdt@9d3ccb47a593bf70ac547ddae8fa634048b87ddf
a68c62b7a6 Added a comment 2020-11-28 16:49:47 +00:00
Lukey
547f087467 Added a comment 2020-11-27 18:46:04 +00:00
Joey Hess
1a1d671dd2
fix build 2020-11-27 13:02:43 -04:00
Joey Hess
c325338df2
add news item for git-annex 8.20201127 2020-11-27 12:57:31 -04:00
Joey Hess
dad8442572
releasing package git-annex version 8.20201127 2020-11-27 12:57:02 -04:00
tcurdt@9d3ccb47a593bf70ac547ddae8fa634048b87ddf
a314537cd1 2020-11-27 14:13:00 +00:00
Joey Hess
c6dd84d950
Merge branch 'master' of ssh://git-annex.branchable.com 2020-11-26 11:50:12 -04:00
Joey Hess
e92117bfd0
fix test failure on windows
"a:" failed; this test wants a relative filename so isDrive avoids it

Note that on linux, isDrive "/foo" is true. This test also filters out
absolute paths already, so that is ok.

This commit was sponsored by Brock Spratlen on Patreon.
2020-11-26 11:48:52 -04:00
Ilya_Shlyakhter
41f9926b79 fix typo in git-annex command to create public S3 remote 2020-11-25 20:31:23 +00:00
Joey Hess
79135e4a92
close 2020-11-25 06:25:58 -04:00
Joey Hess
fed2316795
Merge branch 'master' of ssh://git-annex.branchable.com 2020-11-25 06:25:13 -04:00
Joey Hess
d15c2d9ed3
fix build on windows 2020-11-25 06:24:49 -04:00