[#2153] Delegated environment detection and provider settings to 'drevops/environment-detector'.#2690
[#2153] Delegated environment detection and provider settings to 'drevops/environment-detector'.#2690AlexSkrypnyk wants to merge 13 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 51 minutes and 18 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (253)
📒 Files selected for processing (50)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.x #2690 +/- ##
==========================================
- Coverage 87.54% 87.43% -0.12%
==========================================
Files 99 99
Lines 5068 5062 -6
Branches 3 3
==========================================
- Hits 4437 4426 -11
- Misses 631 636 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6a3e5edbf5508a0708d8a0ca--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…he DRUPAL_ENVIRONMENT override with ENVIRONMENT_TYPE.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Closes #2153
Summary
Delegates both Drupal environment-type detection and all provider-specific Drupal settings to the
drevops/environment-detectorpackage. The entire environment block insettings.phpcollapses to a single line that requires the detector's shipped Drupal entry point; the detector resolves the environment type, populates$settings['environment'], and applies the active hosting platform's and container's Drupal settings. Vortex no longer carries any environment-specific provider settings of its own.The package is pinned to
dev-mainwhile its API is finalised; bump it to a tagged release once published.Integration
web/sites/default/settings.phpreduces the entire environment section to:The shipped entry point runs in
settings.php's scope and hands the site's own$settings/$configto the detector's Drupal context by reference, so the detector writes the very arrays Drupal reads back - no global-scope bridge is needed.Upstream work
The detector gained everything this integration needs, upstream first:
contextualize().environment.drupal.phpentry point and a by-reference Drupal context (noglobal $settings).web,app,webserver,nginx,apache,apache2) and aLOCALDEV_URLread.^localhost$,^127\.0\.0\.1$) in the always-applied Drupal context.^.+\.amazee\.io$.Changes
Detection and settings
settings.phpis now a singlerequireof the detector'senvironment.drupal.php; the basetrusted_host_patterns, theEnvironment::init()call, the global-scope bridge, and the variable bridges are all gone.ENVIRONMENT_LOCAL/CI/DEV/STAGE/PRODconstants; every module settings include compares$settings['environment']against the detector'sEnvironment::*constants.includes/providers/settings.*.phpfiles (acquia,lagoon,container,circleci,gha) - their detection and platform settings now live in the detector.Variables (renamed to the detector's names, no bridge)
VORTEX_LAGOON_PRODUCTION_BRANCH→ENVIRONMENT_PRODUCTION_BRANCH(.env,.lagoon.yml).VORTEX_LOCALDEV_URL→LOCALDEV_URL(docker-compose.yml,.ahoy.yml, tooling, installer, docs, test harness).VORTEX_LAGOON_AMAZEEIO_REGIONremoved - the detector trusts^.+\.amazee\.io$unconditionally, so no region knob is needed.Preview environment
previewtype for ephemeral per-branch/per-PR environments (Acquia on-demand environments, non-developLagoon branches). Vortex treatspreviewthe same asdevelopmentin its module settings (config_split,environment_indicator).Installer, tests, and docs
CiProvider,HostingProvider, andHostingProjectNamehandlers no longer manage the removed provider files.trusted_host_patterns, the detector's canonicalcache_prefix/route shapes, and the newpreviewoutcomes. The test harness clears theENVIRONMENT_/LOCALDEV_URLvariables between runs.Before / After