aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/src/probe.rs
Commit message (Collapse)AuthorAgeFilesLines
* populate: probe passage and pass sources tootv2 days1-3/+8
| | | | | | | | | | | | | A passage source ran rsync on every run, about a dozen round trips to a remote target, and a pass source a command reading .pass_info, which tells whether the passwords changed. The probe lists the target paths of passage sources too, and reads what pass sources' .pass_info contains. After decrypting, a passage source lists its working directory with find, whose files have the times of their .age files and fixed modes, and doesn't run rsync if the listings are the same; Delivery::transfer does that for any source the probe listed. A pass source takes .pass_info from the probe.
* populate: skip symlink and git sources with nothing to dotv3 days1-0/+240
Each command on a remote target costs about three round trips, so the bench's 30 symlink and 20 git sources took about 4.5 of a no-op run's 7.2 s with 30 ms to the target, with one command each. The command after taking the lock that lists file sources, now the probe (probe.rs), also finds out what's at the target paths of symlink sources, the symlink, if any, and of git sources with a commit as ref and without fetchAlways: if git_problems finds nothing wrong with the work tree, which keeps guarding every Git command, its HEAD, its origin's URL, and what git status --ignored and git submodule status print. A symlink source whose symlink points to the target already runs nothing. So does a git source whose work tree has the commit checked out, the source's URL, nothing modified, untracked, or ignored, and its submodules at their commits; the flakes step takes it for checked, as after the git script. Not where the flakes step rewrites a lock file in place. The scenario symlink-git-skip checks that an unchanged symlink stays the same file, which ln would replace, and that a symlink pointing elsewhere, a modified file, an untracked one, and another commit make them deliver again.
[cgit] Unable to lock slot /tmp/cgit/85000000.lock: Permission denied (13)