Skip to content

[#2848] Split provision example into demo, development module and example scripts. - #2859

Merged
AlexSkrypnyk merged 7 commits into
mainfrom
feature/2848-split-provision
Jul 29, 2026
Merged

[#2848] Split provision example into demo, development module and example scripts.#2859
AlexSkrypnyk merged 7 commits into
mainfrom
feature/2848-split-provision

Conversation

@AlexSkrypnyk

Copy link
Copy Markdown
Member

Closes #2848

Summary

scripts/provision-10-example.sh was documented as a disposable example ("Clone this file and modify it to your needs or simply remove it"), but it actually carried the entire non-production setup for the shipped site: the content model, the site name and admin navigation swap, the contrib and service modules, the ys_base/ys_search/ys_demo custom modules, drush deploy:hook, and the devel/sdc_devel development modules. A project that followed the header instruction and deleted the file lost all of it, including the development modules that have nothing to do with the demo content. This PR splits that single script into four scripts, each with a distinct two-digit prefix that now actually orders execution: provision-00-enable-demo-modules.sh (the renamed demo-site setup), provision-10-enable-dev-modules.sh (new, installs devel/sdc_devel behind their own installer fences), provision-20-migration.sh and provision-30-search-index.sh (unchanged), and provision-40-example.sh (new, a genuine no-op example). The installer, its tests, BATS coverage, and documentation are updated to match, and the installer now deletes the dev-modules script outright when neither module is selected, rather than shipping an empty shell.

Changes

Scripts

  • Renamed scripts/provision-10-example.sh to scripts/provision-00-enable-demo-modules.sh, keeping the recipes/page content model, site name, admin navigation swap (installs navigation, uninstalls toolbar), contrib module list, Redis/ClamAV/Solr service modules, ys_base/ys_search/ys_demo custom modules, and drush deploy:hook. It runs first (prefix 00) because the content model must exist before the modules that attach behaviour to it are installed.
  • Added scripts/provision-10-enable-dev-modules.sh, installing sdc_devel and devel, each still behind its own MODULE_SDC_DEVEL / MODULE_DEVEL installer fence.
  • Added scripts/provision-40-example.sh as a genuine example: it demonstrates the environment guard and the VORTEX_PROVISION_OVERRIDE_DB fresh-database branch, and installs nothing.
  • scripts/provision-20-migration.sh and scripts/provision-30-search-index.sh are unchanged. Every shipped script now has a distinct two-digit prefix, which is what actually orders execution.

Installer

  • Modules.php gained a DEV_MODULES constant and now removes scripts/provision-10-enable-dev-modules.sh entirely when neither devel nor sdc_devel is selected, because at that point the script has no operations left.
  • The per-module line rewrite was retargeted from the old example path to scripts/provision-00-enable-demo-modules.sh. The demo script itself is only pruned by its existing token fences, never deleted, because config/default/ ships empty and this script is the only thing that enables modules on a first provision.
  • ModulesHandlerProcessTest gained a modules_no_devel_sdc_devel dataset covering the whole-file removal.
  • Installer fixtures regenerated across 149 datasets to match the new file names and content.

Tests

  • New provision-enable-dev-modules.bats.
  • provision-example.bats renamed to provision-enable-demo-modules.bats.
  • A new provision-example.bats covers the new example script.
  • 14 provision.bats scenarios rewritten to expect three subscripts instead of one.
  • SutTrait::assertVortexFilesPresent() now asserts all four shipped script names.

Documentation

  • .vortex/tooling/README.md layout and prose updated to list every shipped script and distinguish the example from the scripts that do real work.
  • provision.mdx gained a table of shipped scripts, plus Demo modules / Development modules sections.
  • .vortex/docs/content/drupal/provision-example.sh aligned with the new minimal example.

Before / After

BEFORE
┌────────────────────────────────────────────────────────
│ scripts/
│ ├── provision-10-example.sh
│ │     "Clone this file ... or simply remove it"
│ │     -- but actually runs the ENTIRE demo setup:
│ │        content model, site name, admin nav swap,
│ │        contrib/service modules, ys_base/search/demo,
│ │        devel/sdc_devel, drush deploy:hook
│ ├── provision-20-migration.sh          (real work)
│ └── provision-30-search-index.sh       (real work)
└────────────────────────────────────────────────────────
  Deleting the "example" per its own header silently drops
  the whole demo setup AND both development modules.

AFTER
┌────────────────────────────────────────────────────────
│ scripts/
│ ├── provision-00-enable-demo-modules.sh   (real work, renamed)
│ ├── provision-10-enable-dev-modules.sh    (real work, new)
│ ├── provision-20-migration.sh             (real work, unchanged)
│ ├── provision-30-search-index.sh          (real work, unchanged)
│ └── provision-40-example.sh               (EXAMPLE - no-op, new)
└────────────────────────────────────────────────────────
  Every script has a distinct two-digit prefix. Only the last
  one is disposable, and it installs nothing.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9015d6d5-04dc-4510-989a-e2213a3906b5

📥 Commits

Reviewing files that changed from the base of the PR and between f5d9960 and 5cbec60.

⛔ Files ignored due to path filters (67)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/provision-10-enable-dev-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/provision-40-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_no_base/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_no_base/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_no_demo/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_no_demo/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_no_search/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_no_search/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_none/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_none/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_coffee/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_coffee/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_config_update/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_config_update/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_devel/scripts/provision-10-enable-dev-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_devel/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/scripts/-provision-10-enable-dev-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/web/sites/default/includes/modules/-settings.devel.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/scripts/provision-10-enable-dev-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_shield/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_shield/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/scripts/-provision-10-enable-dev-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_clamav/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_clamav/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_redis/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_redis/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_solr/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_solr/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_none/scripts/provision-00-enable-demo-modules.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_none/scripts/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (14)
  • .vortex/docs/content/drupal/provision-example.sh
  • .vortex/docs/content/drupal/provision.mdx
  • .vortex/installer/src/Prompts/Handlers/Modules.php
  • .vortex/installer/tests/Functional/Handlers/ModulesHandlerProcessTest.php
  • .vortex/tests/phpunit/Traits/SutTrait.php
  • .vortex/tooling/README.md
  • .vortex/tooling/tests/unit/provision-enable-demo-modules.bats
  • .vortex/tooling/tests/unit/provision-enable-dev-modules.bats
  • .vortex/tooling/tests/unit/provision-example.bats
  • .vortex/tooling/tests/unit/provision.bats
  • scripts/provision-00-enable-demo-modules.sh
  • scripts/provision-10-enable-dev-modules.sh
  • scripts/provision-10-example.sh
  • scripts/provision-40-example.sh

Comment @coderabbitai help to get the list of available commands.

@AlexSkrypnyk AlexSkrypnyk added the A2 Working clone index A2 label Jul 29, 2026
@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.68421% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.49%. Comparing base (f5d9960) to head (5cbec60).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
scripts/provision-00-enable-demo-modules.sh 97.61% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2859      +/-   ##
==========================================
- Coverage   86.84%   86.49%   -0.36%     
==========================================
  Files          98       93       -5     
  Lines        4806     4671     -135     
  Branches       47        3      -44     
==========================================
- Hits         4174     4040     -134     
+ Misses        632      631       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

📖 Documentation preview for this pull request has been deployed to Netlify:

https://6a69763c345dd451d7e52fe2--vortex-docs.netlify.app

This preview is rebuilt on every commit and is not the production documentation site.

@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.55% (204/207)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

1 similar comment
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk
AlexSkrypnyk enabled auto-merge (squash) July 29, 2026 04:08
@AlexSkrypnyk
AlexSkrypnyk disabled auto-merge July 29, 2026 04:08
@AlexSkrypnyk
AlexSkrypnyk merged commit e94fde1 into main Jul 29, 2026
31 of 32 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/2848-split-provision branch July 29, 2026 04:08
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Jul 29, 2026
@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.55% (204/207)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A2 Working clone index A2

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Split scripts/provision-10-example.sh into true example and provision-10-enable-dev-modules.sh so that dev modules would survive the scaffold

1 participant