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

Integrations: Implement network_wide_enable to disallow inheriting env status automatically #6096

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

rebeccahum
Copy link
Contributor

@rebeccahum rebeccahum commented Jan 13, 2025

Description

If network_wide_enable is set to false, do not fall back on the existing env status (which would be enabled).

Pre-review checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally or in Codespaces (or has an appropriate fallback).
  • This change works and has been tested on a sandbox.
  • This change has relevant unit tests (if applicable).
  • This change uses a rollout method to ease with deployment (if applicable - especially for large scale actions that require writes).
  • This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Pre-deploy checklist

  • VIP staff: Ensure any alerts added/updated conform to internal standards (see internal documentation).

Steps to Test

  1. Create multisite in dev-env with added subsites 2 and 3
  2. docker exec -it <container name> /bin/sh
  3. in /wp/config/integrations-config/enterprise-search-config.php put this in:
<?php

return array(
	'env' => array(
		'status' => 'enabled',
		'config' => array(
			'username' => 'test-username',
			'password' => 'test-password',
			'network_wide_enable' => 'false',
		),
	),
	'network_sites' => array(
		'1' => array(
			'status' => 'enabled',
			'config' => array(
				'offload_search' => 'true',
			)
		),
		'2' => array(
			'status' => 'disabled',
			'config' => array(
				'offload_search' => 'false',
			)
		),
	)
);
  1. before the PR, going to subsite 3 would automatically enable it with the inheriting. after the PR, it should no longer enable ES.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@rebeccahum rebeccahum marked this pull request as ready for review January 13, 2025 19:51
@rebeccahum rebeccahum requested a review from a team as a code owner January 13, 2025 19:51
@rebeccahum rebeccahum merged commit fc27467 into develop Jan 14, 2025
21 of 34 checks passed
@rebeccahum rebeccahum deleted the integrations/network_wide_enable_implement branch January 14, 2025 19:22
sjinks added a commit that referenced this pull request Jan 14, 2025
* Add VIP_SEARCH_ENABLED_BY (#6082)

* Add new constant VIP_SEARCH_ENABLED_BY

* Add to SDS for tracking

* Move up

* lint

* Update Jetpack submodule to 14.2 (#6083)

* Jetpack: Update to 14.2 (#6084)

* Jetpack: Update to 14.2

* lint

* Update Jetpack submodule to 14.2.1 (#6085)

* Update Cron Control publish queries (#6097)

* Integrations: Implement network_wide_enable to disallow inheriting env status automatically (#6096)

---------

Co-authored-by: Rebecca Hum <[email protected]>
Co-authored-by: Rinat K <[email protected]>
Co-authored-by: Caleb Burks <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants