Whilst working on #1464554: Upgrade path for image style configuration I discovered that I created a patch with a critical defect #1669902: Adjust system.performance configuration for new guidelines due to the following code:

function system_update_8017() {
  update_variables_to_config('system.site', array(
    'cache' => 'cache.page.enabled', 
    'page_cache_maximum_age' => 'cache.page.max_age', 
    'page_compression' => 'response.gzip', 
    'preprocess_css' => 'preprocess.css', 
    'preprocess_js' => 'preprocess.js',
  ));
}

We should be updating these variables to the system.performance config object!!!!

This patch fixes this and includes upgrade path tests for all the system module variables migrated to CMI so far. The patch extends on the excellent work done by @sun in #1464554: Upgrade path for image style configuration.

Files: 
CommentFileSizeAuthor
#2 system-config-upgrade-path-1-just-test.patch5.74 KBandypost
FAILED: [[SimpleTest]]: [MySQL] 41,430 pass(es), 7 fail(s), and 0 exception(s). View
#1 system-config-upgrade-path-1-just-test.patch0 bytesandypost
PASSED: [[SimpleTest]]: [MySQL] 41,393 pass(es). View
system-config-upgrade-path.patch6.29 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 41,368 pass(es). View

Comments

andypost’s picture

FileSize
0 bytes
PASSED: [[SimpleTest]]: [MySQL] 41,393 pass(es). View

Let's make sure that test detects a problem

andypost’s picture

FileSize
5.74 KB
FAILED: [[SimpleTest]]: [MySQL] 41,430 pass(es), 7 fail(s), and 0 exception(s). View

And again

Status: Needs review » Needs work

The last submitted patch, system-config-upgrade-path-1-just-test.patch, failed testing.

andypost’s picture

Status: Needs work » Reviewed & tested by the community

Awesome patch and it looks like now we have a universal upgrade tests for variables!

+++ b/core/modules/system/system.installundefined
@@ -1920,7 +1920,7 @@ function system_update_8016() {
-  update_variables_to_config('system.site', array(
+  update_variables_to_config('system.performance', array(

Actual fix and a bunch of tests that could be extended.

andypost’s picture

I've RTBCed a patch #0, skip my patches and no commit credit - my patches just to make sure that fix is right

heyrocker’s picture

Hey nice catch!

chx’s picture

Title: Upgrade path for all system module variables converted to CMI » Upgrade path tests for all system module variables converted to CMI so far
chx’s picture

Oh and thanks , #0 is indeed an amazing job.

alexpott’s picture

Sun deserves a big commit credit on this...

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Wow, great catch. Thanks so much, and also yay critical bug down!

Committed and pushed to 8.x. Credited sun and alexpott, per andypost's request.

Automatically closed -- issue fixed for 2 weeks with no activity.