Make WordPress Core

Opened 5 months ago

Closed 4 months ago

Last modified 4 months ago

#58825 closed task (blessed) (fixed)

Run automated performance workflows using production environment vars

Reported by: joemcgill's profile joemcgill Owned by: joemcgill's profile joemcgill
Milestone: 6.4 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: performance Cc:

Description

The automated performance tests that run as part of this workflow use the Docker environment bundled in the Core repo to set up an environment for testing. However, this environment gets configured using the included .env configuration file, which is meant for setting up an environment for WordPress core development, not production, including setting environment variables like WP_DEBUG and SCRIPT_DEBUG to true, and WP_DEVELOPMENT_MODE to core, all of which can cause side effects that skew performance results.

To get a better picture of how changes are effecting WP performance in standard production configurations, the Docker environment should be configured with the following environment variables (at minimum):

  • WP_DEBUG === false
  • SCRIPT_DEBUG === false
  • WP_DEVELOPMENT_MODE === ''

Attachments (1)

58825.diff (4.0 KB) - added by rajinsharwar 5 months ago.

Download all attachments as: .zip

Change History (11)

This ticket was mentioned in PR #4879 on WordPress/wordpress-develop by @rajinsharwar.


5 months ago
#1

  • Keywords has-patch added; needs-patch removed

Update performance.yml for running automated performance workflows using production environment vars.

Trac ticket: https://core.trac.wordpress.org/ticket/58825

#2 follow-up: @desrosj
5 months ago

  • Keywords needs-refresh added

I added some feedback on the PR. While this can be committed during RC, I'm leaning towards just punting and backporting when it's landed. Going to leave for a few more days.

@rajinsharwar commented on PR #4879:


5 months ago
#3

Hi @desrosj, I tried to implement your suggestion. Let me know if I missed something.

@rajinsharwar
5 months ago

#4 in reply to: ↑ 2 @joemcgill
5 months ago

  • Milestone changed from 6.3 to 6.4

Replying to desrosj:

While this can be committed during RC, I'm leaning towards just punting and backporting when it's landed. Going to leave for a few more days.

Let's go ahead and make a clean change as part of the 6.4 release branch. Not sure there is much value in backporting at this point.

@rajinsharwar commented on PR #4879:


5 months ago
#5

Hi @joemcgill, I tried to implement your suggestion. Can you take a look now?

#6 @joemcgill
5 months ago

  • Keywords needs-refresh removed
  • Owner set to joemcgill
  • Status changed from new to assigned

@desrosj the updates to the PR look good to me now, but would appreciate your thoughts about this, and whether we should consider applying this to the 6.3 branch as well.

#7 @mukesh27
5 months ago

@joemcgill Per Benchmarking PHP performance with Server-Timing document.

(Optional, but recommended) Disable any debugging features of WordPress, e.g. set constants like WP_DEBUG, SCRIPT_DEBUG, SAVEQUERIES, to false.

Could we add SAVEQUERIES to false also?

#8 @rajinsharwar
4 months ago

Hi @desrosj @joemcgill, added the SAVEQUERIES as per the suggestion of @mukesh27.

#9 @joemcgill
4 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 56313:

Build/Test Tools: Run performance tests using production env vars.

This sets the following environment variables when running automated performance tests to avoid side effects that can skew performance data when the default development environment variables are used:

  • SAVEQUERIES: false
  • SCRIPT_DEBUG: false
  • WP_DEBUG: false
  • WP_DEVELOPMENT_MODE: ''

Props rajinsharwar, desrosj, mukesh27, joemcgill.
Fixes #58825.

joemcgill commented on PR #4879:


4 months ago
#10

Merged in https://core.trac.wordpress.org/changeset/56313. Thanks again @Rajinsharwar!

Note: See TracTickets for help on using tickets.