Skip to content

Comments

Simplified provision to use direct commands.#2303

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/simplify-provision
Feb 18, 2026
Merged

Simplified provision to use direct commands.#2303
AlexSkrypnyk merged 1 commit intomainfrom
feature/simplify-provision

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Feb 18, 2026

Summary

Replaced drush deploy in provision.sh with standalone Drush commands to
allow inserting logic between individual provisioning steps (needed for #1654).

The two conditional branches (config files exist vs not) are now a single
linear flow:

  1. drush updatedb — always runs
  2. drush config:import — only when config files are present
  3. drush cache:rebuild — always runs
  4. drush deploy:hook — always runs

Changes

  • scripts/vortex/provision.sh — replaced the if/else branching that
    called drush deploy (config path) or standalone commands (no-config path)
    with a single linear flow using standalone commands, where config:import
    runs conditionally.
  • .vortex/docs/content/drupal/provision.mdx — updated the provisioning
    flow diagram to reflect the new command order (DB updates before config
    import), marked config import as conditional, and updated the rationale text
    to remove references to wrapping drush deploy.
  • .vortex/tests/bats/unit/provision.bats — updated all 14 test cases to
    match the new output messages and command mocks. The config test now mocks
    standalone updatedb, config:import, cache:rebuild, and deploy:hook
    instead of drush deploy.
  • .vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php — updated
    provision and import-db integration test assertions to match the new output
    messages.

Test plan

  • All 14 BATS provision unit tests pass.
  • PHPUnit integration tests pass (require Docker environment).

Summary by CodeRabbit

  • Documentation

    • Updated Drupal provisioning documentation to clarify deployment workflow steps.
  • Improvements

    • Enhanced provisioning process messaging to display configuration imports and deployment hooks as distinct steps instead of combined operations.

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

Walkthrough

The provisioning workflow is refactored to replace the unified "drush deploy" command with separate sequential Drush operations: UUID synchronization, database updates, configuration import, and deployment hooks. Documentation, provisioning script logic, and test expectations are updated accordingly.

Changes

Cohort / File(s) Summary
Documentation
.vortex/docs/content/drupal/provision.mdx
Prose updated to reflect separate Drush commands (updatedb, config:import, deploy:hook) instead of unified drush deploy flow. Provisioning narrative expanded to include bootstrap from database dumps or profiles with clarified conditional and extensible behavior.
Provisioning Script
scripts/vortex/provision.sh
Replaces drush deploy with sequential steps: UUID sync from config (if present), explicit drush updatedb, drush config:import (gated by config presence), and drush deploy:hook. Control flow adjusted to perform cache rebuilding after configuration imports.
Test Expectations
.vortex/tests/bats/unit/provision.bats, .vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php
Updates expected log messages across multiple test scenarios: replaces drush deploy references with "Importing configuration." and drush deploy:hook references with "Running deployment hooks." Adjusts surrounding test assertions to align with new provisioning messaging sequence.

Sequence Diagram

sequenceDiagram
    participant Provision as Provisioning Script
    participant Config as Configuration Files
    participant DB as Database
    participant Drush as Drush Commands
    participant Deploy as Deployment Hooks

    rect rgba(100, 150, 200, 0.5)
    Note over Provision,Deploy: New Provisioning Flow
    Provision->>Config: Check if config files exist
    alt Config files present
        Provision->>Drush: Set site UUID from system.site.yml
        Drush->>DB: Update site UUID
    end
    Provision->>Drush: Run updatedb (database updates)
    Drush->>DB: Apply pending updates
    alt Config files present
        Provision->>Drush: Execute config:import
        Drush->>Config: Import configuration
    end
    Provision->>Drush: Execute deploy:hook
    Drush->>Deploy: Run deployment hooks
    Provision->>Drush: Rebuild caches
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 Hops through the provision, step by step so neat,
UUID syncs and configs meet,
Deploy hooks hop in time,
The provisioning flow—sublime! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing the drush deploy command with individual, direct commands (updatedb, config:import, deploy:hook) across documentation, tests, and provisioning scripts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/simplify-provision

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

@AlexSkrypnyk AlexSkrypnyk added this to the 1.36.0 milestone Feb 18, 2026
@github-actions
Copy link

Code Coverage Report:
  2026-02-18 00:12:48

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-18 00:13:03

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/vortex/provision.sh (1)

291-333: ⚠️ Potential issue | 🟠 Major

Guideline violation: changes in scripts/vortex/.

This file was modified, but repository rules require customizations to live under scripts/custom/. Please move the change or update the guideline if this repository is meant to modify template scripts directly. As per coding guidelines, "Never modify files in scripts/vortex/ directory - use scripts/custom/ for custom scripts instead".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/vortex/provision.sh` around lines 291 - 333, This change modified the
protected provision script (uses variables like site_has_config_files,
config_path, config_uuid and drush commands such as drush updatedb, drush
config:import, drush cache:rebuild, drush deploy:hook), which violates the rule
to not edit scripts in the vortex template; revert your edits to restore the
original provision.sh and move the new logic into a custom script under the
allowed custom scripts area (create a new script that checks
site_has_config_files, extracts config_uuid from system.site.yml if present,
runs drush updatedb, drush config:import (and config_split import when
config_split is enabled), drush cache:rebuild, and drush deploy:hook), and
ensure whatever bootstrapping mechanism sources or executes that custom script
during provisioning instead of modifying the vortex template.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@scripts/vortex/provision.sh`:
- Around line 291-333: This change modified the protected provision script (uses
variables like site_has_config_files, config_path, config_uuid and drush
commands such as drush updatedb, drush config:import, drush cache:rebuild, drush
deploy:hook), which violates the rule to not edit scripts in the vortex
template; revert your edits to restore the original provision.sh and move the
new logic into a custom script under the allowed custom scripts area (create a
new script that checks site_has_config_files, extracts config_uuid from
system.site.yml if present, runs drush updatedb, drush config:import (and
config_split import when config_split is enabled), drush cache:rebuild, and
drush deploy:hook), and ensure whatever bootstrapping mechanism sources or
executes that custom script during provisioning instead of modifying the vortex
template.

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-18 00:15:39

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-18 00:16:24

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.15%. Comparing base (6e911d9) to head (7ac235c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2303      +/-   ##
==========================================
- Coverage   77.72%   77.15%   -0.57%     
==========================================
  Files         117      110       -7     
  Lines        6181     6023     -158     
  Branches       44        0      -44     
==========================================
- Hits         4804     4647     -157     
+ Misses       1377     1376       -1     

☔ View full report in Codecov by Sentry.
📢 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.

@AlexSkrypnyk AlexSkrypnyk merged commit 7978686 into main Feb 18, 2026
34 of 35 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/simplify-provision branch February 18, 2026 01:26
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

1 participant