Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The SPI data update process is opaque and unclear where to find the issue when debugging so NSPI should respond to SPI updates with contextual messages.
For some variables, Insight should allow the user to automatically make the recommended change.
Connector should verify the server response HMAC, report on NSPI messages, and if set_variables element is set then set the variables there that are in the local, approved list and that are not ignored.
Comment | File | Size | Author |
---|---|---|---|
#10 | 2081981-spi-set-vars-allowed-10.patch | 1.7 KB | coltrane |
#10 | 2081981-spi-set-vars-d6-10-do-not-test.patch | 9.94 KB | coltrane |
#9 | 2081981-spi-set-vars-allowed.patch | 1.02 KB | coltrane |
#6 | 2081981-spi-set-vars-d6-do-not-test.patch | 9.74 KB | coltrane |
#5 | 2081981-spi-set-variables.patch | 26.19 KB | coltrane |
Comments
Comment #1
coltranePatch bumps SPI data version so NSPI will set response HMAC.
NSPI messages are printed on the status page when manually sending SPI data as shown in this screenshot. Additionally a watchdog message is made.
http://monosnap.com/image/R2fwEKOWRCMbw1bJwLgOkXwl5
The default list of variables that can be automatically set from Insight is
array('acquia_spi_set_variables_automatic', 'error_level', 'preprocess_js', 'page_cache_maximum_age', 'block_cache', 'preprocess_css', 'page_compression', 'cache', 'cache_lifetime')
. The default list needs to be expanded before this is committed.This list is in variable acquia_spi_set_variables_automatic and while the variable itself is in the list it's also explicitly added to the 'ignored' list unless the user has allowed the list to be overridden. Screenshot of override option https://monosnap.com/image/sJD7BmJO5rOY5AdS62dCa1Q9p
And text:
Comment #2
coltraneUpdate patch includes insight send method and makes minor changes to _acquia_send_spi() menu callback.
Comment #3
coltraneMinor update adds logging on variable sets.
Comment #4
gcassie CreditAttribution: gcassie commentedSentence should end with a period to match (most of) the other options on the page.
Translated strings shouldn't start with a space, and the break tag should be outside the t().
Actually maybe just make a $messages array and then implode it in the dsm call.
End with a period.
We should do a variable_get after the variable_set to see if the value actually changed. If it didn't that's a sign it's being set in $conf or strongarm or such and we can set a notification that the subscriber is going to have to make the change themselves.
Comment #5
coltraneUpdated patch for everything but the last point.
"We should do a variable_get after the variable_set to see if the value actually changed. " is a great idea, but I'll have to check on a new page refresh. Let me investigate how that could be done.
Comment #6
coltraneLightly tested D6 version.
Comment #7
gcassie CreditAttribution: gcassie commentedWhy do you have to test that the variable changed on a page refresh? If you do a variable_set() the new value is immediately available in a variable_get(). So something like:
And then report back on $failures.
Otherwise looks good.
Comment #8
coltraneCommitted slightly modified #5 http://drupalcode.org/project/acquia_connector.git/commit/e4613e4 for 2.x-dev testing. Will make followup patch for D7 for any changes.
Comment #9
coltraneUpdate to allowed D7 variables.
per https://drupal.org/node/2081981#comment-7867181. While immediately checking variable_get() will show it fixed, it will be reset by the next time settings.php is loaded or Strongarm does its thang. I think I'm going to hold off right now on a solution for now and come back to this in followup. Insight itself could attempt to handle this use case.
Comment #10
coltraneUpdated D6 full patch and minor updates to D7
Comment #11
coltraneComitted. 6.x http://drupalcode.org/project/acquia_connector.git/commit/8e5de3a and 7.x followup http://drupalcode.org/project/acquia_connector.git/commit/b67e97b