graphite-project/graphite-web — pull request #366 by kovyrin (2013-07-09 22:49:48+00:00)
Title: Make sure functions modifying time series update their pathExpression

Hey guys,

Some time ago I've described an issue we're having on our deployment of 0.9.x branch here: https://answers.launchpad.net/graphite/+question/228284. I didn't receive any response and today I've finally got a chance to look at the problem and I believe I've found the issue in graphite-web code.

Here is the problem: some of graphite functions are implemented in a way that they do not create new time series, but simply modify the ones they were given (for example, scaleToSeconds, scale, etc). The in my case is caused by the fact that those functions do not update time series pathExpression, which, when combined with functions based on evaluateTarget calls (like movingAverage, etc) gives really unexpected results.

So, in this small commit I've updated the code of all functions that touch timeseries data to update evaluateTarget along with the name.

If you want, I could add some tests for those changes, the only problem is that there is no clear instructions anywhere on how to run your test suite and not being a hardcore python developer I wasn't able to figure out how to do that.