Skip to content

Commit dd81b2b

Browse files
committed
[#1654] Added config verification check to provision.sh.
1 parent 7978686 commit dd81b2b

45 files changed

Lines changed: 386 additions & 80 deletions

File tree

  • .vortex
    • docs/content
    • installer/tests/Fixtures/handler_process
      • _baseline
      • db_download_source_acquia
      • db_download_source_container_registry
      • db_download_source_ftp
      • db_download_source_lagoon
      • db_download_source_s3
      • deploy_types_all_circleci
      • deploy_types_all_gha
      • deploy_types_artifact
      • deploy_types_container_image
      • deploy_types_lagoon
      • deploy_types_none_circleci
      • deploy_types_none_gha
      • hosting_acquia
      • hosting_lagoon
      • hosting_project_name___acquia
      • hosting_project_name___lagoon
      • migration_disabled_lagoon
      • migration_download_source_acquia
      • migration_download_source_ftp
      • migration_download_source_lagoon
      • migration_download_source_s3
      • migration_download_source_url
      • migration_enabled_circleci
      • migration_enabled_lagoon
      • migration_enabled
      • names
      • notification_channels_all
      • notification_channels_github_only
      • notification_channels_jira_only
      • notification_channels_newrelic_only
      • notification_channels_none
      • notification_channels_slack_only
      • notification_channels_webhook_only
      • provision_database_lagoon
      • provision_profile
      • starter_drupal_cms_profile
      • starter_drupal_profile
      • version_scheme_other
      • version_scheme_semver
    • tests/bats/unit
  • scripts/vortex

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ VORTEX_PROVISION_OVERRIDE_DB=0
120120
# is not available.
121121
VORTEX_PROVISION_FALLBACK_TO_PROFILE=0
122122

123+
# Verify that configuration was not changed by database updates.
124+
# If enabled and config files are present, the provision will fail if
125+
# database update hooks modify active configuration, preventing
126+
# drush config:import from silently overwriting those changes.
127+
VORTEX_PROVISION_VERIFY_CONFIG_UNCHANGED_AFTER_UPDATE=0
128+
123129
# Skip database sanitization.
124130
#
125131
# Database sanitization is enabled by default in all non-production

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ The list below is automatically generated with [Shellvar](https://github.com/ale
401401
| <a id="vortex_provision_skip"></a>`VORTEX_PROVISION_SKIP` | Flag to skip site provisioning. | `UNDEFINED` | `scripts/vortex/provision.sh` |
402402
| <a id="vortex_provision_type"></a>`VORTEX_PROVISION_TYPE` | Set to 'profile' to install a site from profile instead of the database dump. | `database` | `.env`, `scripts/vortex/provision.sh` |
403403
| <a id="vortex_provision_use_maintenance_mode"></a>`VORTEX_PROVISION_USE_MAINTENANCE_MODE` | Put the site into a maintenance mode during site provisioning. | `1` | `.env`, `scripts/vortex/provision.sh` |
404+
| <a id="vortex_provision_verify_config_unchanged_after_update"></a>`VORTEX_PROVISION_VERIFY_CONFIG_UNCHANGED_AFTER_UPDATE` | Verify that configuration was not changed by database updates. If enabled and config files are present, the provision will fail if database update hooks modify active configuration, preventing drush config:import from silently overwriting those changes. | `UNDEFINED` | `.env`, `scripts/vortex/provision.sh` |
404405
| <a id="vortex_purge_cache_acquia_skip"></a>`VORTEX_PURGE_CACHE_ACQUIA_SKIP` | Skip purging of edge cache in Acquia environment. | `UNDEFINED` | `ACQUIA ENVIRONMENT` |
405406
| <a id="vortex_release_version_scheme"></a>`VORTEX_RELEASE_VERSION_SCHEME` | Versioning scheme used for releases.<br/><br/>Can be one of: calver, semver, other @see https://www.vortextemplate.com/docs/releasing | `calver` | `.env` |
406407
| <a id="vortex_show_login"></a>`VORTEX_SHOW_LOGIN` | Show one-time login link. | `UNDEFINED` | `scripts/vortex/info.sh` |

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,16 @@ section.
133133
134134
🔄 Run DB updates
135135
136+
⑦ 💡 Verify config unchanged? ──Config changed──► 🏁 EXIT 1 (fail) ✗
137+
│ Config unchanged (or check disabled)
138+
136139
⬇️ Import configuration (if config files present)
137140
138141
🧹 Rebuild caches
139142
140143
🔄 Run deployment hooks
141144
142-
😷 Run DB sanitization
145+
😷 Run DB sanitization
143146
144147
⚙️ Run custom scripts
145148
@@ -158,7 +161,8 @@ You can control the provisioning flow using the following environment variables:
158161
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/>
159162
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/>
160163
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/>
161-
7. `VORTEX_PROVISION_SANITIZE_DB_SKIP=1`<br/>Disable database sanitization.
164+
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.
162166

163167
:::tip
164168

.vortex/installer/tests/Fixtures/handler_process/_baseline/.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ VORTEX_PROVISION_OVERRIDE_DB=0
110110
# is not available.
111111
VORTEX_PROVISION_FALLBACK_TO_PROFILE=0
112112

113+
# Verify that configuration was not changed by database updates.
114+
# If enabled and config files are present, the provision will fail if
115+
# database update hooks modify active configuration, preventing
116+
# drush config:import from silently overwriting those changes.
117+
VORTEX_PROVISION_VERIFY_CONFIG_UNCHANGED_AFTER_UPDATE=0
118+
113119
# Skip database sanitization.
114120
#
115121
# Database sanitization is enabled by default in all non-production

.vortex/installer/tests/Fixtures/handler_process/db_download_source_acquia/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@ -149,13 +149,8 @@
1+
@@ -155,13 +155,8 @@
22
VORTEX_DB_FILE=db.sql
33

44
# Database download source.
@@ -13,7 +13,7 @@
1313
# Environment to download the database from.
1414
#
1515
# Applies to hosting environments.
16-
@@ -206,17 +201,3 @@
16+
@@ -212,17 +207,3 @@
1717
# with optional names in the format "email|name".
1818
# Example: "to1@example.com|Jane Doe, to2@example.com|John Doe"
1919
VORTEX_NOTIFY_EMAIL_RECIPIENTS="webmaster@star-wars.com|Webmaster"

.vortex/installer/tests/Fixtures/handler_process/db_download_source_container_registry/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@ -149,12 +149,11 @@
1+
@@ -155,12 +155,11 @@
22
VORTEX_DB_FILE=db.sql
33

44
# Database download source.
@@ -15,7 +15,7 @@
1515

1616
# Environment to download the database from.
1717
#
18-
@@ -206,17 +205,3 @@
18+
@@ -212,17 +211,3 @@
1919
# with optional names in the format "email|name".
2020
# Example: "to1@example.com|Jane Doe, to2@example.com|John Doe"
2121
VORTEX_NOTIFY_EMAIL_RECIPIENTS="webmaster@star-wars.com|Webmaster"

.vortex/installer/tests/Fixtures/handler_process/db_download_source_ftp/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@ -149,13 +149,19 @@
1+
@@ -155,13 +155,19 @@
22
VORTEX_DB_FILE=db.sql
33

44
# Database download source.
@@ -23,7 +23,7 @@
2323
# Environment to download the database from.
2424
#
2525
# Applies to hosting environments.
26-
@@ -206,17 +212,3 @@
26+
@@ -212,17 +218,3 @@
2727
# with optional names in the format "email|name".
2828
# Example: "to1@example.com|Jane Doe, to2@example.com|John Doe"
2929
VORTEX_NOTIFY_EMAIL_RECIPIENTS="webmaster@star-wars.com|Webmaster"

.vortex/installer/tests/Fixtures/handler_process/db_download_source_lagoon/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@ -149,13 +149,8 @@
1+
@@ -155,13 +155,8 @@
22
VORTEX_DB_FILE=db.sql
33

44
# Database download source.
@@ -13,7 +13,7 @@
1313
# Environment to download the database from.
1414
#
1515
# Applies to hosting environments.
16-
@@ -206,17 +201,3 @@
16+
@@ -212,17 +207,3 @@
1717
# with optional names in the format "email|name".
1818
# Example: "to1@example.com|Jane Doe, to2@example.com|John Doe"
1919
VORTEX_NOTIFY_EMAIL_RECIPIENTS="webmaster@star-wars.com|Webmaster"

.vortex/installer/tests/Fixtures/handler_process/db_download_source_s3/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@ -149,13 +149,16 @@
1+
@@ -155,13 +155,16 @@
22
VORTEX_DB_FILE=db.sql
33

44
# Database download source.
@@ -20,7 +20,7 @@
2020
# Environment to download the database from.
2121
#
2222
# Applies to hosting environments.
23-
@@ -206,17 +209,3 @@
23+
@@ -212,17 +215,3 @@
2424
# with optional names in the format "email|name".
2525
# Example: "to1@example.com|Jane Doe, to2@example.com|John Doe"
2626
VORTEX_NOTIFY_EMAIL_RECIPIENTS="webmaster@star-wars.com|Webmaster"

.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@ -179,7 +179,7 @@
1+
@@ -185,7 +185,7 @@
22

33
# Deployment occurs when tests pass in the CI environment.
44
# @see https://www.vortextemplate.com/docs/deployment

0 commit comments

Comments
 (0)