Skip to content

Commit 2161a4c

Browse files
authored
Fixed provision failing on fallback install from standard profile + added cache rebuild after updb. (#2406)
1 parent 85a4f18 commit 2161a4c

5 files changed

Lines changed: 288 additions & 12 deletions

File tree

.vortex/docs/content/development/variables.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ The list below is automatically generated with [Shellvar](https://github.com/ale
387387
| <a id="vortex_notify_webhook_url"></a>`VORTEX_NOTIFY_WEBHOOK_URL` | Webhook URL to send notifications to. | `UNDEFINED` | `.env`, `scripts/vortex/notify-webhook.sh`, `ACQUIA ENVIRONMENT`, `LAGOON ENVIRONMENT` |
388388
| <a id="vortex_project"></a>`VORTEX_PROJECT` | Project name.<br/><br/>Drives internal naming within the codebase. Does not affect the names of containers and development URL - those depend on the project directory and can be overridden with [`$COMPOSE_PROJECT_NAME`](#compose_project_name). | `your_site` | `.env`, `scripts/vortex/info.sh` |
389389
| <a id="vortex_provision_acquia_skip"></a>`VORTEX_PROVISION_ACQUIA_SKIP` | Skip Drupal site provisioning in Acquia environment. | `UNDEFINED` | `ACQUIA ENVIRONMENT` |
390+
| <a id="vortex_provision_cache_rebuild_after_db_update_skip"></a>`VORTEX_PROVISION_CACHE_REBUILD_AFTER_DB_UPDATE_SKIP` | Skip cache rebuild after database updates. | `0` | `scripts/vortex/provision.sh` |
390391
| <a id="vortex_provision_db"></a>`VORTEX_PROVISION_DB` | Provision database dump file. If not set, it will be auto-discovered from the VORTEX_DB_DIR directory using the VORTEX_DB_FILE name. | `UNDEFINED` | `scripts/vortex/provision.sh` |
391392
| <a id="vortex_provision_db_dir"></a>`VORTEX_PROVISION_DB_DIR` | Directory with database dump file. | `./.data` | `scripts/vortex/provision.sh` |
392393
| <a id="vortex_provision_db_file"></a>`VORTEX_PROVISION_DB_FILE` | Database dump file name. | `db.sql` | `scripts/vortex/provision.sh` |

.vortex/docs/content/drupal/provision.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ section.
136136
⑦ 💡 Verify config unchanged? ──Config changed──► 🏁 EXIT 1 (fail) ✗
137137
│ Config unchanged (or check disabled)
138138
139+
⑧ 🧹 Rebuild caches after DB updates (skippable)
140+
139141
⬇️ Import configuration (if config files present)
140142
141143
🧹 Rebuild caches
142144
143145
🔄 Run deployment hooks
144146
145-
😷 Run DB sanitization
147+
😷 Run DB sanitization
146148
147149
⚙️ Run custom scripts
148150
@@ -158,11 +160,12 @@ You can control the provisioning flow using the following environment variables:
158160
1. `VORTEX_PROVISION_SKIP=1`<br/>Kill-switch to completely skip provisioning. The script will exit immediately after start. Useful in emergencies when any kind of automation needs to be disabled.<br/><br/>
159161
2. `VORTEX_PROVISION_TYPE=profile`<br/>Install from a Drupal `profile` instead of importing from a `database` dump. Useful for building sites without the persistent DB and/or test profile configuration installation.<br/><br/>
160162
3. `VORTEX_PROVISION_OVERRIDE_DB=1`<br/>Drop an existing database before importing from dump/installing from profile. This is useful when an already provisioned environment requires a fresh database to be imported.<br/><br/>
161-
4. `VORTEX_PROVISION_FALLBACK_TO_PROFILE=1`<br/>Automatically fall back to installing from profile if the database dump file or container image is not available. Useful for distribution demos or when using recipes/profiles that can install without a pre-existing database.<br/><br/>
163+
4. `VORTEX_PROVISION_FALLBACK_TO_PROFILE=1`<br/>Automatically fall back to installing from profile if the database dump file or container image is not available. The site is installed from the configured profile, the Shield module is enabled to protect the environment, and all post-provision operations (configuration import, database updates, deployment hooks, etc.) are skipped. This provides a minimal working Drupal site when no database is available.<br/><br/>
162164
5. `VORTEX_PROVISION_POST_OPERATIONS_SKIP=1`<br/>Skip configuration imports, database updates, and other post-provisioning steps. Essentially, this is `drush sql:drop` and `$(drush sql:connect) < .data/db.sql` commands. This is useful when you want to provision a site without running any additional operations.<br/>`ahoy import-db` uses this flag to import DB and exit.<br/><br/>
163165
6. `VORTEX_PROVISION_USE_MAINTENANCE_MODE=1`<br/>Enable maintenance mode right after the site is bootstrappable and disable it at the end. Useful when you want to prevent users from accessing the site while it is being provisioned.<br/><br/>
164166
7. `VORTEX_PROVISION_VERIFY_CONFIG_UNCHANGED_AFTER_UPDATE=1`<br/>Verify that active configuration was not changed by database updates. When enabled and config files are present, the provision will fail if `drush updatedb` modifies active configuration, preventing `drush config:import` from silently overwriting those changes.<br/><br/>
165-
8. `VORTEX_PROVISION_SANITIZE_DB_SKIP=1`<br/>Disable database sanitization.
167+
8. `VORTEX_PROVISION_CACHE_REBUILD_AFTER_DB_UPDATE_SKIP=1`<br/>Skip the cache rebuild that runs between database updates and configuration import. By default, caches are rebuilt after `drush updatedb` to ensure a clean state before importing configuration.<br/><br/>
168+
9. `VORTEX_PROVISION_SANITIZE_DB_SKIP=1`<br/>Disable database sanitization.
166169

167170
:::tip
168171

0 commit comments

Comments
 (0)