Skip to content

docs(drupal-core): fix seed cache description and service setup instructions#146

Merged
rfay merged 3 commits into
mainfrom
20260510_rfay_fix_cache_mgt
May 10, 2026
Merged

docs(drupal-core): fix seed cache description and service setup instructions#146
rfay merged 3 commits into
mainfrom
20260510_rfay_fix_cache_mgt

Conversation

@rfay
Copy link
Copy Markdown
Member

@rfay rfay commented May 10, 2026

Summary

Fixes inaccurate and incomplete seed cache documentation introduced in #145, plus a service file bug that prevents the timer from working.

Description fixes:

  • Replaced incorrect "database is always installed fresh via ddev drush si" — the seed cache has no DDEV project, no database, no vendor files; it is a simple git checkout
  • Fixed ddev composer installcomposer install in the cache-hit description

Migration step fixes (the steps in #145 were incomplete — the timer never ran):

  • Add install of drupal-cache-updater.timer (was missing entirely)
  • Add sed to substitute User=YOURUSER placeholder in the service file (without this, the service fails to start)
  • Add systemctl enable --now drupal-cache-updater.timer (without this, the hourly update is never scheduled)

Service file fix:

  • WorkingDirectory=%hWorkingDirectory=/tmp%h causes "Permission denied" when the timer fires. The script uses only absolute paths so the working directory is irrelevant.

Script fix:

  • Add reinstall reminder to update-drupal-cache so the deployed /usr/local/bin/ copy must be updated manually after script changes

Required admin action on each server

Run these steps to fix the installed service and get the timer working:

REPO=~/workspace/coder-ddev

# Reinstall the updated script and service file
sudo install -m 755 $REPO/drupal-core/scripts/update-drupal-cache \
  /usr/local/bin/update-drupal-cache
sudo install -m 644 $REPO/drupal-core/scripts/drupal-cache-updater.service \
  /etc/systemd/system/
sudo install -m 644 $REPO/drupal-core/scripts/drupal-cache-updater.timer \
  /etc/systemd/system/

# Fix User= placeholder if not already done
sudo grep -q YOURUSER /etc/systemd/system/drupal-cache-updater.service && \
  sudo sed -i "s/User=YOURUSER/User=$(whoami)/" /etc/systemd/system/drupal-cache-updater.service

# Reload and restart
sudo systemctl daemon-reload
sudo systemctl enable --now drupal-cache-updater.timer
sudo systemctl start drupal-cache-updater.service

# Verify
systemctl list-timers drupal-cache-updater.timer
journalctl -u drupal-cache-updater.service --no-pager | tail -10

🤖 Generated with Claude Code

rfay and others added 3 commits May 10, 2026 16:59
- Remove incorrect "database installed via ddev drush si" line; the seed
  cache is a simple git checkout with no DDEV project, database, or vendor files
- Fix "ddev composer install" → "composer install" in cache-hit description
- Add reinstall reminder to update-drupal-cache so the deployed copy
  in /usr/local/bin/ gets updated after script changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The migration instructions copied from PR #145 were incomplete:
- Missing timer file install (drupal-cache-updater.timer)
- Missing User=YOURUSER substitution in the service file
- Missing systemctl enable --now drupal-cache-updater.timer

Without these, the hourly auto-update never runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
WorkingDirectory=%h fails with "Permission denied" when the timer fires
(even though a manual sudo systemctl start succeeds). The script uses
only absolute paths, so the working directory is irrelevant.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rfay rfay merged commit 3f94095 into main May 10, 2026
17 of 21 checks passed
@rfay rfay deleted the 20260510_rfay_fix_cache_mgt branch May 10, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant