Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
9d08d0f
chore(release): merge master into beta after 2026.11.13 [skip ci]
masterwishx Nov 13, 2026
1b0af16
Make the cron files follow the saved settings when Apply is pressed
chodeus Nov 23, 2026
5632d28
Keep the install's cron path migrations and match dcron's name forms
chodeus Nov 23, 2026
77393fd
Keep Unraid's old schedule until its replacement is written
chodeus Nov 23, 2026
6a2a139
Remove the filename check, so names holding $, <, : and the like move
chodeus Nov 23, 2026
02ec1ed
Escape < and > in notification text before Unraid 7.2
chodeus Nov 23, 2026
3814885
Retire Unraid's old schedule at the sync or Apply that replaces it
chodeus Nov 24, 2026
474d41a
Retire Unraid's old schedule when the saved schedule is cleared
chodeus Nov 24, 2026
0ecfd5d
Merge pull request #288 from chodeus/fix/schedule-apply
chodeus Nov 24, 2026
afe1ddf
Merge beta into fix/notify-escape
chodeus Nov 24, 2026
09a54e1
Merge pull request #289 from chodeus/fix/notify-escape
chodeus Nov 24, 2026
3e74455
Merge beta into fix/remove-filename-validation
chodeus Nov 24, 2026
b9d930b
Merge pull request #290 from chodeus/fix/remove-filename-validation
chodeus Nov 24, 2026
84c0f82
Pin what age_mover's moves do today, through the real processTheMoves
chodeus Nov 24, 2026
e0e241e
Make the age_mover harness fail loudly, run debug for real and pin by…
chodeus Nov 24, 2026
076f946
Tell ShellCheck that age_mover's functions read the harness settings
chodeus Nov 24, 2026
3dfcba0
Merge pull request #292 from chodeus/test/age-mover-regression
chodeus Nov 24, 2026
080e0e3
Pin what age_mover's folder cleanup does today, through the real proc…
chodeus Nov 24, 2026
25f0ac5
Make the zfs stand-in follow OpenZFS after unmount and destroy, and p…
chodeus Nov 24, 2026
e7f7c2d
Merge pull request #293 from chodeus/test/age-mover-folders
chodeus Nov 24, 2026
2dab2f6
age_mover: look up a hardlink group only for a multi-link regular file
chodeus Nov 24, 2026
386697b
Clear share_mover's ShellCheck findings, and stop its rm of an unset …
chodeus Nov 24, 2026
f426378
Test share_mover's fallback to the move in PATH, and refuse a mount a…
chodeus Nov 24, 2026
1500d2e
Pin what age_mover's soft stop and pause do today, through the real p…
chodeus Nov 24, 2026
aab7b68
Read only the pid's digits, as debug_mover does, so spaces or a secon…
chodeus Nov 24, 2026
758ad7b
Take the pid from the pid file's first line, so a second line cannot …
chodeus Nov 24, 2026
4ce1f9c
Remove validateFilenames and invalidFileChars from saved configs at i…
chodeus Nov 24, 2026
99a3831
Refuse a mount at /var or /usr in test_share_mover.sh's guard
chodeus Nov 24, 2026
dbfcb7c
Refuse a mount at /var in test_install.sh's guard
chodeus Nov 24, 2026
4911cba
Refuse a mount at /usr/libexec/unraid/move or above in lib.sh's guard…
chodeus Nov 24, 2026
46cf4a3
Check each share's top folder once, after the pass, instead of after …
chodeus Nov 24, 2026
2bb9747
Merge pull request #295 from chodeus/fix/share-mover-shellcheck
chodeus Nov 24, 2026
77c84f6
Merge remote-tracking branch 'upstream/beta' into fix/age-mover-group…
chodeus Nov 24, 2026
cc1a9a0
Merge pull request #294 from chodeus/fix/age-mover-group-lookup
chodeus Nov 24, 2026
74d2849
Destroy a share's ZFS dataset only when nothing in it would be lost
chodeus Nov 24, 2026
83cabce
Merge remote-tracking branch 'upstream/beta' into fix/plg-drop-filena…
chodeus Nov 24, 2026
b92bd56
Keep the dataset on a busy destroy; note it on folder rows; skip .zfs…
chodeus Nov 24, 2026
d3f12a4
Merge pull request #296 from chodeus/fix/plg-drop-filename-check-keys
chodeus Nov 24, 2026
2379967
Merge remote-tracking branch 'upstream/beta' into fix/age-mover-top-f…
chodeus Nov 24, 2026
076c775
Merge pull request #298 from chodeus/fix/age-mover-top-folder-once
chodeus Nov 24, 2026
18605fc
Merge remote-tracking branch 'upstream/beta' into fix/age-mover-datas…
chodeus Nov 24, 2026
9d84d41
Treat a busy unmount as a busy destroy; remount only over an empty fo…
chodeus Nov 24, 2026
bbe611c
Merge pull request #299 from chodeus/fix/age-mover-dataset-keep
chodeus Nov 24, 2026
227b88b
perf: make logging cheap, and free when it is off
coppit Nov 22, 2026
3b75b3b
perf: quote message lists without a subshell per item
coppit Nov 22, 2026
6dac7a7
qp goes through qpAll, so the escapes have one owner; pin the backsla…
chodeus Nov 24, 2026
5650945
Merge pull request #287 from coppit/perf/cheap-logging
chodeus Nov 24, 2026
b1a83f2
perf: use file leases for faster in-use checks
coppit Nov 22, 2026
41712e9
fix: don't break existing leases when checking files
coppit Nov 22, 2026
38640d7
test: point the age_mover harness at files_in_use
coppit Nov 24, 2026
9439c7b
test: make the files_in_use negative checks able to fail
coppit Nov 24, 2026
4d2421e
fix: keep supporting Unraid before 6.11.0
coppit Nov 24, 2026
07e4d22
fix: check files with fuser when the lease helper cannot start
chodeus Nov 24, 2026
01ca41a
style: clear CodeFactor's Perl::Critic findings in files_in_use
chodeus Nov 24, 2026
01d9ca0
fix: check a ZFS dataset again once unmounted, before destroying it
chodeus Nov 24, 2026
cf795c7
Name the dataset notice after its setting and translate it
chodeus Nov 24, 2026
fd95cd5
test: make the lease tests fail if a regular file falls back to fuser
chodeus Nov 24, 2026
1c4786f
Check a dataset again at a private read-only mount, and put it back o…
chodeus Nov 24, 2026
f5fe37f
Merge pull request #286 from coppit/codex/file-leases
chodeus Nov 24, 2026
cb424cc
Merge remote-tracking branch 'upstream/beta' into fix/age-mover-datas…
chodeus Nov 24, 2026
e880c06
ci: clear CodeFactor's workflow findings
chodeus Nov 25, 2026
4a614b9
ci: merge only the tested Dependabot head, and sweep builds of delete…
chodeus Nov 25, 2026
10b8b4c
Finish each dataset step on a stop, and tell a busy read-only mount f…
chodeus Nov 25, 2026
05441cd
Report a write the remount hides, and let stop wait for the run
chodeus Nov 25, 2026
a590559
update readme
masterwishx Nov 25, 2026
08df5c5
Look inside the share folder at the remount even when it was gone
chodeus Nov 25, 2026
18d40fd
Merge pull request #302 from masterwishx:update-readme
masterwishx Nov 25, 2026
50a8156
ci: close the gaps the test-build sweep left
chodeus Nov 25, 2026
02b5b01
Say in the notice why a dataset is out of view and how to mount it back
chodeus Nov 25, 2026
dfdc405
Fix the folder cleanup's failed-move, top-folder and count gaps
chodeus Nov 25, 2026
e07de52
Recount a folder after a name gone before its turn; keep test mode's …
chodeus Nov 25, 2026
ea10904
Probe the private mount after a failed umount; guard the php stand-in…
chodeus Nov 25, 2026
6483f79
Count a folder's own subfolders only in the moved-folder walk
chodeus Nov 25, 2026
7845dc0
Keep a dataset whose scan was killed before it finished
chodeus Nov 25, 2026
4a1b1a9
Say a cut-short scan can print nothing
chodeus Nov 25, 2026
09aaf89
Count nothing in a folder an earlier row deleted
chodeus Nov 25, 2026
ec13d05
Make test mode's folder lines predict a real run's
chodeus Nov 25, 2026
17cdc8e
Put the write method back when a stop ends the run during the moves
chodeus Nov 25, 2026
d518c2b
Force turbo write only when the write method can be set back; mark te…
chodeus Nov 25, 2026
80370d8
Report a look at the mount back that was cut short
chodeus Nov 25, 2026
bd920c2
share_mover: run find without eval, force turbo write only when it ca…
chodeus Nov 25, 2026
2299eb7
share_mover: move a prefer share only from array disks and pools, run…
chodeus Nov 25, 2026
8ddc0e5
Let a second stop wait while the run puts the write method back
chodeus Nov 25, 2026
17e8449
Give a cut-short remount's notice its steps, and send it under Notify…
chodeus Nov 25, 2026
32ee7be
Check the mount table after a failed recovery umount, so a detached d…
chodeus Nov 25, 2026
54d7772
Tell the recovery steps to keep both copies of a file the dataset alr…
chodeus Nov 25, 2026
d057092
Ignore a second stop while the stopped run puts the write method back
chodeus Nov 25, 2026
4d2897b
Merge pull request #301 from chodeus/fix/age-mover-dataset-recheck
chodeus Nov 26, 2026
f32c012
Merge branch 'beta' of https://github.com/masterwishx/ca.mover.tuning…
chodeus Nov 26, 2026
7139d71
Merge commit 'f32c0127af8b' into fix/age-mover-test-mode-folders
chodeus Nov 26, 2026
de310e6
Say in test mode which ZFS dataset a real run would check for deletion
chodeus Nov 26, 2026
a0c740a
Merge commit '4d2897bc941d63d7cb4c070edc5ee6d5c531ede4' into fix/age-…
chodeus Nov 26, 2026
9b62578
Let the second-stop test's TERM reach mdcmd, as the plugin's stop does
chodeus Nov 26, 2026
852f699
Merge commit '4d2897bc941d63d7cb4c070edc5ee6d5c531ede4' into fix/shar…
chodeus Nov 26, 2026
e7d5b1c
Test a missing middle name among four rows in both modes
chodeus Nov 26, 2026
541847c
Merge pull request #304 from chodeus/fix/age-mover-folder-cleanup
chodeus Nov 26, 2026
a8f679c
Merge remote-tracking branch 'upstream/beta' into fix/age-mover-test-…
chodeus Nov 26, 2026
8553c5f
Say what the missing-name case's recount keeps
chodeus Nov 26, 2026
893dcec
Let test mode keep a folder rmdir would refuse
chodeus Nov 26, 2026
8c8f4ae
Say would_rmdir checks ZFS mounts only
chodeus Nov 26, 2026
f5bc12e
Merge pull request #305 from chodeus/fix/age-mover-test-mode-folders
chodeus Nov 26, 2026
5336e0a
Let the stop skip a process that ended since it was listed
chodeus Nov 26, 2026
8812345
Merge remote-tracking branch 'upstream/beta' into fix/age-mover-stop-…
chodeus Nov 26, 2026
6c39cbb
Mark the stop case's stand-in quoting and the variables stop reads fo…
chodeus Nov 26, 2026
c33541d
Reap the stop case's run in the test script, as CI's container has no…
chodeus Nov 26, 2026
d47058f
Merge remote-tracking branch 'upstream/beta' into fix/share-mover-bac…
chodeus Nov 26, 2026
0f65bec
Keep the turbo restore armed until mdcmd sets the write method back
chodeus Nov 26, 2026
e441cb4
Keep share_mover's turbo restore armed until mdcmd sets it back
chodeus Nov 26, 2026
6be8f18
Make the last turbo restore before the run removes its pid file
chodeus Nov 26, 2026
4c57b90
Merge pull request #306 from chodeus/fix/age-mover-stop-turbo
chodeus Nov 26, 2026
284b4a7
Merge remote-tracking branch 'upstream/beta' into fix/share-mover-bac…
chodeus Nov 26, 2026
6bdf1e4
Test a prefer share's folder on disk10, the second disk pattern
chodeus Nov 26, 2026
0830f3f
share_mover: exit with move's status when the move fails
chodeus Nov 26, 2026
97b55ed
Test the run's status when find fails, alone and with move
chodeus Nov 26, 2026
d634ea0
Merge pull request #307 from chodeus/fix/share-mover-backlog
chodeus Nov 26, 2026
94a1f1e
chore(beta): release changelog
masterwishx Nov 26, 2026
86ede38
chore(beta): write the release notes
chodeus Nov 26, 2026
2b20a23
chore(beta): credit coppit for the faster large moves
chodeus Nov 26, 2026
8e1ee22
Merge pull request #291 from masterwishx/release/beta
chodeus Nov 26, 2026
0a63e67
chore(release): 2026.11.26a [skip ci]
masterwishx Nov 26, 2026
087068c
ci: look the build comment up again for the note after the deletes
chodeus Nov 26, 2026
53170ac
ci: count a tag a publish run removed first as removed in the cleanup…
chodeus Nov 26, 2026
c9b9c46
ci: delete the build tags after the cleanup's note, so a failed note …
chodeus Nov 26, 2026
8fc3f1e
ci: keep the tag when a publish run removes a closed pull request's b…
chodeus Nov 26, 2026
f66e9ad
Merge pull request #303 from chodeus/fix/workflow-triggers
chodeus Nov 26, 2026
14731e5
Merge master into beta: bring master's README edits
chodeus Nov 26, 2026
bdb6f15
Merge pull request #310 from chodeus/chore/merge-master-into-beta
chodeus Nov 26, 2026
88496d1
chore(beta): release changelog
masterwishx Nov 26, 2026
6fb66f5
chore(beta): write the release notes
chodeus Nov 26, 2026
280d973
Merge pull request #311 from masterwishx/release/beta
chodeus Nov 26, 2026
358bbc6
chore(release): 2026.11.26b [skip ci]
masterwishx Nov 26, 2026
bc10adf
chore(release): merge 2026.11.26b into master for the next stable
masterwishx Nov 26, 2026
33475e6
chore(master): release changelog
masterwishx Nov 26, 2026
3a3a510
chore(master): leave the beta-only note out of the release notes
chodeus Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/check-languages.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function mover_texts(string $pluginDir): array
}
$used = [];
$code = file_get_contents($mover);
preg_match_all('/(?:translate_text|mvlogger_t) "((?:[^"\\\\]|\\\\.)*)"/', $code, $m, PREG_OFFSET_CAPTURE);
preg_match_all('/(?:translate_text|mvlogger_t|dataset_out_of_view) "((?:[^"\\\\]|\\\\.)*)"/', $code, $m, PREG_OFFSET_CAPTURE);
foreach ($m[1] as [$text, $offset]) {
// an unescaped $ is a shell variable: the text is only known at run time
if (preg_match('/(?<!\\\\)\$/', $text) === 1) {
Expand Down
233 changes: 233 additions & 0 deletions .github/scripts/test_files_in_use.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
#!/bin/bash
set -euo pipefail

ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
HELPER="$ROOT/source/ca.mover.tuning/usr/local/emhttp/plugins/ca.mover.tuning/files_in_use"
MOVER="$ROOT/source/ca.mover.tuning/usr/local/emhttp/plugins/ca.mover.tuning/age_mover"
TMP=$(mktemp -d)
HOLDER=""

cleanup() {
if [ -n "$HOLDER" ]; then
kill "$HOLDER" 2>/dev/null || true
wait "$HOLDER" 2>/dev/null || true
fi
rm -rf -- "$TMP"
}
trap cleanup EXIT

expect_status() {
local expected=$1 actual
shift
set +e
PATH="$TMP/bin:$PATH" perl "$HELPER" "$@"
actual=$?
set -e
if [ "$actual" -ne "$expected" ]; then
echo "expected status $expected, got $actual" >&2
return 1
fi
}

hold_file() {
local mode=$1 file=$2 ready="$TMP/ready"
rm -f -- "$ready"
if [ "$mode" = read ]; then
( exec 9<"$file"; : >"$ready"; exec sleep 30 ) &
else
( exec 9<>"$file"; : >"$ready"; exec sleep 30 ) &
fi
HOLDER=$!
for _ in {1..100}; do
[ -e "$ready" ] && return
sleep 0.01
done
echo "holder did not start" >&2
return 1
}

release_holder() {
kill "$HOLDER" 2>/dev/null || true
wait "$HOLDER" 2>/dev/null || true
HOLDER=""
}

plain="$TMP/plain"
space="$TMP/a space [*] \$(name)"
newline="$TMP/line
break"
leading="$TMP/--leading"
printf x >"$plain"
printf x >"$space"
printf x >"$newline"
printf x >"$leading"

perl -c "$HELPER"

# F_SETLEASE and fuser -s are Linux interfaces. macOS development machines can
# still validate syntax and the intentionally small age_mover integration.
if [ "$(uname -s)" != Linux ]; then
grep -q '"${FILES_IN_USE_CMD\[@\]}" "$@"' "$MOVER"
grep -qE 'FILE_IN_USE_MODE|FILE_IN_USE_CHECK|FUSER_BATCH_SAFE|actionRows' "$MOVER" && exit 1
grep -qE 'coproc|--server|fileLease(Start|Stop|Request)' "$MOVER" && exit 1
echo "file lease Linux tests skipped on $(uname -s)"
exit
fi

# expect_status runs the helper with this fuser first in PATH: a regular file answered by fuser, not a lease, gets its 7
mkdir "$TMP/bin"
printf '#!/bin/sh\nexit 7\n' >"$TMP/bin/fuser"
chmod +x "$TMP/bin/fuser"

expect_status 1 "$plain" "$space" "$newline" "$leading"
expect_status 1 "$TMP/vanished"

hold_file read "$plain"
expect_status 0 "$plain"
release_holder
expect_status 1 "$plain"

hold_file write "$plain"
expect_status 0 "$plain"
release_holder

alias="$TMP/hardlink"
ln "$plain" "$alias"
hold_file read "$alias"
expect_status 0 "$plain" "$alias"
release_holder

# A file that another process holds a lease on is in use, and checking it must not disturb that
# lease: opening it would make the kernel signal the holder to give the lease up.
leased="$TMP/leased"
printf x >"$leased"
rm -f -- "$TMP/ready" "$TMP/broken"
perl -e '
use Fcntl qw(F_WRLCK);
my ($file, $ready, $broken) = @ARGV;
open(my $fh, "<", $file) or die "open: $!";
$SIG{IO} = sub { open(my $m, ">", $broken); close $m };
fcntl($fh, 1024, F_WRLCK) or die "lease: $!";
open(my $r, ">", $ready); close $r;
sleep 30;
' "$leased" "$TMP/ready" "$TMP/broken" &
HOLDER=$!
for _ in {1..100}; do
[ -e "$TMP/ready" ] && break
sleep 0.01
done
[ -e "$TMP/ready" ] || { echo "lease holder did not start" >&2; exit 1; }
grep -q LEASE /proc/locks
expect_status 0 "$leased"
expect_status 0 "$plain" "$leased"
sleep 0.2
if [ -e "$TMP/broken" ]; then
echo "checking a leased file broke its lease" >&2
exit 1
fi
release_holder

# A device cannot be leased. A distinctive fake fuser status proves that the
# one-shot helper immediately replaces itself with the compatibility command.
expect_status 7 /dev/null

# If leases cannot answer and fuser cannot be executed, status 2 tells
# age_mover not to mistake the file for clear.
mkdir "$TMP/empty-bin"
set +e
PATH="$TMP/empty-bin" "$(command -v perl)" "$HELPER" /dev/null 2>/dev/null
uncheckable_status=$?
set -e
[ "$uncheckable_status" -eq 2 ]

# Keep age_mover's integration deliberately small: it knows only the helper's
# result contract, not whether a lease or fuser produced the answer.
grep -q '"${FILES_IN_USE_CMD\[@\]}" "$@"' "$MOVER"
grep -qE 'FILE_IN_USE_MODE|FILE_IN_USE_CHECK|FUSER_BATCH_SAFE|actionRows' "$MOVER" && exit 1
grep -qE 'coproc|--server|fileLease(Start|Stop|Request)' "$MOVER" && exit 1

# age_mover treats an unavailable answer as in-use, and reports it only once.
source <(sed -n '/^\(chooseFilesInUseCheck\|filesInUse\)() {/,/^}/p' "$MOVER")
MOVE_IN_USE=no
fake_helper="$TMP/fake-helper"
# age_mover runs the helper through perl
printf 'exit $ENV{CHECK_STATUS};\n' >"$fake_helper"
chmod +x "$fake_helper"
# Read by the sourced filesInUse, which ShellCheck cannot see.
# shellcheck disable=SC2034
FILES_IN_USE_HELPER=$fake_helper
LOG_COUNT=0
mvlogger() { LOG_COUNT=$((LOG_COUNT + 1)); }
# Stands in for processTheMoves, which owns the once-per-run flag as a local.
mover_run() {
local FILE_IN_USE_FAILURE_LOGGED=no
local -a FILES_IN_USE_CMD=()
chooseFilesInUseCheck
export CHECK_STATUS=0
filesInUse "$plain"
export CHECK_STATUS=1
if filesInUse "$plain"; then
echo "clear helper result was reported in use" >&2
exit 1
fi
export CHECK_STATUS=2
filesInUse "$plain"
filesInUse "$plain"
}
mover_run
[ "$LOG_COUNT" -eq 1 ]
# The next run warns again, and the flag does not leak out of the run.
mover_run
[ "$LOG_COUNT" -eq 2 ]
[ -z "${FILE_IN_USE_FAILURE_LOGGED+set}" ]
[ -z "${FILES_IN_USE_CMD+set}" ]

# Without Perl, as before Unraid 6.11.0, age_mover runs fuser -s itself, and says so once per run.
old_run() {
local FILE_IN_USE_FAILURE_LOGGED=no
local -a FILES_IN_USE_CMD=()
chooseFilesInUseCheck
[ "${FILES_IN_USE_CMD[*]}" = "fuser -s" ]
export FUSER_STATUS=0
filesInUse "$plain"
export FUSER_STATUS=1
if filesInUse "$plain"; then
echo "clear fuser result was reported in use" >&2
exit 1
fi
}
printf '#!/bin/sh\n[ "$1" = -s ] || exit 9\nexit "$FUSER_STATUS"\n' >"$TMP/bin/fuser"
LOG_COUNT=0
PATH="$TMP/bin" old_run
[ "$LOG_COUNT" -eq 1 ]
# Without fuser either, the file stays put and the unchecked-file warning follows the fuser one.
no_fuser_run() {
local FILE_IN_USE_FAILURE_LOGGED=no
local -a FILES_IN_USE_CMD=()
PATH="$TMP/empty-bin" chooseFilesInUseCheck
PATH="$TMP/empty-bin" filesInUse "$plain"
PATH="$TMP/empty-bin" filesInUse "$plain"
}
LOG_COUNT=0
no_fuser_run
[ "$LOG_COUNT" -eq 2 ]
# A helper that does not compile would fail closed on every file, so fuser checks them, said once per run.
FILES_IN_USE_HELPER=$TMP/missing-helper
LOG_COUNT=0
chooseFilesInUseCheck
[ "${FILES_IN_USE_CMD[*]}" = "fuser -s" ]
[ "$LOG_COUNT" -eq 1 ]
FILES_IN_USE_HELPER=$fake_helper
# With "Move files that are in use" on, nothing is checked, so the fuser note is not logged.
# shellcheck disable=SC2034 # read by the sourced chooseFilesInUseCheck
MOVE_IN_USE=yes
LOG_COUNT=0
PATH="$TMP/empty-bin" chooseFilesInUseCheck
[ "$LOG_COUNT" -eq 0 ]
# With Perl in PATH, wherever it is, the helper runs through it.
mkdir "$TMP/perl-bin"
ln -s "$(command -v perl)" "$TMP/perl-bin/perl"
PATH="$TMP/perl-bin" chooseFilesInUseCheck
[ "${FILES_IN_USE_CMD[*]}" = "perl $FILES_IN_USE_HELPER" ]

echo "file lease tests passed"
20 changes: 0 additions & 20 deletions .github/workflows/auto-merge.yml

This file was deleted.

49 changes: 47 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ jobs:
with:
persist-credentials: false

- name: Install xmllint
run: sudo apt-get update -qq && sudo apt-get install -y -qq libxml2-utils
- name: Install test tools
run: sudo apt-get update -qq && sudo apt-get install -y -qq libxml2-utils perl

- name: Validate plugin manifest (XML)
run: xmllint --noout plugins/ca.mover.tuning.plg

- name: Test mover file leases
run: |
bash -n source/ca.mover.tuning/usr/local/emhttp/plugins/ca.mover.tuning/age_mover
bash .github/scripts/test_files_in_use.sh

# CHANGELOG.md must render to the committed CHANGES block for this branch's channel,
# pluginURL must point at this branch, and the manifest md5 must match the served package.
- name: Verify changelog, manifest and served package agree
Expand Down Expand Up @@ -83,3 +88,43 @@ jobs:

- name: Run tests
run: python -m pytest .github/scripts/release/tests -q

age-mover:
name: age_mover tests
runs-on: ubuntu-latest
container: debian:bookworm-slim
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Run the age_mover tests
env:
AGE_MOVER_TEST: '1'
run: bash tests/age_mover/run.sh

# Dependabot's pull requests merge once the jobs above pass; release-notes runs only for the stable release PR.
# The PR's author, not github.actor: the actor is whoever acted last and can be spoofed
dependabot-merge:
name: Merge Dependabot pull request
needs: [validate, release-notes, release-scripts, age-mover]
if: >-
!cancelled() && github.event_name == 'pull_request'
&& github.event.pull_request.user.login == 'dependabot[bot]'
&& github.repository == github.event.pull_request.head.repo.full_name
&& needs.validate.result == 'success' && needs.release-scripts.result == 'success'
&& needs.age-mover.result == 'success' && contains(fromJSON('["success", "skipped"]'), needs.release-notes.result)
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Merge
env:
PR_URL: ${{ github.event.pull_request.html_url }}
# the head this run tested: a newer push merges only after its own run passes
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GH_TOKEN: ${{ github.token }}
run: gh pr merge --merge --match-head-commit "$HEAD_SHA" "$PR_URL"
Loading
Loading