For example, the /srv/mediawiki-staging/fonts repo didn't get removed from the deployment server:
Description
Event Timeline
On pulling git gives warning: unable to rmdir 'fonts': Directory not empty, but that is easy to miss out. The leftover directory is tentatively cleanable via git clean which knows how to take in account git ignore list or whether a subdirectory is tracked by git.
Then in dry run (--dry-run) node on production:
$ git clean --dry-run -d --force --force Would remove wmf-config/scap
Which is a leftover empty directory not showing in git status (since it is empty). I will remove it.
Then git clean is easy to shoot oneself in the foot and given we only update submodules in operations/mediawiki-config every 3 years or so, I am tempted to skip implementing a cleanup step.
Mentioned in SAL (#wikimedia-operations) [2023-07-10T07:21:08Z] <hashar> deploy1002: removed empty untracked directory from MediaWiki staging area: rmdir /srv/mediawiki-staging/wmf-config/scap/log/ && rmdir /srv/mediawiki-staging/wmf-config/scap/ | T341292
Claimed that to be resolved after doing a manual git clean. I don't think we need to invest time in making scap to clean up the removal of submodules since we barely rely on them.