Commit graph

45633 commits

Author SHA1 Message Date
Joey Hess
02f0996e25
git-annex sim log 2024-09-17 13:43:11 -04:00
Joey Hess
b85965cb3c
sim: implement dropunwantedfrom 2024-09-17 13:35:35 -04:00
Joey Hess
eb5fad4e79
fix ActionDropUnwanted
Now tested working
2024-09-17 11:55:57 -04:00
Joey Hess
e0128b6362
sim: add missing parser for action sendwanted 2024-09-17 11:40:40 -04:00
Joey Hess
ae19ad0fa1
sim: fix changing settings bug 2024-09-17 11:38:26 -04:00
Joey Hess
4c7db31c20
addmulti 2024-09-17 11:22:14 -04:00
Joey Hess
2a16796a1c
move pull/push/sync into getSimActionComponents
As well as being a more pleasing implementation than I managed
yesterday, this allows for those actions to be run concurrently in the
sim.
2024-09-17 10:54:44 -04:00
Joey Hess
7d27a8ea1a
sim concurrency 2024-09-17 10:37:22 -04:00
Joey Hess
3b7e3cb2f4
add 2024-09-17 08:31:55 -04:00
Joey Hess
92c10045d1
implement ActionPull/Pull/Sync
Somewhat unsatisfying implementation, but all the alternatives were
worse.
2024-09-16 16:58:03 -04:00
Joey Hess
c420ec9364
sim: add action repo sync command 2024-09-16 16:48:21 -04:00
Joey Hess
2cbd3fb26b
sim command fixes 2024-09-12 16:39:44 -04:00
Joey Hess
52891711d2
git-annex sim command is working
Had to add Read instances to Key and NumCopies and some other similar
types. I only expect to use those in serializing a sim. Of course, this
risks that implementation changes break reading old data. For a sim,
that would not be a big problem.
2024-09-12 16:10:52 -04:00
mike@2d6d71f56ce2a992244350475251df87c26fe351
a2895c2dac Added a comment 2024-09-12 15:40:24 +00:00
nobodyinperson
f8d1022db0 Added a comment: 👍 +1 for encrypting the annex on regular git remotes 2024-09-12 14:51:20 +00:00
Joey Hess
7e8274c6b7
implemented ActionDropUnwanted
Not tested yet. This emulates the same checking that is done when
dropping. Note that when dropping from a special remote it is not able
to make a locked copy.
2024-09-12 10:44:31 -04:00
Joey Hess
68e52f6ec0
convert simRepoState to use UUID as key 2024-09-12 10:29:32 -04:00
m.szczepanik@8dd0314f20fa09be99ee3903d1c04a80eafbd849
3a03ed42e6 2024-09-12 12:13:06 +00:00
mike@2d6d71f56ce2a992244350475251df87c26fe351
0f2754ec3c Added a comment 2024-09-12 05:22:18 +00:00
Joey Hess
7b931df475
fully preserve input format of connect and disconnect commands
Just lifted the sim file as a DSL into the type level for that.
2024-09-11 21:01:13 -04:00
yarikoptic
28d207bc57 initial report on that addunlocked is not respected during import 2024-09-11 20:47:45 +00:00
Joey Hess
f381b457f2
sim file parser and generator
The generator doesn't emit the best possible connect commands,
but it does output something valid. Eg, an input like:

connect A <-> B <-> C <-> D

becomes:

connect A <-> B <-> C
connect C <-> D

Also:

connect A -> B <- C

becomes:

connect A -> B
connect C -> B

Which could be improved.

Also disconnect commands are not prettified at all, but probably there's
no reason to.
2024-09-11 15:59:13 -04:00
Joey Hess
84bbbeae9d
started on sim file parser 2024-09-11 11:53:25 -04:00
Joey Hess
c4609a73f2
implemented ActionSendWanted
The simulation is nearly finished. Only CommandAddTree and dropping
remain to do.
2024-09-11 11:09:30 -04:00
Joey Hess
a387f40ffb
ActionGetWanted working
The sim is now basically working!
2024-09-11 10:32:04 -04:00
Joey Hess
07f54668c4
sim: implement ActionGitPush and ActionGitPull
These don't actually need to do any git actions, instead they just merge
the simLocations.

