moodle: drop stale /var/lib/moodle paths, skip moodledata caches #1
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/tklbam-profiles!1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/moodle-dataroot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem: the moodle profile still lists /var/lib/moodle (from 2010) while the appliance has kept its dataroot at /var/www/moodledata since 2012, so those lines match nothing; moodledata's cache, localcache, sessions and temp directories, which Moodle regenerates, go into every backup and bring stale sessions back on restore.
Diagnosis: the profile was never updated after the dataroot moved (DATAROOT in the appliance's conf.d/main).
Fix: remove the stale lines and exclude the four regenerated directories, as the magento and redmine profiles do for their caches. moodledata itself stays covered through /var/www in the core profile. The last commit makes tests/coverage.sh read COVERAGE_THRESHOLD, the variable the reusable workflow exports.
Tests: a profile is data, so the test is a lint (tests/check-profile.sh): given a profile and the appliance's path variables (tests/fixtures/moodle.conf), every path must be absolute, listed once and under one of those roots, with at least one under DATAROOT. tests/coverage.sh reports the share of profile lines the lint accounts for (4/4) and checks that the profile as it was before the fix (tests/fixtures/moodle-stale.profile) is rejected.
Serves BRIEF section 8 (Moodle is in the tier-1 catalog) under decision 0002 (tklbam family last, this is the one touched profile).