brutasse / graphite-api

Graphite-web, without the interface. Just the rendering HTTP API.
https://graphite-api.readthedocs.io
Apache License 2.0
492 stars 131 forks source link

Sync graphite-api with upstream graphite-web 1.0.1 #218

Closed iain-buclaw-sociomantic closed 7 years ago

iain-buclaw-sociomantic commented 7 years ago

This merges new functions and API features from graphite-web 1.0.1.

One thing I haven't done was a bug-fix for preventing repeated series evaluations for hitcount and smartSummarize. However I'm not so sure that graphite-api suffers from the same problem.

iain-buclaw-sociomantic commented 7 years ago

As for the test failures - it seems like py26 is even slower, so much so that the time should be adjusted by 2 seconds, not 1. Not sure what's happening with pypy, it works for me locally (and we use pypy in production also).

brutasse commented 7 years ago

I wouldn't worry too much about the pypy / py26 builds, the Pypy one has been broken since ages (not sure how recent their pypy is), and py26 is only informative.

There's an issue with the lint job, though -- logger wasn't imported in readers.py

iain-buclaw-sociomantic commented 7 years ago

Ah, py26 was infact broken because of a floating point bug - couldn't accurately represent 0.4 or 0.6. I've added a commit to use the numbers 0.5, 1.0, and 1.5 instead.

iain-buclaw-sociomantic commented 7 years ago

And added off-by-one assert for race condition in https://github.com/brutasse/graphite-api/pull/218/commits/07334b1533e64cbacf12f6618cbd84f4dbd4b352#diff-eb09b9a6cd124bf1fe991db6431314eeR141

brutasse commented 7 years ago

Awesome, thanks a lot @iain-buclaw-sociomantic!

iain-buclaw-sociomantic commented 7 years ago

Thanks!