Skip to content

Commit

Permalink
Merge pull request #5764 from Automattic/develop
Browse files Browse the repository at this point in the history
Staging release v20240730.1
  • Loading branch information
rebeccahum authored Jul 30, 2024
2 parents c5f417b + a25624f commit 2222e04
Show file tree
Hide file tree
Showing 18 changed files with 94 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog-summary-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: softprops/[email protected].6
- uses: softprops/[email protected].8
with:
generate_release_notes: true
tag_name: ${{ steps.id-generator.outputs.id }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
- { wp: 6.3.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.4.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { 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: 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 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/[email protected]

- name: Initialize CodeQL
uses: github/codeql-action/[email protected].12
uses: github/codeql-action/[email protected].15
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/[email protected].12
uses: github/codeql-action/[email protected].15
3 changes: 3 additions & 0 deletions .github/workflows/search-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
${{ github.workspace }}/cypress/results/
${{ github.workspace }}/tests/search/e2e/screenshots/
${{ github.workspace }}/tests/search/e2e/videos/
${{ github.workspace }}/tests/search/e2e/logs/
- name: Stop Elasticsearch
if: always()
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/lib/pages/wp-editor-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class EditorPage {
await this.page.click( selectors.blockAppender );
} else {
await this.page.click( selectors.editorTitleContainer );
await this.page.click( selectors.blockInserter );
await this.page.getByLabel( 'Toggle block inserter' ).click();
}
await this.page.click( selectors.imageBlocks );

Expand Down
38 changes: 19 additions & 19 deletions __tests__/e2e/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 __tests__/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@automattic/eslint-plugin-wpvip": "^0.13.0",
"@babel/plugin-syntax-decorators": "^7.22.10",
"@playwright/test": "^1.39.0",
"@types/node": "^20.11.0",
"@types/node": "^22.0.0",
"asana-phrase": "^0.0.8",
"eslint": "^8.51.0",
"eslint-plugin-deprecation": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"erusev/parsedown": "1.7.4",
"dms/phpunit-arraysubset-asserts": "0.5.0",
"yoast/phpunit-polyfills": "2.0.1",
"johnpbloch/wordpress-core": "6.5.5",
"wp-phpunit/wp-phpunit": "6.5.5",
"johnpbloch/wordpress-core": "6.6.1",
"wp-phpunit/wp-phpunit": "6.6.1",
"wp-cli/wp-cli": "2.10.0"
},
"config": {
Expand Down
26 changes: 13 additions & 13 deletions composer.lock

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

10 changes: 5 additions & 5 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 @@ -30,7 +30,7 @@
"cypress-file-upload": "^5.0.8",
"cypress-multi-reporters": "^1.6.1",
"eslint-plugin-cypress": "^3.0.3",
"husky": "9.0.11",
"husky": "9.1.3",
"jsdoc": "^4.0.0",
"lint-staged": "^15.0.1",
"mocha-junit-reporter": "^2.1.1",
Expand Down
29 changes: 29 additions & 0 deletions prometheus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Prometheus Metrics

MU-Plugins supports collecting and shipping internal metrics to Prometheus.

This system is intended for use by WPVIP to monitor the operation of sites and is not suitable for customer use.

## Stats Endpoint

Prometheus metrics are exposed at `/.vip-prom-metrics`.

## Collectors

Stat collection is implemented as Collectors (see the `prometheus-collectors` directory). Each Collector implements `CollectorInterface` and is responsible for collecting the relevant metrics.

For real-time metrics, like recording specific actions, implement a method in the Collector that is called directly or via WP-hook.

For "aggregated" metrics collected on an interval (like post counts), implement `collect_metrics()`, which will be run on cron.

### Registering Collectors

Collectors must be registered via the `vip_prometheus_collectors` hook:

```
add_filter( 'vip_prometheus_collectors', function ( $collectors ) {
$collectors['my_collector_name'] = new Collector();
return $collectors;
} );
```
2 changes: 1 addition & 1 deletion search/search-dev-tools/build/bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions search/search-dev-tools/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 search/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
require_once __DIR__ . '/includes/functions/utils.php';
require_once __DIR__ . '/includes/classes/class-search.php';

if ( \Automattic\VIP\Search\Search::are_es_constants_defined() ) {
if ( \Automattic\VIP\Search\Search::are_es_constants_defined() && ! wp_installing() ) {
$search_plugin = \Automattic\VIP\Search\Search::instance();

require_once __DIR__ . '/search-dev-tools/search-dev-tools.php';
Expand Down
6 changes: 3 additions & 3 deletions tests/search/e2e/integration/features/related-posts.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ describe('Related Posts Feature', () => {
* On the last post insert a Related Posts block.
*/
cy.openBlockInserter();
cy.getBlocksList().should('contain.text', 'Related Posts (ElasticPress)');
cy.insertBlock('Related Posts (ElasticPress)');
cy.getBlocksList().should('contain.text', 'Related Posts');
cy.insertBlock('Related Posts');

/**
* Verify that the block is inserted into the editor, and contains the
Expand All @@ -71,7 +71,7 @@ describe('Related Posts Feature', () => {
/**
* Set the block to display 2 related posts.
*/
cy.get('@block').click();
cy.get('@block').click('topRight');
cy.openBlockSettingsSidebar();
cy.get('input[type="number"][aria-label="Number of items"]').clearThenType('2');

Expand Down
8 changes: 6 additions & 2 deletions tests/search/e2e/support/commands/block-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ Cypress.Commands.add('openBlockSettingsSidebar', () => {
cy.get('.edit-widgets-header__actions button[aria-label="Settings"]').click();
cy.get('.edit-widgets-sidebar__panel-tab').contains('Block').click();
} else {
cy.get('.edit-post-header__settings button[aria-label="Settings"]').click();
cy.get('.edit-post-sidebar__panel-tabs').contains('Block').click();
cy.get('.editor-header__settings button[aria-label="Settings"]').then(($btn) => {
if (!$btn.hasClass('is-pressed')) {
$btn.click();
}
cy.get('.editor-sidebar__panel-tabs').contains('Block').click();
});
}
});
});
Expand Down

0 comments on commit 2222e04

Please sign in to comment.