Attached is a draft patch to update New Relic RPM to Drupal 7. This was primed using the Coder Upgrade module after applying the patches referenced in the following issues:
* #1398104-2: warning: Invalid argument supplied for foreach() in new_relic_rpm.reports.inc on line 92 and 126
* #1487792-1: Follow best practice for t() placeholders
* #1487866: Cleanup of report overview table code
* #1487962: Cleanup of application Quick Links code
* #1488080: Follow best practice for updating SQL in hook_update_N
The most notable change after priming was the replacement of the form alter on the module page submit button with D7's hook_modules_enable() and hook_modules_disable(). Also included is a tweak to the curl code: CURLOPT_SSL_VERIFYPEER = FALSE (my Mac environment gets access denied on the API calls without it).
I have tested the reporting feature, but that is all so far; posting the draft patch as a starting point.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | newrelic-7.x-all-changes.patch | 23.33 KB | berdir |
| #11 | newrelic-7.x-port-only.patch | 18.86 KB | berdir |
| #1 | new_relic_rpm-d7-update-draft-from-dff71f1.patch | 23.7 KB | jonathan webb |
| new_relic_rpm-d7-update-draft.patch | 19.22 KB | jonathan webb |
Comments
Comment #1
jonathan webb commentedThe attached patch includes a full diff from current master (commit dff71f1) to the D7 port draft.
Comment #2
jonathan webb commentedJust a note that curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); should be removed from the patch-- After further investigation I believe this is an issue limited to the libcurl implementation on the current version of Acquia Dev Desktop Control Panel for Mac OS.
Comment #3
lsolesen commented@Johathan Webb Great work. Maybe you should offer to co-maintain the project, so your work can get committed?
Comment #4
bserem commentedThe final result of this patch produces a lot of errors in Drush.
It might be totally irelevant to the patch, but I do not have a D6 site on the server that has new-relic to test it on D6 too.
drush st (emphasis mine)
Comment #5
berdirThis can be dropped, not necessary to carry over 6.x update functions. instead, add a hook_update_last_removed() implementation.
Path should be admin/config/$something/new-relic-rpm, $something could be services, system or development, not sure.
Those pointless descriptions should be removed.
Not sure if this should go through t().
Comment #6
berdirThis change is wrong and causes the reported errors.
Comment #7
bserem commented#6 works with drush
any updates on 7.x branch? Has anybody talked to the maintainers?
Comment #8
patcon commentedJust starting to kick the tires on integrating Newrelic into our processes, but this module looks REALLY awesome. Happy to help when the time comes.
@neclumdul and @soyarma are still active on d.o (even in the last few hours), but no commits in the last year. I'll tweet them about maintainership and maybe we can figure out what's up :)
https://twitter.com/patconnolly/status/282187532618305536
Comment #9
neclimdulI won't be able to review or commit this before the new year but it would help if the updates not related to the 7.x port could be put in other issues to ease review and application to 6.x. Especially because I don't currently maintain any 7.x sites so it will be easier for me to review the changes in 6.
Comment #10
berdirThey all already have 6.x issues, see the issue summary.
I've applied them to a local repository separately, including the actual port and made some small changes to address the things I pointed out above.
Attached is an updated patch for everything and one that contains just the port without the other changes (although also some coding style changes).
Also pushed my local repository to https://github.com/Berdir/new_relic_rpm, so if you want, feel free to pull/merge from there.
Edit: Note that I haven't actually tested this yet, I've just prepared it for testing :)
Comment #11
berdirUh, with patches now.
Comment #12
patcon commented@Berdir amazing. Let you know when I can test. You're awesome
@neclimdul thanks for dropping in an update! makes perfect sense
Comment #13
luksakWhy not create a 7.x branch on d.o. for easier issue reporting?
Comment #14
pieterdc+1 for a 7.x branch
Comment #15
patcon commented+1
Comment #16
Rosamunda commentedHi, I´m just learning about NewRelic.
Is the module here ready to install and test?
Thanks! :)
Comment #17
berdirPushed my branch to d.o, will create a release soon.
Comment #18
patcon commented@Berdir don't forget the info file :)
https://github.com/Berdir/new_relic_rpm/blob/7.x-1.x/new_relic_rpm.info
Comment #19
berdirAh, didn't notice that, yes, that version line should be removed. Note that releases will force the version anyway, so it doesn't really matter what's written there.
I suggest you create an issue with a patch to remove it, easy way to get commit credits ;)
Comment #20.0
(not verified) commentedIncluding references to D6 patches included in this update