This document describes how to pull upstream changes from the Stanford Profile into the CASBS Gryphon project. The profile is managed as a git subtree under docroot/profiles/custom/stanford_profile.
- A working local environment (see the main README for setup)
- A clean git working tree (no uncommitted changes)
- Acquia Cloud API credentials configured in
drush/local.drush.yml
Pull the latest from the 12.x branch:
git checkout 12.x
git pull origin 12.xgit checkout -b upstream-update/<tag>Replace <tag> with the profile tag you're pulling in (e.g., 12.2.1).
git subtree pull will refuse to run if there are uncommitted changes. Stash or commit any local work first:
git status
# If there are changes:
git stash --include-untrackedIn composer.json, find the pull-profile script and update the tag reference to the desired version:
"git subtree pull --prefix=docroot/profiles/custom/stanford_profile --squash stanford_profile tags/<new-tag> || true",You can find available tags at https://github.com/SU-SWS/stanford_profile/tags
lando composer pull-profileThis script does the following:
- Removes the existing profile directory (
rm -rf) - Restores it from the current git index (
git checkout) - Adds the
stanford_profileremote (if not already present) - Pulls the specified tag as a squashed subtree merge
- Restores the CASBS-specific overrides of
composer.jsonandstanford_profile.info.yml(these files are maintained locally and should not be overwritten by upstream)
You will be prompted to enter a merge commit message. The default message is fine.
Before committing anything further, carefully review what changed. In VS Code, the Source Control panel provides a helpful tree view of all modified files.
Pay particular attention to:
config/sync/split/casbs/-- This directory contains CASBS-specific config split overrides (custom content types likecasbs_book, CASBS-specific person fields, JSON API config, role permissions, etc.). Any upstream changes that touch the base configs these patches apply to could cause conflicts or unexpected behavior.- User roles and permissions -- Check for changes to
user.role.*.ymlfiles. CASBS has custom permission patches (e.g.,site_editor,layout_builder_user,decoupled_site_users). - JSON API configuration -- CASBS uses JSON API to sync content from an external FileMaker database. Look for changes to
jsonapi.settings.yml,jsonapi_extras.*configs, and thestanford_decoupledmodule. - Migration configs -- Changes to
migrate_plus.migration.*files could affect event, person, or course imports. - Theme changes -- Review changes in
themes/stanford_basic/to make sure CASBS theme customizations aren't lost (see commit history for prior theme restoration work).
lando composer updateThis pulls in any new or updated packages required by the updated profile.
lando drush deployThis runs database updates, imports configuration, and clears caches. Check your local site for:
- The site loads without errors
- SAML login still works
- JSON API endpoints respond correctly
- Content types and views render properly
- The FileMaker data import still functions (if applicable)
If you stashed changes earlier, restore them:
git stash popYou will likely want to run a lando drush @default.local cex to export any configs which have been updated via the dependency update process.
Once everything looks good locally, commit the changes and push the branch:
git add -A
git commit -m "Updated stanford_profile to <tag>"
git push origin upstream-update/<tag>Then open a pull request against 12.x for review.
The git subtree pull command requires a clean working tree. Stash your changes first:
git stash --include-untracked
lando composer pull-profile
git stash popIf lando composer commands time out, make sure process-timeout is set to 0 in composer.json:
"config": {
"process-timeout": 0
}If the subtree pull produces merge conflicts, resolve them manually. The CASBS-specific files that are always kept local (composer.json, stanford_profile.info.yml) are handled automatically by the script, but other conflicts will need manual resolution.
If lando drush deploy fails during config import, check for:
- Removed or renamed modules that are still referenced in config
- Schema changes in updated modules that require manual migration
- Config split patches in
split/casbs/that no longer apply cleanly to the updated base config
You can debug config issues with:
lando drush config:status
lando drush config:import --diff