Had to make simLocations use a vector clock, because it is possible for
two simulated repositories to end up with different opinions about the
location of a key. Just like with real git-annex, whichever location
change was made most recently wins out.

The vector clock is simply advanced each time the simulation is run for
a step. Since there is no real parallelism in the sim, that's
sufficient.
2024-09-10 15:37:55 -04:00
Joey Hess
a674a54d87
implement randomAction 2024-09-09 17:20:13 -04:00
Joey Hess
217bc214b3
implement CommandStep
and record each SimCommand in simHistory, except for CommandStep where
instead the actions that are generated are recorded.
2024-09-09 17:04:32 -04:00
Joey Hess
64466d8687
add action command to git-annex sim
step just picks a random action, and this allows finer control over what
happens in the sim
2024-09-09 16:06:45 -04:00
Joey Hess
21da5aadec
set location logs in simulated repos 2024-09-09 14:52:24 -04:00
Joey Hess
52c6434b87
fix removing simulated file 2024-09-09 14:07:52 -04:00
Joey Hess
bbd5390fa3
create simulated files 2024-09-09 11:28:30 -04:00
Joey Hess
5f3a2f4c6b
set descriptions for all simulated repos 2024-09-09 11:06:42 -04:00
Joey Hess
ec7f1f2736
simulated repository construction working 2024-09-09 10:59:01 -04:00
Joey Hess
a2c0d5e4a9
finish updateSimRepoState
Converted maps to use UUID as key.

Also added mincopies to the sim.
2024-09-09 09:37:59 -04:00
Joey Hess
811dd95453
maxsize of 0 to disable 2024-09-09 09:32:43 -04:00
Joey Hess
4e11cb19ef
implemented cloneSimRepo
Started on updateSimRepoState
2024-09-06 14:23:29 -04:00
Joey Hess
8d707c4821
more work on applySimCommand
When using an existing repo, copy over all of its config into the sim.

Added CommandTrustLevel.

Start at creating a git clone for a simulated repo, but it's not done
yet.
2024-09-06 12:53:51 -04:00
Joey Hess
def8095e5f
rethought sim a bit 2024-09-06 12:53:20 -04:00
yarikoptic
578abf7b89 initial report on incorrect handling of empty files in adjusted branches mode 2024-09-06 14:01:34 +00:00
Joey Hess
65dd018850
prevent overwriting a repo in the simulation 2024-09-05 16:22:08 -04:00
Joey Hess
d717e9aca0
Merge branch 'master' of ssh://git-annex.branchable.com 2024-09-05 15:25:34 -04:00
Joey Hess
8f8e35ac3b
almost finished with applySimCommand
Added checks that repo names are ones that have been added to the sim.

Implemented preferred content etc setting. It does not need to parse the
expression in applySimCommand, instead that can be done when running the
sim. This keeps it pure.

But, it can't be entirely pure because of CommandAddTree. So made it
return an Annex action when necessary.

Moved makeMatcher into Annex.FileMatcher in preparation for using it,
but it's not used yet. Also moved checkPreferredContentExpression.
2024-09-05 15:22:41 -04:00
yarikoptic
f0aa5ddf3e Added a comment 2024-09-05 14:52:51 +00:00
Joey Hess
710a199ce9
implement CommandUse in Annex.Sim
Refactored Remote to keep it pure.
2024-09-05 10:50:04 -04:00
yarikoptic
3d0dc4a91d Added a comment: ping on this issue : how to recover? 2024-09-05 14:49:07 +00:00
Joey Hess
ed740bc31e
comment 2024-09-05 09:20:38 -04:00
Joey Hess
b932acf4ad
started Annex.Sim
Have most of the sim command handler, but to keep it pure while implementing
the rest will need some refactoring.

It seems likely that running the simulation itself will not be able to be
entirely pure. Preferred content evaluation runs in Annex after all.

Note that the somewhat awkward randomWords is because the i386ancient
build depends on a version of random too old to support generating a
random ByteString on its own.
2024-09-04 15:15:36 -04:00
Joey Hess
84c781d924
documentation for git-annex sim
command not implemented yet
2024-09-04 15:03:17 -04:00
tapesafer
6412c19127 Added a comment: PS 2024-09-04 15:48:01 +00:00