Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify config split #1455

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions blt/blt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,29 @@ drush:
default_alias: '${drush.aliases.local}'
modules:
local:
enable: { }
enable: { }
uninstall:
- google_analytics
- acquia_connector
- purge
- shield
- config_readonly
ci:
enable:
- hs_config_readonly
enable: { }
uninstall:
- google_analytics
- purge
- acquia_connector
- shield
dev:
enable:
- acquia_connector
- shield
- stage_file_proxy
uninstall:
- google_analytics
- config_readonly
uninstall: { }
test:
enable:
- acquia_connector
- shield
- stage_file_proxy
uninstall:
- google_analytics
- config_readonly
uninstall: { }
prod:
enable:
- google_analytics
- acquia_connector
- hs_config_readonly
uninstall:
- shield
- stage_file_proxy
multisites:
- aaai
Expand Down
4 changes: 4 additions & 0 deletions blt/src/Blt/Plugin/Commands/ToggleModulesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ protected function doToggleModules($command, $config_key) {
$modules_list = implode(' ', $modules);
$result = $this->taskDrush()
->drush("$command $modules_list")
->drush('eval')
->arg('\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();')
->run();
// Unable to uninstall all modules at the same time, try one at a time.
if (!$result->wasSuccessful()) {
Expand All @@ -68,6 +70,8 @@ protected function doToggleModules($command, $config_key) {
// command will throw an error. Ignore that.
$this->taskDrush()
->drush("$command $module")
->drush('eval')
->arg('\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();')
->printOutput(FALSE)
->run();
}
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@
"drupal/focal_point": {
"https://www.drupal.org/project/focal_point/issues/3328807": "https://www.drupal.org/files/issues/2023-01-06/3328807-focal_point-image_width_when_no_image_to_crop.patch"
},
"drupal/google_analytics": {
"https://www.drupal.org/project/google_analytics/issues/3373921": "https://www.drupal.org/files/issues/2023-08-07/google-analytics-issues-3373921-cannot-install-from-existing-config-11.patch"
},
"drupal/hook_event_dispatcher": {
"https://www.drupal.org/project/hook_event_dispatcher/issues/3354751": "https://www.drupal.org/files/issues/2023-04-17/hook_event_dispatcher-4.x-3354751.patch"
},
Expand Down
4 changes: 1 addition & 3 deletions config/default/config_split.config_split.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ label: Ci
description: 'CircleCi Environment'
weight: 0
folder: ../config/envs/ci
module:
hs_config_readonly: 0
config_readonly: 0
module: { }
theme: { }
blacklist: { }
graylist: { }
Expand Down
4 changes: 0 additions & 4 deletions config/default/config_split.config_split.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,19 @@ module:
acquia_connector: 0
acquia_purge: 0
dblog: 0
nobots: 0
purge: 0
purge_drush: 0
purge_processor_cron: 0
purge_processor_lateruntime: 0
purge_queuer_coretags: 0
purge_ui: 0
shield: 0
stage_file_proxy: 0
theme: { }
blacklist:
- acquia_connector.settings
- purge.logger_channels
- purge.plugins
- purge_queuer_coretags.settings
- key.key.hs_shield_key
- shield.settings
graylist:
- field_ui.settings
- system.performance
Expand Down
3 changes: 0 additions & 3 deletions config/default/config_split.config_split.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ folder: ../config/envs/prod
module:
acquia_connector: 0
acquia_purge: 0
config_readonly: 0
google_analytics: 0
hs_config_readonly: 0
purge: 0
purge_drush: 0
purge_processor_cron: 0
Expand Down
4 changes: 0 additions & 4 deletions config/default/config_split.config_split.stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,19 @@ module:
acquia_connector: 0
acquia_purge: 0
dblog: 0
nobots: 0
purge: 0
purge_drush: 0
purge_processor_cron: 0
purge_processor_lateruntime: 0
purge_queuer_coretags: 0
purge_ui: 0
shield: 0
stage_file_proxy: 0
theme: { }
blacklist:
- acquia_connector.settings
- purge.logger_channels
- purge.plugins
- purge_queuer_coretags.settings
- key.key.hs_shield_key
- shield.settings
graylist:
- field_ui.settings
- system.performance
Expand Down
4 changes: 4 additions & 0 deletions config/default/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module:
config_update: 0
config_update_ui: 0
confirm_leave: 0
config_readonly: 0
content_access: 0
contextual: 0
core_event_dispatcher: 0
Expand Down Expand Up @@ -82,6 +83,7 @@ module:
focal_point: 0
fontawesome: 0
gin_toolbar: 0
google_analytics: 0
hal: 0
help: 0
honeypot: 0
Expand All @@ -92,6 +94,7 @@ module:
hs_blocks: 0
hs_capx: 0
hs_config_prefix: 0
hs_config_readonly: 0
hs_courses: 0
hs_courses_importer: 0
hs_entities: 0
Expand Down Expand Up @@ -209,6 +212,7 @@ module:
search_api: 0
search_api_db: 0
serialization: 0
shield: 0
shortcut: 0
shortcut_menu: 0
slick: 0
Expand Down
11 changes: 11 additions & 0 deletions config/default/shield.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
allow_cli: false
print: ''
credential_provider: multikey
credentials:
multikey:
user_pass_key: hs_shield_key
shield_enable: false
whitelist: ''
paths: "/.well-known\r\n/.well-known/*"
domains: ''
method: 0
2 changes: 1 addition & 1 deletion config/envs/stage/field_ui.settings.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
field_prefix: field_
field_prefix: custm_
_core:
default_config_hash: Q1nMi90W6YQxKzZAgJQw7Ag9U4JrsEUwkomF0lhvbIM
18 changes: 0 additions & 18 deletions config/envs/stage/key.key.hs_shield_key.yml

This file was deleted.

5 changes: 0 additions & 5 deletions config/envs/stage/stage_file_proxy.settings.yml

This file was deleted.

8 changes: 4 additions & 4 deletions docroot/sites/settings/acquia.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
$settings['file_temp_path'] = '/mnt/gfs/' . EnvironmentDetector::getAhGroup() . '.' . EnvironmentDetector::getAhEnv() . '/tmp';
$settings['letsencrypt_challenge_directory'] = $settings['file_temp_path'];

if (!EnvironmentDetector::isProdEnv()) {
// Disables domain redirect on all environments except production.
$config['domain_301_redirect.settings']['enabled'] = FALSE;
}
// Disables domain redirect on all environments except production.
$config['domain_301_redirect.settings']['enabled'] = EnvironmentDetector::isProdEnv();

// Enable shield on non prod.
$config['shield.settings']['shield_enable'] = !EnvironmentDetector::isProdEnv();
3 changes: 2 additions & 1 deletion docroot/sites/settings/global.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@
}

// Don't lock config when using drush.
if (PHP_SAPI !== 'cli') {
if (PHP_SAPI !== 'cli' && EnvironmentDetector::isProdEnv()) {
$settings['config_readonly'] = TRUE;
}

// Enable nobots on any non-prod site.
if (!EnvironmentDetector::isProdEnv()) {
$settings['nobots'] = TRUE;
$config['google_analytics.settings']['account'] = '';
}

if (EnvironmentDetector::isAhEnv()) {
Expand Down