Skip to content

Commit

Permalink
Merge pull request #5999 from Automattic/staging
Browse files Browse the repository at this point in the history
undefined
  • Loading branch information
rebeccahum authored Nov 19, 2024
2 parents 4655f8a + 49f957f commit 07a620b
Show file tree
Hide file tree
Showing 45 changed files with 1,174 additions and 1,185 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/changelog-summary-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
egress-policy: audit

- name: Check out source code
uses: actions/[email protected].1
uses: actions/[email protected].2

- name: Retrieve tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
Expand All @@ -50,7 +50,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: softprops/[email protected].8
- uses: softprops/[email protected].9
with:
generate_release_notes: true
tag_name: ${{ steps.id-generator.outputs.id }}
Expand All @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected].1
uses: actions/[email protected].2

- name: Setup PHP
uses: shivammathur/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog-summary-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected].1
uses: actions/[email protected].2

- name: Setup PHP
uses: shivammathur/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
matrix:
config:
# PHP 8.1, Jetpack
- { wp: 6.0.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.0.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.1.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.1.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.2.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
Expand All @@ -40,6 +38,8 @@ jobs:
- { wp: 6.4.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.5.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.5.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.6.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.6.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: latest, ms: 'no', jp: 'yes', php: '8.1', phpunit: '', coverage: 'yes' }
- { wp: latest, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '', coverage: 'yes' }
- { wp: nightly, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
Expand All @@ -66,7 +66,7 @@ jobs:
MYSQL_DATABASE: wordpress_test
steps:
- name: Check out source code
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
submodules: recursive

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
- javascript
steps:
- name: Checkout repository
uses: actions/[email protected].1
uses: actions/[email protected].2

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.26.12
uses: github/codeql-action/analyze@v3.27.0
4 changes: 2 additions & 2 deletions .github/workflows/core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ jobs:
echo "PHP_FPM_GID=$(id -g)" >> "${GITHUB_ENV}"
- name: Checkout WordPress
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
repository: wordpress/wordpress-develop
path: wordpress
ref: ${{ steps.version.outputs.latest }}

- name: Check out source code
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
submodules: recursive
path: wordpress/src/wp-content/mu-plugins
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
MYSQL_DATABASE: wordpress_test
steps:
- name: Check out source code
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
submodules: recursive

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 @@ -22,7 +22,7 @@ jobs:
github.com:443
- name: Check out the source code
uses: actions/[email protected].1
uses: actions/[email protected].2

- name: Review dependencies
uses: actions/[email protected]
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ jobs:
contents: write
steps:
- name: Check out the source code
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
submodules: recursive
path: ${{ env.SOURCE_REPO_PATH }}

- name: Check out Automattic/vip-go-mu-plugins-ext
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
repository: Automattic/vip-go-mu-plugins-ext
path: ${{ env.EXT_REPO_PATH }}

- name: Check out Automattic/vip-go-mu-plugins-built
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
repository: Automattic/vip-go-mu-plugins-built
path: ${{ env.TARGET_REPO_PATH }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
wordpress.org:443

- name: Check out repository code
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
submodules: true

Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
egress-policy: audit

- name: Check out repository code
uses: actions/[email protected].1
uses: actions/[email protected].2

- name: Setup Node
uses: actions/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/[email protected].1
uses: actions/[email protected].2

- name: Set up PHP
uses: shivammathur/[email protected]
Expand All @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/[email protected].1
uses: actions/[email protected].2

- name: Setup Node
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/parsely.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
MYSQL_DATABASE: wordpress_test
steps:
- name: Check out source code
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
submodules: recursive

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 @@ -22,7 +22,7 @@ jobs:
contents: write
steps:
- name: Check out source code
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
token: ${{ secrets.WPCOM_VIP_BOT_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/search-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
submodules: recursive

Expand Down
44 changes: 20 additions & 24 deletions __tests__/e2e/package-lock.json

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

7 changes: 7 additions & 0 deletions files/class-api-client.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ public function get_file( $file_path ) {
'filename' => $tmp_file,
];

// Prevent webp => jpg transform from running
if ( str_ends_with( strtok( $file_path, '?' ), '.webp' ) ) {
$request_args['headers'] = [
'Accept' => 'image/webp',
];
}

// not in cache so get from API
$response = $this->call_api( $file_path, 'GET', $request_args );

Expand Down
25 changes: 1 addition & 24 deletions integrations/enterprise-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,6 @@ public function is_loaded(): bool {
return class_exists( \Automattic\VIP\Search\Search::class );
}

/**
* Activates this integration with given options array.
*
* @param array $options An associative options array for the integration.
* This can contain common parameters and integration specific parameters in `config` key.
*
* @private
*/
public function activate( array $options = [] ): void {
// If integration is already available in customer code then don't activate it from platform side.
if ( $this->is_loaded() ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIf
// Do nothing.
}

// Don't do anything if integration is already activated.
if ( $this->is_active() ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIf
// Do nothing.
}

$this->is_active = true;
$this->options = $options;
}

/**
* Loads the plugin.
*/
Expand Down Expand Up @@ -84,7 +61,7 @@ public function configure(): void {
* Set the Elasticsearch credentials.
*/
public function vip_set_es_credentials(): void {
$config = $this->get_config();
$config = $this->get_env_config();
if ( isset( $config['username'] ) && isset( $config['password'] ) ) {
define( 'VIP_ELASTICSEARCH_USERNAME', $config['username'] );
define( 'VIP_ELASTICSEARCH_PASSWORD', $config['password'] );
Expand Down
Loading

0 comments on commit 07a620b

Please sign in to comment.