Skip to content

Commit 518ca1a

Browse files
Merge pull request #2059 from Automattic/update/enable-auto-index-setting-updating
Search: Enable auto index setting updating on all sites
2 parents 135e03e + 9b22ca4 commit 518ca1a

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

lib/feature/class-feature.php

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class Feature {
1919
public static $feature_percentages = array(
2020
// https://github.com/Automattic/vip-go-mu-plugins/tree/master/vip-jetpack/connection-pilot
2121
'jetpack-cxn-pilot' => 0.25,
22-
'search_indexable_settings_auto_heal' => 0.5,
2322
'remove-gutenberg-ramp' => 0.25,
2423
'search_content_validation_and_auto_heal_cron_job' => 0.25,
2524
);

search/includes/classes/class-healthjob.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,7 @@ public function check_all_indexables_settings_health() {
189189

190190
$this->process_indexables_settings_health_results( $unhealthy_indexables );
191191

192-
if ( \Automattic\VIP\Feature::is_enabled( 'search_indexable_settings_auto_heal' ) ) {
193-
$this->heal_index_settings( $unhealthy_indexables );
194-
}
192+
$this->heal_index_settings( $unhealthy_indexables );
195193
}
196194

197195
public function process_indexables_settings_health_results( $results ) {
@@ -228,9 +226,7 @@ public function process_indexables_settings_health_results( $results ) {
228226
var_export( $result['diff'], true )
229227
);
230228

231-
// Temporarily disable the alerting while we roll out the index settings changes (b/c indexes will be inconsistent during)
232-
// Be sure to re-enable the test for this - test__vip_search_healthjob_process_indexables_settings_health_results
233-
// $this->send_alert( '#vip-go-es-alerts', $message, 2, "{$indexable_slug}" );
229+
$this->send_alert( '#vip-go-es-alerts', $message, 2, "{$indexable_slug}" );
234230
}
235231
}
236232
}

tests/search/includes/classes/test-class-healthjob.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function test__vip_search_healthjob_check_health_with_inactive_features()
5858
// Mock the health job
5959
$job = $this->getMockBuilder( \Automattic\VIP\Search\HealthJob::class )
6060
->setConstructorArgs( [ $es ] )
61-
->setMethods( array( 'process_document_count_health_results' ) )
61+
->setMethods( array( 'process_document_count_health_results', 'send_alert' ) )
6262
->getMock();
6363

6464
// Only expect it to process 1 set of results (for regular posts)

0 commit comments

Comments
 (0)