forked from mirrors/nixpkgs
python3.pkgs.graphite_api: remove
Due to lack of maintenance. It doesn't build, the last upstream commit was in 2017, and last significant change in Nixpkgs was in 2018.
This commit is contained in:
parent
9f2c91667d
commit
1f18d44106
|
@ -252,8 +252,10 @@
|
|||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>services.graphite.beacon</literal> NixOS option,
|
||||
and the <literal>python3.pkgs.graphite_beacon</literal> and
|
||||
The <literal>services.graphite.api</literal> and
|
||||
<literal>services.graphite.beacon</literal> NixOS options, and
|
||||
the <literal>python3.pkgs.graphite_api</literal>,
|
||||
<literal>python3.pkgs.graphite_beacon</literal> and
|
||||
<literal>python3.pkgs.influxgraph</literal> packages, have
|
||||
been removed due to lack of upstream maintenance.
|
||||
</para>
|
||||
|
|
|
@ -97,9 +97,10 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
|
||||
- riak package removed along with `services.riak` module, due to lack of maintainer to update the package.
|
||||
|
||||
- The `services.graphite.beacon` NixOS option, and the `python3.pkgs.graphite_beacon`
|
||||
and `python3.pkgs.influxgraph` packages, have been removed due to lack of
|
||||
upstream maintenance.
|
||||
- The `services.graphite.api` and `services.graphite.beacon` NixOS options, and
|
||||
the `python3.pkgs.graphite_api`, `python3.pkgs.graphite_beacon` and
|
||||
`python3.pkgs.influxgraph` packages, have been removed due to lack of upstream
|
||||
maintenance.
|
||||
|
||||
- (Neo)Vim can not be configured with `configure.pathogen` anymore to reduce maintainance burden.
|
||||
Use `configure.packages` instead.
|
||||
|
|
|
@ -24,16 +24,6 @@ let
|
|||
+ cfg.web.extraConfig
|
||||
);
|
||||
|
||||
graphiteApiConfig = pkgs.writeText "graphite-api.yaml" ''
|
||||
search_index: ${dataDir}/index
|
||||
${optionalString (config.time.timeZone != null) "time_zone: ${config.time.timeZone}"}
|
||||
${optionalString (cfg.api.finders != []) "finders:"}
|
||||
${concatMapStringsSep "\n" (f: " - " + f.moduleName) cfg.api.finders}
|
||||
${optionalString (cfg.api.functions != []) "functions:"}
|
||||
${concatMapStringsSep "\n" (f: " - " + f) cfg.api.functions}
|
||||
${cfg.api.extraConfig}
|
||||
'';
|
||||
|
||||
seyrenConfig = {
|
||||
SEYREN_URL = cfg.seyren.seyrenUrl;
|
||||
MONGO_URL = cfg.seyren.mongoUrl;
|
||||
|
@ -72,6 +62,7 @@ let
|
|||
in {
|
||||
|
||||
imports = [
|
||||
(mkRemovedOptionModule ["services" "graphite" "api"] "")
|
||||
(mkRemovedOptionModule ["services" "graphite" "beacon"] "")
|
||||
(mkRemovedOptionModule ["services" "graphite" "pager"] "")
|
||||
];
|
||||
|
@ -116,88 +107,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
api = {
|
||||
enable = mkOption {
|
||||
description = ''
|
||||
Whether to enable graphite api. Graphite api is lightweight alternative
|
||||
to graphite web, with api and without dashboard. It's advised to use
|
||||
grafana as alternative dashboard and influxdb as alternative to
|
||||
graphite carbon.
|
||||
|
||||
For more information visit
|
||||
<link xlink:href="https://graphite-api.readthedocs.org/en/latest/"/>
|
||||
'';
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
finders = mkOption {
|
||||
description = "List of finder plugins to load.";
|
||||
default = [];
|
||||
example = literalExpression "[ pkgs.python3Packages.influxgraph ]";
|
||||
type = types.listOf types.package;
|
||||
};
|
||||
|
||||
functions = mkOption {
|
||||
description = "List of functions to load.";
|
||||
default = [
|
||||
"graphite_api.functions.SeriesFunctions"
|
||||
"graphite_api.functions.PieFunctions"
|
||||
];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
listenAddress = mkOption {
|
||||
description = "Graphite web service listen address.";
|
||||
default = "127.0.0.1";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
description = "Graphite api service port.";
|
||||
default = 8080;
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
description = "Package to use for graphite api.";
|
||||
default = pkgs.python3Packages.graphite_api;
|
||||
defaultText = literalExpression "pkgs.python3Packages.graphite_api";
|
||||
type = types.package;
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
description = "Extra configuration for graphite api.";
|
||||
default = ''
|
||||
whisper:
|
||||
directories:
|
||||
- ${dataDir}/whisper
|
||||
'';
|
||||
defaultText = literalExpression ''
|
||||
'''
|
||||
whisper:
|
||||
directories:
|
||||
- ''${config.${opt.dataDir}}/whisper
|
||||
'''
|
||||
'';
|
||||
example = ''
|
||||
allowed_origins:
|
||||
- dashboard.example.com
|
||||
cheat_times: true
|
||||
influxdb:
|
||||
host: localhost
|
||||
port: 8086
|
||||
user: influxdb
|
||||
pass: influxdb
|
||||
db: metrics
|
||||
cache:
|
||||
CACHE_TYPE: 'filesystem'
|
||||
CACHE_DIR: '/tmp/graphite-api-cache'
|
||||
'';
|
||||
type = types.lines;
|
||||
};
|
||||
};
|
||||
|
||||
carbon = {
|
||||
config = mkOption {
|
||||
description = "Content of carbon configuration file.";
|
||||
|
@ -480,44 +389,6 @@ in {
|
|||
environment.systemPackages = [ pkgs.python3Packages.graphite-web ];
|
||||
}))
|
||||
|
||||
(mkIf cfg.api.enable {
|
||||
systemd.services.graphiteApi = {
|
||||
description = "Graphite Api Interface";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
environment = {
|
||||
PYTHONPATH = let
|
||||
aenv = pkgs.python3.buildEnv.override {
|
||||
extraLibs = [ cfg.api.package pkgs.cairo pkgs.python3Packages.cffi ] ++ cfg.api.finders;
|
||||
};
|
||||
in "${aenv}/${pkgs.python3.sitePackages}";
|
||||
GRAPHITE_API_CONFIG = graphiteApiConfig;
|
||||
LD_LIBRARY_PATH = "${pkgs.cairo.out}/lib";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.python3Packages.waitress}/bin/waitress-serve \
|
||||
--host=${cfg.api.listenAddress} --port=${toString cfg.api.port} \
|
||||
graphite_api.app:app
|
||||
'';
|
||||
User = "graphite";
|
||||
Group = "graphite";
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
preStart = ''
|
||||
if ! test -e ${dataDir}/db-created; then
|
||||
mkdir -p ${dataDir}/cache/
|
||||
chmod 0700 ${dataDir}/cache/
|
||||
|
||||
chown graphite:graphite ${cfg.dataDir}
|
||||
chown -R graphite:graphite ${cfg.dataDir}/cache
|
||||
|
||||
touch ${dataDir}/db-created
|
||||
fi
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.seyren.enable {
|
||||
systemd.services.seyren = {
|
||||
description = "Graphite Alerting Dashboard";
|
||||
|
@ -543,8 +414,7 @@ in {
|
|||
|
||||
(mkIf (
|
||||
cfg.carbon.enableCache || cfg.carbon.enableAggregator || cfg.carbon.enableRelay ||
|
||||
cfg.web.enable || cfg.api.enable ||
|
||||
cfg.seyren.enable
|
||||
cfg.web.enable || cfg.seyren.enable
|
||||
) {
|
||||
users.users.graphite = {
|
||||
uid = config.ids.uids.graphite;
|
||||
|
|
|
@ -12,11 +12,6 @@ import ./make-test-python.nix ({ pkgs, ... } :
|
|||
SECRET_KEY = "abcd";
|
||||
'';
|
||||
};
|
||||
api = {
|
||||
enable = true;
|
||||
port = 8082;
|
||||
finders = [ ];
|
||||
};
|
||||
carbon.enableCache = true;
|
||||
seyren.enable = false; # Implicitely requires openssl-1.0.2u which is marked insecure
|
||||
};
|
||||
|
@ -27,20 +22,15 @@ import ./make-test-python.nix ({ pkgs, ... } :
|
|||
start_all()
|
||||
one.wait_for_unit("default.target")
|
||||
one.wait_for_unit("graphiteWeb.service")
|
||||
one.wait_for_unit("graphiteApi.service")
|
||||
one.wait_for_unit("carbonCache.service")
|
||||
# The services above are of type "simple". systemd considers them active immediately
|
||||
# even if they're still in preStart (which takes quite long for graphiteWeb).
|
||||
# Wait for ports to open so we're sure the services are up and listening.
|
||||
one.wait_for_open_port(8080)
|
||||
one.wait_for_open_port(8082)
|
||||
one.wait_for_open_port(2003)
|
||||
one.succeed('echo "foo 1 `date +%s`" | nc -N localhost 2003')
|
||||
one.wait_until_succeeds(
|
||||
"curl 'http://localhost:8080/metrics/find/?query=foo&format=treejson' --silent | grep foo >&2"
|
||||
)
|
||||
one.wait_until_succeeds(
|
||||
"curl 'http://localhost:8082/metrics/find/?query=foo&format=treejson' --silent | grep foo >&2"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
{ stdenv, buildPythonPackage, fetchFromGitHub, lib, flask, flask-caching, cairocffi, pyparsing, pytz, pyyaml
|
||||
, raven, six, structlog, tzlocal, nose, mock, cairo, isPyPy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "graphite-api";
|
||||
version = "1.1.3";
|
||||
|
||||
disabled = isPyPy;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "brutasse";
|
||||
repo = "graphite-api";
|
||||
rev = version;
|
||||
sha256 = "0sz3kav2024ms2z4q03pigcf080gsr5v774z9bp3zw29k2p47ass";
|
||||
};
|
||||
|
||||
# https://github.com/brutasse/graphite-api/pull/239 rebased onto 1.1.3
|
||||
patches = [ ./flask-caching-rebased.patch ];
|
||||
|
||||
checkPhase = "nosetests";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
flask
|
||||
flask-caching
|
||||
cairocffi
|
||||
pyparsing
|
||||
pytz
|
||||
pyyaml
|
||||
raven
|
||||
six
|
||||
structlog
|
||||
tzlocal
|
||||
];
|
||||
|
||||
checkInputs = [ nose mock ];
|
||||
|
||||
LD_LIBRARY_PATH = "${cairo.out}/lib";
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Graphite-web, without the interface. Just the rendering HTTP API";
|
||||
homepage = "https://github.com/brutasse/graphite-api";
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
|
@ -1,132 +0,0 @@
|
|||
diff --git a/graphite_api/config.py b/graphite_api/config.py
|
||||
index 5e1e382..dc033a8 100644
|
||||
--- a/graphite_api/config.py
|
||||
+++ b/graphite_api/config.py
|
||||
@@ -112,11 +112,11 @@ def configure(app):
|
||||
app.cache = None
|
||||
if 'cache' in config:
|
||||
try:
|
||||
- from flask.ext.cache import Cache
|
||||
+ from flask_caching import Cache
|
||||
except ImportError:
|
||||
warnings.warn("'cache' is provided in the configuration but "
|
||||
- "Flask-Cache is not installed. Please `pip install "
|
||||
- "Flask-Cache`.")
|
||||
+ "flask-caching is not installed. Please `pip "
|
||||
+ "install flask-caching`.")
|
||||
else:
|
||||
cache_conf = {'CACHE_DEFAULT_TIMEOUT': 60,
|
||||
'CACHE_KEY_PREFIX': 'graphite-api:'}
|
||||
diff --git a/requirements.txt b/requirements.txt
|
||||
index c68b446..7826b0c 100644
|
||||
--- a/requirements.txt
|
||||
+++ b/requirements.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
Flask
|
||||
-Flask-Cache
|
||||
+Flask-Caching
|
||||
cairocffi
|
||||
pyparsing>=1.5.7
|
||||
pytz
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 0337cbe..df07989 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -38,7 +38,7 @@ setup(
|
||||
extras_require={
|
||||
'sentry': ['raven[flask]'],
|
||||
'cyanite': ['cyanite'],
|
||||
- 'cache': ['Flask-Cache'],
|
||||
+ 'cache': ['Flask-Caching'],
|
||||
'statsd': ['statsd'],
|
||||
},
|
||||
zip_safe=False,
|
||||
diff --git a/tests/test_render.py b/tests/test_render.py
|
||||
index be5609d..a0e7190 100644
|
||||
--- a/tests/test_render.py
|
||||
+++ b/tests/test_render.py
|
||||
@@ -8,7 +8,7 @@ from graphite_api._vendor import whisper
|
||||
from . import TestCase, WHISPER_DIR
|
||||
|
||||
try:
|
||||
- from flask.ext.cache import Cache
|
||||
+ from flask_caching import Cache
|
||||
except ImportError:
|
||||
Cache = None
|
||||
|
||||
diff --git a/tox.ini b/tox.ini
|
||||
index 85a0abb..c820393 100644
|
||||
--- a/tox.ini
|
||||
+++ b/tox.ini
|
||||
@@ -47,7 +47,7 @@ basepython = python2.7
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
Flask
|
||||
- Flask-Cache
|
||||
+ Flask-Caching
|
||||
pyparsing
|
||||
mock
|
||||
|
||||
@@ -56,7 +56,7 @@ basepython = python3.3
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
Flask
|
||||
- Flask-Cache
|
||||
+ Flask-Caching
|
||||
pyparsing
|
||||
|
||||
[testenv:py34]
|
||||
@@ -66,7 +66,7 @@ commands =
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
Flask
|
||||
- Flask-Cache
|
||||
+ Flask-Caching
|
||||
pyparsing
|
||||
|
||||
[testenv:py35]
|
||||
@@ -76,7 +76,7 @@ commands =
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
Flask
|
||||
- Flask-Cache
|
||||
+ Flask-Caching
|
||||
pyparsing
|
||||
|
||||
[testenv:pyparsing1]
|
||||
@@ -84,7 +84,7 @@ basepython = python2.7
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
Flask
|
||||
- Flask-Cache
|
||||
+ Flask-Caching
|
||||
pyparsing==1.5.7
|
||||
mock
|
||||
|
||||
@@ -93,7 +93,7 @@ basepython = pypy
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
Flask
|
||||
- Flask-Cache
|
||||
+ Flask-Caching
|
||||
pyparsing
|
||||
mock
|
||||
|
||||
@@ -102,7 +102,7 @@ basepython = python2.7
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
Flask<0.9
|
||||
- Flask-Cache
|
||||
+ Flask-Caching
|
||||
pyparsing
|
||||
mock
|
||||
|
||||
@@ -111,7 +111,7 @@ basepython = python2.7
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
Flask<0.10
|
||||
- Flask-Cache
|
||||
+ Flask-Caching
|
||||
pyparsing
|
||||
mock
|
||||
|
|
@ -79,6 +79,7 @@ mapAliases ({
|
|||
glances = throw "glances has moved to pkgs.glances"; # added 2020-20-28
|
||||
google_api_python_client = google-api-python-client; # added 2021-03-19
|
||||
googleapis_common_protos = googleapis-common-protos; # added 2021-03-19
|
||||
graphite_api = throw "graphite_api was removed, because it is no longer maintained"; # added 2022-07-10
|
||||
graphite_beacon = throw "graphite_beacon was removed, because it is no longer maintained"; # added 2022-07-09
|
||||
grpc_google_iam_v1 = grpc-google-iam-v1; # added 2021-08-21
|
||||
ha-av = throw "ha-av was removed, because it is no longer maintained"; # added 2022-04-06
|
||||
|
|
|
@ -3753,8 +3753,6 @@ in {
|
|||
|
||||
grapheme = callPackage ../development/python-modules/grapheme { };
|
||||
|
||||
graphite_api = callPackage ../development/python-modules/graphite-api { };
|
||||
|
||||
graphite-web = callPackage ../development/python-modules/graphite-web { };
|
||||
|
||||
graphene = callPackage ../development/python-modules/graphene { };
|
||||
|
|
Loading…
Reference in a new issue