Skip to content
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-web: use django-2.0 #52799

Closed
wants to merge 3 commits into from

Conversation

basvandijk
Copy link
Member

Don't merge yet, this is WIP!

Motivation for this change

graphite-web uses django-1.8 which is EOL (see: #52679). This PR is WIP on upgrading graphite-web to django-2.0.

Things done

The graphite test still fails with the following errors:

$ nix-build nixos/release.nix -A tests.graphite.x86_64-linux
...
one# [    6.895737] waitress-serve[833]: Fatal Python error: initsite: Failed to import the site module
one# [    6.905333] waitress-serve[833]: Traceback (most recent call last):
one# [    6.906536] waitress-serve[833]:   File "/nix/store/xayy7lwmdzw6n3mc77gmzna0kjy9ijih-python-2.7.15-env/lib/python2.7/site-packages/site.py", line 73, in <module>
one# [    6.912432] waitress-serve[833]:     __boot()
one# [    6.920091] waitress-serve[833]:   File "/nix/store/xayy7lwmdzw6n3mc77gmzna0kjy9ijih-python-2.7.15-env/lib/python2.7/site-packages/site.py", line 26, in __boot
one# [    6.926912] waitress-serve[833]:     import imp  # Avoid import loop in Python 3
one# [    6.930116] waitress-serve[833]:   File "/nix/store/9vcy8i7mcwmcp486krc22v7851spcdqj-python3-3.7.1/lib/python3.7/imp.py", line 27, in <module>
one# [    6.933937] waitress-serve[833]:     import tokenize
one# [    6.936721] waitress-serve[833]:   File "/nix/store/9vcy8i7mcwmcp486krc22v7851spcdqj-python3-3.7.1/lib/python3.7/tokenize.py", line 33, in <module>
one# [    6.939588] waitress-serve[833]:     import re
one# [    6.941482] waitress-serve[833]:   File "/nix/store/9vcy8i7mcwmcp486krc22v7851spcdqj-python3-3.7.1/lib/python3.7/re.py", line 143, in <module>
one# [    6.944112] waitress-serve[833]:     class RegexFlag(enum.IntFlag):
one# [    6.946966] waitress-serve[833]: AttributeError: module 'enum' has no attribute 'IntFlag'
...
one# [    8.431924] twistd[824]: /nix/store/vg1295z6rm414zs82w43kbn7j1w7x7ky-python2.7-Twisted-18.9.0/bin/twistd: Unknown command: carbon-cache
...
one# [    8.841970] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]: Could not import  graphite_local_settings, using defaults!
...
one# [   14.738893] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]: Copying '/nix/store/10d3rlsfjqd9wfr3pzy76yb9a9pmbh58-python3.7-graphite-web-1.1.5/webapp/content/css/dashboard-white.css'
one# [   14.751132] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]: Traceback (most recent call last):
one# [   14.752829] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/zq1b8rsi84zvqdb4hz55fcd6998v4c16-python3.7-Django-2.0.9/bin/..django-admin.py-wrapped-wrapped", line 7, in <module>
one# [   14.760313] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     management.execute_from_command_line()
one# [   14.762681] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
one# [   14.767967] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     utility.execute()
one# [   14.776164] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/core/management/__init__.py", line 365, in execute
one# [   14.784284] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     self.fetch_command(subcommand).run_from_argv(self.argv)
one# [   14.786918] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
one# [   14.794391] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     self.execute(*args, **cmd_options)
one# [   14.798830] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/core/management/base.py", line 335, in execute
one# [   14.803147] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     output = self.handle(*args, **options)
one# [   14.812308] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 189, in handle
one# [   14.821309] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     collected = self.collect()
one# [   14.824616] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 114, in collect
one# [   14.832197] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     handler(path, prefixed_path, storage)
one# [   14.837422] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 354, in copy_file
one# [   14.843898] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     self.storage.save(prefixed_path, source_file)
one# [   14.848272] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/core/files/storage.py", line 49, in save
one# [   14.858343] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     return self._save(name, content)
one# [   14.860681] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/django/core/files/storage.py", line 236, in _save
one# [   14.870400] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     os.makedirs(directory)
one# [   14.872156] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/9vcy8i7mcwmcp486krc22v7851spcdqj-python3-3.7.1/lib/python3.7/os.py", line 211, in makedirs
one# [   14.876310] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     makedirs(head, exist_ok=exist_ok)
one# [   14.882180] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:   File "/nix/store/9vcy8i7mcwmcp486krc22v7851spcdqj-python3-3.7.1/lib/python3.7/os.py", line 221, in makedirs
one# [   14.886159] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]:     mkdir(name, mode)
one# [   14.889284] z6glijz8wpf06x1s040gx4zaljprdbzc-unit-script-graphiteWeb-pre-start[806]: OSError: [Errno 30] Read-only file system: '/nix/store/yy16rzxsmp6bzmc16n00ksqfndpcm5hn-python3-3.7.1-env/lib/python3.7/site-packages/opt/graphite/static'
...
error: unit ‘graphiteWeb.service’ reached state ‘failed’
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member

FRidh commented Dec 25, 2018

Don't include the enum34 package.

@dotlambda
Copy link
Member

@basvandijk Any updates?

@basvandijk
Copy link
Member Author

Closing since this is old, I'm not working with graphite anymore and I can't justify the time to continue with this.

@basvandijk basvandijk closed this Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants