New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graphite: 1.0.2 -> 1.1.3 & moved dependencies to python-modules #44276
Conversation
What's the advantage of having |
@GrahamcOfBorg test graphite |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.graphite Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: tests.graphite Partial log (click to expand)
|
@dotlambda it could be possible that different versions of Note that we do something similar with the Elasticsearch stack. Having support for batch upgrades would also be nice of course. I guess batch upgrades can also ensure we upgrade all graphite packages together. What needs to be done to get the graphite packages to batch upgrade? |
pkgs/top-level/python-packages.nix
Outdated
# Some Python packages are released together and share the same version. | ||
# These versions are collected in the sharedVersions attribute set and are | ||
# added to the callPackage scope so that packages can refer to these versions. | ||
sharedVersions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea, but as there currently is only one version I don't think we should have this. If we were to have this, I think this should go to top-level so we could also use it with say mercurial
and tortoisehg
and other cases there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another example: libgit2
and pygit2
.
Currently, our script can only deal with the version being specified in each file. If new versions are published on the same date, they would be updated simultaneously anyway. |
@dotlambda then I don't mind duplicating the versions in each file. BTW which script are you talking about? Somewhere in |
There's no need to add packages manually. It's applied to all packages in |
0aeefe6
to
6fdaf30
Compare
Great. I've updated my PR and removed |
, whisper, pycairo, cairocffi, ldap, memcached, pytz, urllib3, scandir | ||
}: | ||
if django != django_1_8 | ||
|| django_tagging != django_tagging_0_4_3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead use something like django.version != "1.8"
?
|
||
postInstall = '' | ||
wrapProgram $out/bin/run-graphite-devel-server.py \ | ||
--prefix PATH : ${which}/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use makeWrapperArgs
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the following:
makeWrapperArgs = [ "--prefix PATH : ${which}/bin" ];
but with that the test suite fails to start up graphite-web:
one# [ 7.566444] graphiteWeb-pre-start[706]: Traceback (most recent call last):
one# [ 7.568265] graphiteWeb-pre-start[706]: File "/nix/store/k8xndnycd95iqs0ky9nlcvqqnyx9p63v-python2.7-Django-1.8.18/bin/..django-admin.py-wrapped-wrapped", line 7, in <module>
one# [ 7.574263] graphiteWeb-pre-start[706]: management.execute_from_command_line()
one# [ 7.582220] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
one# [ 7.595708] graphiteWeb-pre-start[706]: utility.execute()
one# [ 7.602375] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
one# [ 7.611485] graphiteWeb-pre-start[706]: django.setup()
one# [ 7.617331] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
one# [ 7.626695] graphiteWeb-pre-start[706]: apps.populate(settings.INSTALLED_APPS)
one# [ 7.635331] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
one# [ 7.646523] graphiteWeb-pre-start[706]: app_config = AppConfig.create(entry)
one# [ 7.652897] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/django/apps/config.py", line 86, in create
one# [ 7.665890] graphiteWeb-pre-start[706]: module = import_module(entry)
one# [ 7.674238] graphiteWeb-pre-start[706]: File "/nix/store/7sbvn0wgv7hsnxpss1jba723kx5nz6d4-python-2.7.15/lib/python2.7/importlib/__init__.py", line 37, in import_module
one# [ 7.682407] graphiteWeb-pre-start[706]: __import__(name)
one# [ 7.693954] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/opt/graphite/webapp/graphite/functions/__init__.py", line 10, in <module>
one# [ 7.703974] graphiteWeb-pre-start[706]: from graphite.logger import log
one# [ 7.710845] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/opt/graphite/webapp/graphite/logger.py", line 106, in <module>
one# [ 7.720270] graphiteWeb-pre-start[706]: log = GraphiteLogger() # import-shared logger instance
one# [ 7.725289] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/opt/graphite/webapp/graphite/logger.py", line 39, in __init__
one# [ 7.732729] graphiteWeb-pre-start[706]: level = logging.DEBUG if settings.DEBUG else logging.INFO,
one# [ 7.736779] graphiteWeb-pre-start[706]: File "/nix/store/h5pfcf6j3rl85xm4apggqg1d4za4yj53-python-2.7.15-env/lib/python2.7/site-packages/opt/graphite/webapp/graphite/logger.py", line 78, in _config_logger
one# [ 7.743253] graphiteWeb-pre-start[706]: handler = Rotater(log_file, when=when, backupCount=backupCount)
one# [ 7.748248] graphiteWeb-pre-start[706]: File "/nix/store/7sbvn0wgv7hsnxpss1jba723kx5nz6d4-python-2.7.15/lib/python2.7/logging/handlers.py", line 171, in __init__
one# [ 7.754796] graphiteWeb-pre-start[706]: BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay)
one# [ 7.762192] graphiteWeb-pre-start[706]: File "/nix/store/7sbvn0wgv7hsnxpss1jba723kx5nz6d4-python-2.7.15/lib/python2.7/logging/handlers.py", line 64, in __init__
one# [ 7.767696] graphiteWeb-pre-start[706]: logging.FileHandler.__init__(self, filename, mode, encoding, delay)
one# [ 7.771913] graphiteWeb-pre-start[706]: File "/nix/store/7sbvn0wgv7hsnxpss1jba723kx5nz6d4-python-2.7.15/lib/python2.7/logging/__init__.py", line 920, in __init__
one# [ 7.779395] graphiteWeb-pre-start[706]: StreamHandler.__init__(self, self._open())
one# [ 7.784128] graphiteWeb-pre-start[706]: File "/nix/store/7sbvn0wgv7hsnxpss1jba723kx5nz6d4-python-2.7.15/lib/python2.7/logging/__init__.py", line 950, in _open
one# [ 7.789363] graphiteWeb-pre-start[706]: stream = open(self.baseFilename, self.mode)
one# [ 7.794295] graphiteWeb-pre-start[706]: IOError: [Errno 2] No such file or directory: '/var/db/graphite/log/webapp/info.log'
|
||
propagatedBuildInputs = [ tornado pyyaml funcparserlib ]; | ||
|
||
patchPhase = "> requirements.txt"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was in the original package and without it the build fails at the dependency checking phase. I do feel a bit uneasy about just ignoring dependency version ranges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using
substituteInPlace requirements.txt "==" ">="
instead?
Also, this should be put into postPatch
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's better indeed.
pyyaml redis requests six websocket_client | ||
]; | ||
|
||
patchPhase = "> requirements.txt"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well. Would be best to get rid of it.
804e4b3
to
98f2009
Compare
@dotlambda @FRidh I think this is ready to be merged now. I also performed a manual test by modifying the graphite test to enable an xserver and install firefox. Then I ran the VM using |
Unrelated, but:
How about moving |
homepage = http://graphite.wikidot.com/; | ||
description = "Enterprise scalable realtime graphing"; | ||
maintainers = with stdenv.lib.maintainers; [ rickynils offline basvandijk ]; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license
description = "InfluxDB storage plugin for Graphite-API"; | ||
homepage = https://github.com/InfluxGraph/influxgraph; | ||
license = licenses.asl20; | ||
platforms = platforms.linux; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be dropped. Or is it needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this can be dropped. I'll do it in a sec.
homepage = http://graphite.wikidot.com/; | ||
description = "Fixed size round-robin style database"; | ||
maintainers = with stdenv.lib.maintainers; [ rickynils offline basvandijk ]; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license
Fixes NixOS#30891 * Upgrade `graphite-web`, `carbon` and `whisper` from 1.0.2 -> 1.1.3. * Replaced the deprecated `pythonPackages.graphite_influxdb` with `pythonPackages.influxgraph.` * Renamed `pythonPackages.graphite_web` to `pythonPackages.graphite-web` to be consistent with the Python package name. * Replaced the unmaintained `pythonPackages.graphite_pager` with `pythonPackages.graphitepager` * Moved all new packages from `python-packages.nix` to `pkgs/development/python-modules`
98f2009
to
f4e759b
Compare
Btw, should the changes to the module be mentioned in the changelog? |
@dotlambda thanks for the merge. The API of the graphite module hasn't changed. So existing invocations of the module don't have to be changed. So I don't think a changelog entry is needed. |
@FRidh about making |
Motivation for this change
Fixes #30891 and closes #44246.
Things done
Upgrade
graphite-web
,carbon
andwhisper
from 1.0.2 -> 1.1.3.Extend the
pythonPackages.callPackage
scope with thesharedVersions
attribute set. This set contains versions that areshared by multiple python packages. Currently it only contains the
graphiteVersion
.Replaced the deprecated
pythonPackages.graphite_influxdb
withpythonPackages.influxgraph.
Renamed
pythonPackages.graphite_web
topythonPackages.graphite-web
to be consistent with the Python package name.
Replaced the unmaintained
pythonPackages.graphite_pager
withpythonPackages.graphitepager
Moved all new packages from
python-packages.nix
topkgs/development/python-modules
The following test passes:
nix-build nixos/release.nix -A tests.graphite.x86_64-linux
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)@dotlambda @FRidh @adisbladis @offlinehacker @rickynils