Skip to content

Commit

Permalink
Merge pull request #5738 from Automattic/staging
Browse files Browse the repository at this point in the history
Production release v20240723.0
  • Loading branch information
rebeccahum authored Jul 23, 2024
2 parents 4d6fd54 + fd8ebc9 commit e17b6e6
Show file tree
Hide file tree
Showing 19 changed files with 275 additions and 315 deletions.
2 changes: 1 addition & 1 deletion .github/actions/run-wp-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ runs:
fi
- name: Set up PHP
uses: shivammathur/setup-php@2.31.0
uses: shivammathur/setup-php@2.31.1
with:
coverage: ${{ steps.coverage.outputs.coverage }}
ini-values: ${{ steps.coverage.outputs.ini }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
uses: actions/checkout@v4.1.7

- name: Initialize CodeQL
uses: github/codeql-action/init@v3.25.11
uses: github/codeql-action/init@v3.25.12
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.25.11
uses: github/codeql-action/analyze@v3.25.12
2 changes: 1 addition & 1 deletion .github/workflows/core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
echo "GITHUB_EVENT_NAME=pull_request" >> "wordpress/.env"
- name: Set up Node.js
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.3
with:
node-version-file: 'wordpress/.nvmrc'
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
uses: actions/checkout@v4.1.7

- name: Review dependencies
uses: actions/dependency-review-action@v4.3.3
uses: actions/dependency-review-action@v4.3.4
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
uses: ./.github/actions/prepare-source

- name: Setup Node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.3
with:
node-version: 'lts/*'
cache: npm
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
uses: actions/checkout@v4.1.7

- name: Setup Node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.3
with:
node-version: 'lts/*'
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: 'true'

- name: Setup Node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.3
with:
node-version: 'lts/*'
cache: npm
Expand All @@ -54,7 +54,7 @@ jobs:
uses: actions/checkout@v4.1.7

- name: Setup Node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.3
with:
node-version: 'lts/*'
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/search-dev-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
token: ${{ secrets.WPCOM_VIP_BOT_TOKEN }}

- name: Setup Node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.3
with:
node-version: 'lts/*'
cache: npm
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/search-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Enterprise Search e2e tests
env:
NODE_VERSION: "16"
NODE_VERSION: "20"

on:
pull_request:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
uses: ./.github/actions/prepare-source

- name: "Install node v${{ env.NODE_VERSION }}"
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
Expand Down Expand Up @@ -72,4 +72,5 @@ jobs:
- name: Stop Elasticsearch
if: always()
run: cd bin/search/es-docker/ && docker-compose down
run: docker compose down
working-directory: bin/search/es-docker
38 changes: 4 additions & 34 deletions __tests__/e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions admin-notice/admin-notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,3 @@ function () use ( $admin_notice_controller ) {
do_action( 'vip_admin_notice_init', $admin_notice_controller );
}
);

// Old WP version w/o pinned Jetpack version
add_action(
'vip_admin_notice_init',
function ( $admin_notice_controller ) {
global $wp_version;
$message = "We've noticed that you are running WordPress {$wp_version}, which is an outdated version. This prevents you from running the latest version of Jetpack, as the current version of Jetpack only supports 5.9 and up. Please upgrade to the most recent WordPress version to use the latest features of Jetpack.";

$admin_notice_controller->add(
new Admin_Notice(
$message,
[
new Expression_Condition( version_compare( $wp_version, '5.9', '<' ) ),
new Expression_Condition( ! defined( 'VIP_JETPACK_PINNED_VERSION' ) ),
],
'old-wp-versions',
'error'
)
);
}
);
4 changes: 2 additions & 2 deletions bin/search/install-wp-cli.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#!/bin/sh

echo "Installing WP-CLI in $1"

./bin/search/wp-env-cli $1 curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
./bin/search/wp-env-cli $1 chmod +x wp-cli.phar
./bin/search/wp-env-cli $1 mv wp-cli.phar /usr/local/bin/wp
./bin/search/wp-env-cli $1 mv -f wp-cli.phar /usr/local/bin/wp
3 changes: 2 additions & 1 deletion bin/search/wp-env-cli
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { loadConfig } = require('@wordpress/env/lib/config');
*/
function spawnCommandDirectly({ container, command, dockerComposeConfigPath }) {
const composeCommand = [
'compose',
'-f',
dockerComposeConfigPath,
'exec -T',
Expand All @@ -16,7 +17,7 @@ function spawnCommandDirectly({ container, command, dockerComposeConfigPath }) {
];

return new Promise((resolve, reject) => {
const childProc = spawn('docker-compose', composeCommand, {
const childProc = spawn('docker', composeCommand, {
stdio: 'inherit',
shell: true,
});
Expand Down
42 changes: 23 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"author": "Automattic",
"devDependencies": {
"@babel/plugin-syntax-decorators": "^7.19.0",
"@wordpress/env": "^9.0.0",
"@wordpress/env": "^10.2.0",
"10up-toolkit": "^6.0.0",
"classnames": "^2.3.1",
"cypress": "^9.5.0",
Expand Down
40 changes: 40 additions & 0 deletions plugin-fixes.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,43 @@ function vip_disable_gform_cleanup_target_dir() {
}
}
add_action( 'plugins_loaded', 'vip_disable_gform_cleanup_target_dir' );


/**
* Disable Divi caching since VIP already supports page and object caching.
*
* Divi caching can cause bloated media directory, let's just turn it off.
*
* @see https://docs.wpvip.com/plugins/incompatibilities/#divi
*/
function vip_divi_setup() {
if ( ! defined( 'ET_CORE_VERSION' ) ) {
return; // Divi is not active
}

// Disable Divi's custom file cache layer and its asset and module caching features
if ( ! defined( 'ET_DISABLE_FILE_BASED_CACHE' ) ) {
define( 'ET_DISABLE_FILE_BASED_CACHE', true );
}
if ( ! defined( 'ET_BUILDER_CACHE_ASSETS' ) ) {
define( 'ET_BUILDER_CACHE_ASSETS', false );
}
if ( ! defined( 'ET_BUILDER_CACHE_MODULES' ) ) {
define( 'ET_BUILDER_CACHE_MODULES', false );
}

// Define the custom CACHE DIR for Divi theme on VIP
$get_wp_vip_upload_dir = wp_get_upload_dir();
if ( ! defined( 'ET_CORE_CACHE_DIR' ) ) {
define( 'ET_CORE_CACHE_DIR', $get_wp_vip_upload_dir['basedir'] . '/et-cache' );
}
if ( ! defined( 'ET_CORE_CACHE_DIR_URL' ) ) {
define( 'ET_CORE_CACHE_DIR_URL', $get_wp_vip_upload_dir['baseurl'] . '/et-cache' );
}

// Add filter to apply WP_Filesystem credentials
add_filter( 'et_cache_wpfs_credentials', function () {
return request_filesystem_credentials( site_url() );
});
}
add_action( 'after_setup_theme', 'vip_divi_setup' );
2 changes: 1 addition & 1 deletion search/search-dev-tools/build/bundle.js

Large diffs are not rendered by default.

Loading

0 comments on commit e17b6e6

Please sign in to comment.