Joey Hess [Sat, 3 Aug 2024 23:51:03 +0000 (19:51 -0400)]
design work on annexobjects remotes
Joey Hess [Sat, 3 Aug 2024 15:39:23 +0000 (11:39 -0400)]
sync --content with annexobjects=true exporttree remotes
Joey Hess [Fri, 2 Aug 2024 22:50:57 +0000 (18:50 -0400)]
update
Joey Hess [Fri, 2 Aug 2024 22:45:44 +0000 (18:45 -0400)]
Merge branch 'master' into exportreeplus
Joey Hess [Fri, 2 Aug 2024 22:43:10 +0000 (18:43 -0400)]
in unexport, check for annexobjects presence before updating location log
The key may still be in the annexobjects location.
Joey Hess [Fri, 2 Aug 2024 20:45:52 +0000 (16:45 -0400)]
prevent removeKey from annexobjects=yes remote when the key is in the exported tree
Removing the key from the annexobjects location when it's in the
exported tree would leave it in the exported tree, and so succeeding
would update the location log incorrectly. But this also can't remove it
from the exported tree, because that would cause import tree to see a
file got deleted. So, refuse to remove in this situation.
It would be possible to remove from the annexobjects location and then
fail. Then if a key somehow got stored in both the annexobjects location
and the exported tree location(s), the duplicate would be resolved. Not
doing this because first, I don't know how that situation could happen,
and second, it seems wrong for a failed remove to have a side-effect
like that.
Joey Hess [Fri, 2 Aug 2024 18:15:05 +0000 (14:15 -0400)]
status
Joey Hess [Fri, 2 Aug 2024 18:13:29 +0000 (14:13 -0400)]
Remove debug output (to stderr)
Accidentially included in last version. Only happens when running code that
uses remoteUrl.
Joey Hess [Fri, 2 Aug 2024 18:10:34 +0000 (14:10 -0400)]
status
Joey Hess [Fri, 2 Aug 2024 18:07:45 +0000 (14:07 -0400)]
initial support for annexobjects=yes
Works but some commands may need changes to support special remotes
configured this way.
Joey Hess [Fri, 2 Aug 2024 17:13:44 +0000 (13:13 -0400)]
git-remote-annex: use annexLocationsBare
There was no good reason for it to be using annexLocationsNonBare,
and exporttree=yes annexobjects=yes is going to use annexLocationsBare,
so this should as well for consistency.
Since all returned ExportLocations are tried when retrieving objects,
this won't break backwards compatability.
Spencer [Fri, 2 Aug 2024 04:37:11 +0000 (04:37 +0000)]
removed
Spencer [Fri, 2 Aug 2024 04:10:32 +0000 (04:10 +0000)]
Added a comment: Necro
Spencer [Fri, 2 Aug 2024 04:10:14 +0000 (04:10 +0000)]
Added a comment: Necro
dmcardle [Thu, 1 Aug 2024 14:25:18 +0000 (14:25 +0000)]
dmcardle [Thu, 1 Aug 2024 14:23:41 +0000 (14:23 +0000)]
Added a comment
d@403a635aa8eaa8bfa8613acb6a375d9e06ed7001 [Thu, 1 Aug 2024 14:19:25 +0000 (14:19 +0000)]
d@403a635aa8eaa8bfa8613acb6a375d9e06ed7001 [Thu, 1 Aug 2024 13:49:41 +0000 (13:49 +0000)]
Added a comment
Spencer [Wed, 31 Jul 2024 20:10:06 +0000 (20:10 +0000)]
Added a comment: @joey
Joey Hess [Wed, 31 Jul 2024 19:54:14 +0000 (15:54 -0400)]
Avoid loading cluster log at startup
This fixes a problem with datalad's test suite, where loading the cluster
log happened to cause the git-annex branch commits to take a different
shape, with an additional commit.
It's also faster though, since many commands don't need the cluster log.
Just fill Annex.clusters with a thunk.
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Wed, 31 Jul 2024 18:07:30 +0000 (14:07 -0400)]
clean up build warnings when built w/o servant
Joey Hess [Wed, 31 Jul 2024 18:05:48 +0000 (14:05 -0400)]
cleanup comments on removed news post
Joey Hess [Wed, 31 Jul 2024 18:05:11 +0000 (14:05 -0400)]
add news item for git-annex 10.
20240731
Joey Hess [Wed, 31 Jul 2024 18:05:01 +0000 (14:05 -0400)]
releasing package git-annex version 10.
20240731
Joey Hess [Wed, 31 Jul 2024 16:19:12 +0000 (12:19 -0400)]
analysis
Joey Hess [Wed, 31 Jul 2024 14:09:47 +0000 (10:09 -0400)]
very temporarily copy stack.yaml to stack-lts-18.13.yaml
Windows autobuilder is still using that and a vacation is blocking
updating it to use stack.yaml.
Joey Hess [Wed, 31 Jul 2024 14:06:43 +0000 (10:06 -0400)]
pinged
Joey Hess [Wed, 31 Jul 2024 14:04:08 +0000 (10:04 -0400)]
comment
Spencer [Wed, 31 Jul 2024 00:34:01 +0000 (00:34 +0000)]
[Bug] Trust but Verify: RClone
Joey Hess [Tue, 30 Jul 2024 16:39:17 +0000 (12:39 -0400)]
more fixes to build w/o servant
Joey Hess [Tue, 30 Jul 2024 16:18:39 +0000 (12:18 -0400)]
typo
Joey Hess [Tue, 30 Jul 2024 16:17:05 +0000 (12:17 -0400)]
update
Joey Hess [Tue, 30 Jul 2024 15:58:44 +0000 (11:58 -0400)]
todo
Joey Hess [Tue, 30 Jul 2024 15:42:17 +0000 (11:42 -0400)]
fix negative DATA when 1 node of a cluster has a partial transfer
Joey Hess [Tue, 30 Jul 2024 15:27:20 +0000 (11:27 -0400)]
avoid partial functions
This is horrible old code and ghc has started to warn about head and
tail. Rewrote it to avoid all partial functions except !! and guarded
uses of !! with length checks.
Joey Hess [Tue, 30 Jul 2024 14:53:44 +0000 (10:53 -0400)]
fix build without servant some more
Joey Hess [Tue, 30 Jul 2024 14:50:13 +0000 (10:50 -0400)]
comment
Joey Hess [Tue, 30 Jul 2024 14:34:18 +0000 (10:34 -0400)]
deindent
the indentation broke the arm64ancient build which edits the file
Joey Hess [Tue, 30 Jul 2024 14:01:56 +0000 (10:01 -0400)]
disable servant build flag for i386ancient
Its library stack is too old, and while lts-12.14 does include an old
version of servant, some libraries like http-client have been bumped up
from the lts to support eg http-client-restricted. So a newer servant
would be needed, which would lead to many more upgrades.
There might be a dependency set that works, but I have not been able to
find it so far. stack solver also failed to find one.
Joey Hess [Tue, 30 Jul 2024 13:49:37 +0000 (09:49 -0400)]
fix build without servant
Joey Hess [Tue, 30 Jul 2024 00:03:58 +0000 (20:03 -0400)]
update stack.yaml to nightly-2024-07-29 and remove stack-lts-18.13.yaml
Primarily because Windows needs a dependency bump to get stm-2.5.1
for Servant build flag.
This includes Win32-2.13.4.0 and aws-0.24 which adds some features
that windows had been missing out on as well.
Lots of warnings about head and tail will need to eventually be
addressed. Of course AFAIK the uses of it in git-annex are all safe.
Joey Hess [Mon, 29 Jul 2024 23:13:31 +0000 (19:13 -0400)]
fix syntax
Joey Hess [Mon, 29 Jul 2024 23:12:48 +0000 (19:12 -0400)]
temporarily disable servant build flag on windows
Joey Hess [Mon, 29 Jul 2024 23:10:00 +0000 (19:10 -0400)]
servant build flag needs stm-2.5.1
For writeTMVar. Would be possible to rewrite to use something else, but
I don't want to. Might be possible to write a writeTMVar that works with
the old version of stm.
Joey Hess [Mon, 29 Jul 2024 22:15:29 +0000 (18:15 -0400)]
fix build with text older than 2.0
Joey Hess [Mon, 29 Jul 2024 21:24:31 +0000 (17:24 -0400)]
enable servant in windows build
Joey Hess [Mon, 29 Jul 2024 21:21:41 +0000 (17:21 -0400)]
fix build with old text
Don't need decodeUtf8Lenient here because B64.encode surely always
generates utf8. So decodeUtf8 is safe, it will never throw an exception.
Joey Hess [Mon, 29 Jul 2024 20:32:24 +0000 (16:32 -0400)]
final fix to windows build
Joey Hess [Mon, 29 Jul 2024 19:15:40 +0000 (15:15 -0400)]
close
Joey Hess [Mon, 29 Jul 2024 19:14:12 +0000 (15:14 -0400)]
more fixes to windows build for content retention files
Will probably build successfully now. Still untested.
Joey Hess [Mon, 29 Jul 2024 17:58:40 +0000 (13:58 -0400)]
more fixes to windows build for content retention files
Joey Hess [Mon, 29 Jul 2024 17:39:28 +0000 (13:39 -0400)]
When proxying an upload to a special remote, verify the hash.
While usually uploading to a special remote does not verify the content,
the content in a repository is assumed to be valid, and there is no trust
boundary. But with a proxied special remote, there may be users who are
allowed to store objects, but are not really trusted.
Another way to look at this is it's the equivilant of git-annex-shell
checking the hash of received data, which it does (see StoreContent
implementation).
Joey Hess [Mon, 29 Jul 2024 17:35:08 +0000 (13:35 -0400)]
run with noMessages
This avoids extraneous output from p2phttp, including eg, progress
displays when transferring to proxied special remotes.
Joey Hess [Mon, 29 Jul 2024 17:10:40 +0000 (13:10 -0400)]
add libghc-servant-client-core-dev dep
Joey Hess [Mon, 29 Jul 2024 17:09:19 +0000 (13:09 -0400)]
changelog
Joey Hess [Mon, 29 Jul 2024 17:00:00 +0000 (13:00 -0400)]
update github badges
Seems the urls changed and the old ones will be falsely green forever.
Found new ones in readme at https://github.com/datalad/git-annex
Joey Hess [Mon, 29 Jul 2024 16:54:52 +0000 (12:54 -0400)]
add missing do on windows
Joey Hess [Mon, 29 Jul 2024 15:59:33 +0000 (11:59 -0400)]
comment
Joey Hess [Mon, 29 Jul 2024 15:49:40 +0000 (11:49 -0400)]
don't think I ever implementned the 422 idea, it will 404
Joey Hess [Mon, 29 Jul 2024 15:44:44 +0000 (11:44 -0400)]
wording
Joey Hess [Mon, 29 Jul 2024 15:43:30 +0000 (11:43 -0400)]
link
Joey Hess [Mon, 29 Jul 2024 15:37:13 +0000 (11:37 -0400)]
wording
Joey Hess [Mon, 29 Jul 2024 15:34:46 +0000 (11:34 -0400)]
typo
Joey Hess [Mon, 29 Jul 2024 15:33:39 +0000 (11:33 -0400)]
Merge branch 'httpproto'
Joey Hess [Mon, 29 Jul 2024 15:25:27 +0000 (11:25 -0400)]
Merge remote-tracking branch 'origin/httpproto'
Joey Hess [Mon, 29 Jul 2024 15:25:07 +0000 (11:25 -0400)]
update
Joey Hess [Mon, 29 Jul 2024 15:22:27 +0000 (11:22 -0400)]
preparing to merge
Joey Hess [Mon, 29 Jul 2024 15:18:03 +0000 (11:18 -0400)]
When proxying for a special remote, avoid unncessary hashing
Like the comment says, the client will do its own verification. But it was
calling verifyKeyContentPostRetrieval, which was hashing the file.
Joey Hess [Mon, 29 Jul 2024 15:03:18 +0000 (11:03 -0400)]
fix reversion in GET from proxy over http
4f3ae966662c38080fcafb9d5bbee4dedce566b8 caused a hang in GET,
which git-annex testremote could reliably cause.
The problem is that closing both P2P handles before waiting on the
asyncworker prevents all the DATA from getting sent.
The solution is to only close the P2P handles early when the
P2PConnection is being closed. When it's being released, let the
asyncworker finish. closeP2PConnection is called in GET when it was
unable to send all data, and in PUT when it did not receive all the
data, and in both cases closing the P2P handles early is ok.
Joey Hess [Mon, 29 Jul 2024 14:52:37 +0000 (10:52 -0400)]
p2phttp remotes are not readonly
That prevented testremote from working when remote.name.url = http://..
Joey Hess [Mon, 29 Jul 2024 14:33:26 +0000 (10:33 -0400)]
cleanly close proxy connection on interrupted PUT
An interrupted PUT to cluster that has a node that is a special remote
over http left open the connection to the cluster, so the next request
opens another one. So did an interrupted PUT directly to the proxied
special remote over http.
proxySpecialRemote was stuck waiting for all the DATA. Its connection
remained open so it kept waiting.
In servePut, checktooshort handles closing the P2P connection
when too short a data is received from PUT. But, checktooshort was only
called after the protoaction, which is what runs the proxy, which is
what was getting stuck. Modified it to run as a background thread,
which waits for the tooshortv to be written to, which gather always does
once it gets to the end of the data received from the http client.
That makes proxyConnection's releaseconn run once all data is received
from the http client. Made it close the connection handles before
waiting on the asyncworker thread. This lets proxySpecialRemote finish
processing any data from the handle, and then it will give up,
more or less cleanly, if it didn't receive enough data.
I say "more or less cleanly" because with both sides of the P2P
connection taken down, some protocol unhappyness results. Which can lead
to some ugly debug messages. But also can cause the asyncworker thread
to throw an exception. So made withP2PConnections not crash when it
receives an exception from releaseconn.
This did have a small change to the behavior of an interrupted PUT when
proxying to a regular remote. proxyConnection has a protoerrorhandler
that closes the proxy connection on a protocol error. But the proxy
connection is also closed by checktooshort when it closes the P2P
connection. Closing the same proxy connection twice is not a problem,
it just results in duplicated debug messages about it.
Joey Hess [Mon, 29 Jul 2024 13:48:06 +0000 (09:48 -0400)]
add debugging of opening and closing connections to proxies
Joey Hess [Mon, 29 Jul 2024 13:11:27 +0000 (09:11 -0400)]
idea
stv0g [Mon, 29 Jul 2024 06:50:01 +0000 (06:50 +0000)]
Added a comment: importtree=yes Support
Joey Hess [Mon, 29 Jul 2024 01:11:23 +0000 (21:11 -0400)]
remove unused imports
Joey Hess [Mon, 29 Jul 2024 00:29:42 +0000 (20:29 -0400)]
remove uuid from annex+http urls
Not needed it turns out.
Joey Hess [Mon, 29 Jul 2024 00:13:41 +0000 (20:13 -0400)]
set remote's annexUrl automatically
When the remote repository's git config file
has annex.url set to an annex+http url.
Joey Hess [Sun, 28 Jul 2024 21:29:32 +0000 (17:29 -0400)]
todo
Joey Hess [Sun, 28 Jul 2024 21:19:27 +0000 (17:19 -0400)]
documentation for p2phttp
Joey Hess [Sun, 28 Jul 2024 20:04:20 +0000 (16:04 -0400)]
avoid repeatedly parsing the proxy log
Joey Hess [Sun, 28 Jul 2024 19:55:24 +0000 (15:55 -0400)]
update
Joey Hess [Sun, 28 Jul 2024 19:41:31 +0000 (15:41 -0400)]
todo
Joey Hess [Sun, 28 Jul 2024 19:34:59 +0000 (15:34 -0400)]
fix hang in PUT of large file to a special remote node of a cluster over http
Joey Hess [Sun, 28 Jul 2024 19:11:31 +0000 (15:11 -0400)]
use closedv rather than separate endv
Doesn't fix any known problem, but this way if the connection does get
closed, it will notice.
Joey Hess [Sun, 28 Jul 2024 18:36:45 +0000 (14:36 -0400)]
remove temp file after upload to special remote
Joey Hess [Sun, 28 Jul 2024 18:24:15 +0000 (14:24 -0400)]
Merge remote-tracking branch 'origin/master' into httpproto
Joey Hess [Sun, 28 Jul 2024 18:22:44 +0000 (14:22 -0400)]
update
Joey Hess [Sun, 28 Jul 2024 18:15:28 +0000 (14:15 -0400)]
clean shut down of cluster connection when PUT is interrupted
An interrupted `git-annex copy --to` a cluster via the http server,
when repeated, failed. The http server output "transfer already in
progress, or unable to take transfer lock". Apparently a second
connection was opened to the cluster, because the first connection
never got shut down.
Turned out the problem was that when proxying to a cluster, it would read a
short ByteString from the client, and send that to the nodes. But that left the
nodes warning more. Meanwhile, the proxy was expecting a SUCCESS/FAILURE
message from the nodes. So it didn't return, and so the cluster connection
stayed open.
Joey Hess [Sun, 28 Jul 2024 17:31:30 +0000 (13:31 -0400)]
fix http proxying for a local git remote with a relative path
git-annex-shell expects an absolute path
Joey Hess [Sun, 28 Jul 2024 17:00:05 +0000 (13:00 -0400)]
found some bugs with clusters
Joey Hess [Sun, 28 Jul 2024 16:39:42 +0000 (12:39 -0400)]
clusters need enableInteractiveBranchAccess
As seen in commit
770aac97a75f64b86d73240055acffe1a5ed9f1a, a cluster
relies accurate location logs. If long-running processes are serving a
cluster, and one process puts a file, the other process needs to see
what nodes it was stored on when checking if the file is present.
Joey Hess [Sun, 28 Jul 2024 16:33:32 +0000 (12:33 -0400)]
smarter BranchState cache invalidation
Only invalidate a just-written file in the cache, not the whole cache.
This will avoid the possibly performance impact of cache invalidation
mentioned in commit
770aac97a75f64b86d73240055acffe1a5ed9f1a
Joey Hess [Sun, 28 Jul 2024 16:17:16 +0000 (12:17 -0400)]
share single BranchState amoung all threads
This fixes a problem when git-annex testremote is run against a cluster
accessed via the http server. Annex.Cluster uses the location log
to find nodes that contain a key when checking if the key is present or getting
it. Just after a key was stored to a cluster node, reading the location log
was not getting the UUID of that node.
Apparently the Annex action that wrote to the location log, and the one
that read from it were run with two different Annex states. The http server
does use several different Annex threads.
BranchState was part of the AnnexState, and so two threads could have
different BranchStates.
Moved BranchState to the AnnexRead, so all threads will see the common state.
This might possibly impact performance. If one thread is writing changes to the
branch, and another thread is reading from the branch, the writing thread will
now invalidate the BranchState's cache, which will cause the reading thread to
need to do extra work. But correctness is surely more important. If did is
found to have impacted performance, it could probably be dealt with by doing
smarter BranchState cache invalidation.
Another way this might impact performance is that the BranchState has a small
cache. If several threads were reading from the branch and relying on the value
they just read still being in the case, now a cache miss will be more likely.
Increasing the BranchState cache to the number of jobs might be a good
idea to amelorate that. But the cache is currently an innefficient list,
so making it large would need changes to the data types.
(Commit
4304f1b6aea19a5c402dc4f9d69aa4ff1c104c9b dealt with a follow-on
effect of the bug fixed here.)
Joey Hess [Sun, 28 Jul 2024 15:09:07 +0000 (11:09 -0400)]
better handling of content not available from cluster
Sending ERROR caused the client to get confused and protocol to freeze.
Better to send empty DATA and indicate it's not valid.
This fixes a hang in git-annex testremote of a cluster accessed via the
http server. That testremote is still failing, for some reason after
storing a test key, the cluster reports it as not present.
Joey Hess [Sun, 28 Jul 2024 14:36:22 +0000 (10:36 -0400)]
add --clusterjobs option and default to 1
The default of 1 is not ideal at all, but it avoids an accidental M*N
causing so much concurrency it becomes unusable.
Joey Hess [Sun, 28 Jul 2024 14:16:35 +0000 (10:16 -0400)]
cluster support in http API server
Wired it up and it seems to basically work, although the test suite is
not fully passing.
Note that --jobs currently gets multiplied by the number of nodes in the
cluster, which is probably not good.
Joey Hess [Sun, 28 Jul 2024 13:35:09 +0000 (09:35 -0400)]
remove duplicate code
Joey Hess [Sun, 28 Jul 2024 13:17:47 +0000 (09:17 -0400)]
tested shutdown of connection to http proxied special remote
I had worried it might not work properly, but it does, the endv works.
Joey Hess [Sun, 28 Jul 2024 13:14:42 +0000 (09:14 -0400)]
fix PUT to http proxied special remote
It was hanging because it never sent FAILURE in the INVALID case.
And putoffset always triggers the INVALID case.
Joey Hess [Sat, 27 Jul 2024 23:59:54 +0000 (19:59 -0400)]
thoughts on exporttree