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.
We need to be able to test parsing project stats with edgecast and that changes this regex, rather then hacking the module, putting this data in a $conf var, makes it easy to change on the fly. Due to how edgecast logs look, no one else, unless they use edgecast, would need what we would need to change this regex to.
$regex = variable_get('updates_regex','@\[([^\]]+)\] "?(?:GET|HEAD) ' . $updates_url . '([^/]+)/([^\?]+)\?([^ ]+) @');
That should work for sites don't define the var in settings.php. D.O will need to hardcode the value of updates_url
Comment | File | Size | Author |
---|---|---|---|
#9 | 2282043-13.patch | 1.04 KB | basic |
updates_var_regex.txt | 1.02 KB | mlhess |
Comments
Comment #1
mlhess CreditAttribution: mlhess commentedComment #2
dwwCan you please update the summary with a statement of a problem this change would solve? I don't have enough context to know what we're actually trying to change here and why.
Thanks!
-Derek
Comment #3
mlhess CreditAttribution: mlhess commentedUpdate summary per dww's request (at 30,000 feet, please excuse typos)
Comment #4
drummAnd we don't want a whole deployment any time the log format changes.
Comment #5
tvn CreditAttribution: tvn commentedComment #6
dwwCool, that makes sense. Thanks for the clarifications. The one thing I'm still not clear on is what's meant by this:
"D.O will need to hardcode the value of updates_url"
Otherwise, needs work since the variable name should be properly prefixed with "project_usage".
Comment #7
drummWe will hard-code
$conf['project_usage_updates_url']
in Drupal.org'ssettings.php
to handle the format EdgeCast gives us.Comment #8
drummI mean
$conf['project_usage_updates_regex']
, or whatever it gets named.Comment #9
basic CreditAttribution: basic commentedUpdated patch with corrected namespace
Comment #11
drummLooks good, committed. Will be deployed today.