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

octoprint: 1.3.12 -> 1.4.0, use python3 #82392

Merged
merged 12 commits into from May 3, 2020
Merged

octoprint: 1.3.12 -> 1.4.0, use python3 #82392

merged 12 commits into from May 3, 2020

Conversation

@FRidh
Copy link
Member

FRidh commented Mar 12, 2020

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@FRidh FRidh requested a review from jonringer as a code owner Mar 12, 2020
@FRidh FRidh mentioned this pull request Mar 12, 2020
0 of 10 tasks complete
@FRidh
Copy link
Member Author

FRidh commented Mar 12, 2020

Builds but not tested.

Copy link
Contributor

lopsided98 left a comment

This works for me.

@WhittlesJr
Copy link
Contributor

WhittlesJr commented Mar 14, 2020

Not building for me... what could I be doing wrong?

Executing pipInstallPhase
/build/psutil-5.6.7/dist /build/psutil-5.6.7
ERROR: celery 4.4.1 has requirement kombu<4.7,>=4.6.8, but you'll have kombu 4.6.7 which is incompatible.
Installing collected packages: kombu
  Attempting uninstall: kombu
    Found existing installation: kombu 4.6.8
    Uninstalling kombu-4.6.8:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: 'METADATA'
Consider using the `--user` option or check the permissions.

builder for '/nix/store/zv99fq8qi7zpa169yvwhfzmszwjxrca9-python3.7-kombu-4.6.7.drv' failed with exit code 1
Requirement already satisfied: psutil==5.6.7 from file:///build/psutil-5.6.7/dist/psutil-5.6.7-cp37-cp37m-linux_x86_64.whl in /nix/store/qvpsgs0sl3sh3knm5b1ya49x5zlf9v6j-python3-3.7.6/lib/python3.7/site-packages (5.6.7)
/build/psutil-5.6.7
Finished executing pipInstallPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/lcxd30danasmmicmdi9varwwrv3dg5s6-python3.7-psutil-5.6.7
strip is /nix/store/m6bb8cbdmb5yirxm8pa9ah9xri4557v7-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/lcxd30danasmmicmdi9varwwrv3dg5s6-python3.7-psutil-5.6.7/lib
patching script interpreter paths in /nix/store/lcxd30danasmmicmdi9varwwrv3dg5s6-python3.7-psutil-5.6.7
checking for references to /build/ in /nix/store/lcxd30danasmmicmdi9varwwrv3dg5s6-python3.7-psutil-5.6.7...
Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
running install tests
============================= test session starts ==============================
platform linux -- Python 3.7.6, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
rootdir: /build/psutil-5.6.7
plugins: celery-4.4.1
collected 0 items                                                              

============================ no tests ran in 0.00s =============================
ERROR: file not found: /nix/store/lcxd30danasmmicmdi9varwwrv3dg5s6-python3.7-psutil-5.6.7/lib/python3.7/site-packages/psutil/tests/test_system.py

builder for '/nix/store/z110afrwszrzcg7j03swh0q21nvv5grb-python3.7-psutil-5.6.7.drv' failed with exit code 4
cannot build derivation '/nix/store/xgl6rwhxy7s26dasc4dq8k0kyb37h21k-python3.7-billiard-3.6.1.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/3q5zfvzdys6ysqck251z9v8cbhia4275-python3.7-uvloop-0.14.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/c9whs1mdkdl6czlvvvkvjhlh3ck571rc-python3.7-celery-4.4.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/jlv0d2csprd1fqikv3rkhw6j32xayimg-python3.7-uvicorn-0.11.2.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/whx66y3za6l3wdmn4mcs0mmszlc8c53z-python3.7-sanic-19.6.3.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/crkci9aqbbydivasga88xqy51fd35xbb-python3.7-sentry-sdk-0.13.5.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/nz2prqhddfk2z8mkq87d46m84lq2y6y8-OctoPrint-1.4.0.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/zwwg8kpn51xbnhdyi49xhqjrx25b8fgp-python2.7-OctoPrintPlugin-MQTT-0.8.6.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/47aq9d2pmi640sq151miy8652xsnpm19-python2.7-OctoPrintPlugin-PrintTimeGenius-2.2.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/rprwixbq8ipmnrdzwhmal4p4qxyiraxk-python2.7-OctoPrintPlugin-STLViewer-0.4.2.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/0qmrrx8dc1hrygmrjx09mshii3smqnc4-python2.7-OctoPrintPlugin-TitleStatus-0.0.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/b5fl1nz3993jg79fpfrsiy6fs9hnl6zl-python-2.7.17-env.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/nk315bmaq9i3vyh4z8bgg8zv0y75bibz-unit-octoprint.service.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/gsrb8crgd27a77r7agjcixmx5i1xkrhm-system-units.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/60qix9xifzdybp532yb8fm7csp73ddk7-etc.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ijl2pq1vy77njcd3czzbnkxgl7vhjs2a-nixos-system-whittles-iskandar-20.09.git.c6014c11ac0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/ijl2pq1vy77njcd3czzbnkxgl7vhjs2a-nixos-system-whittles-iskandar-20.09.git.c6014c11ac0.drv' failed

Metadata:

 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.108, NixOS, 19.09.2229.d7843c8add6 (Loris)`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.3`
 - channels(root): `"nixos-19.09.2229.d7843c8add6"`
 - nixpkgs: `/home/alexj/Documents/Repositories/nixpkgs`

Relevant config:

{
  services.octoprint = {
    enable = true;
    plugins = plugins: with plugins; [
      mqtt titlestatus stlviewer printtimegenius
      abl-expert gcodeeditor simpleemergencystop
    ];
  };
}
@lopsided98
Copy link
Contributor

lopsided98 commented Mar 14, 2020

I'm not using any plugins, so that's probably why I didn't run into your issue. It looks like the plugins are still using Python 2.

@WhittlesJr
Copy link
Contributor

WhittlesJr commented Mar 14, 2020

I did try removing the plugins from my config. No change. With nothing but services.octoprint.enable = true; I still get the issue.

@FRidh
Copy link
Member Author

FRidh commented Mar 14, 2020

Indeed, Python 2 was still used for the plugins and thus the module. I've fixed this now, please review. I suggest reviewing the separate commits.

@gebner
Copy link
Member

gebner commented Mar 14, 2020

Most of the plugins will need to be updated to their latest version for compatibility with 1.4.0. (Looking through a few, only printtimegenius is up to date at the moment.)

@gebner
Copy link
Member

gebner commented Mar 14, 2020

I get an error when running nixos-rebuild:

error: undefined variable 'buildPlugin' at /home/gebner/nixpkgs/pkgs/applications/misc/octoprint/plugins.nix:170:21

My octoprint configuration is as follows:

  services.octoprint = {
    enable = true;
    plugins = ps: with ps; [ printtimegenius touchui psucontrol ];
  };
@FRidh FRidh force-pushed the FRidh:octoprint branch 2 times, most recently from 3e33205 to b64d691 Mar 14, 2020
@FRidh
Copy link
Member Author

FRidh commented Mar 14, 2020

I get an error when running nixos-rebuild:

Should be fixed now.

Most of the plugins will need to be updated to their latest version for compatibility with 1.4.0.

That I leave up to the plugin maintainers.

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@gebner
Copy link
Member

gebner commented Mar 14, 2020

That I leave up to the plugin maintainers.

May I push the updates to your PR?

@FRidh
Copy link
Member Author

FRidh commented Mar 14, 2020

Yes, please go ahead.

@FRidh
Copy link
Member Author

FRidh commented Mar 14, 2020

@FRidh FRidh force-pushed the FRidh:octoprint branch from 8e9bba4 to 405c8fa Mar 14, 2020
@FRidh
Copy link
Member Author

FRidh commented Mar 14, 2020

I rebased onto master.

@FRidh FRidh force-pushed the FRidh:octoprint branch from 405c8fa to 61ed7de Mar 15, 2020
@FRidh FRidh force-pushed the FRidh:octoprint branch from 61ed7de to 40c012b Mar 15, 2020
@FRidh FRidh mentioned this pull request Mar 15, 2020
0 of 10 tasks complete
@ofborg ofborg bot requested a review from gebner Mar 15, 2020
@WhittlesJr
Copy link
Contributor

WhittlesJr commented Mar 20, 2020

Works for me as well. I've printed successfully.

@nixos-discourse
Copy link

nixos-discourse commented Mar 27, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/octoprint-as-a-service/6440/2

Copy link
Contributor

jonringer left a comment

theres some regressions in the cozy packages:

https://github.com/NixOS/nixpkgs/pull/82392
2 package failed to build:
python37Packages.cozy python38Packages.cozy

24 package built:
kodiPlugins.yatp octoprint python27Packages.celery python27Packages.flower python27Packages.kombu python27Packages.z3 python37Packages.celery python37Packages.django-raster python37Packages.djmail python37Packages.flower python37Packages.kombu python37Packages.z3 python37Packages.sentry-sdk python38Packages.z3 sourcehut.buildsrht sourcehut.dispatchsrht sourcehut.gitsrht sourcehut.hgsrht sourcehut.listssrht sourcehut.mansrht sourcehut.metasrht sourcehut.pastesrht sourcehut.todosrht tribler
@lopsided98
Copy link
Contributor

lopsided98 commented Mar 27, 2020

z3 (a dependency of cozy) has a python output, which is being overridden by 40c012b

Copy link
Contributor

WhittlesJr left a comment

Works for me

EDIT: Er, looks like there's a conflict now. Never mind.

@WhittlesJr
Copy link
Contributor

WhittlesJr commented May 1, 2020

Hoping this can be resolved soonish. I'm in a bit of a pickle with regards to having to choose between a working printer or other working applications on master.

@gebner
Copy link
Member

gebner commented May 3, 2020

I've merged master into this branch, and octoprint builds again. I've been waiting with merging this PR because of Ben's comment with z3, I'll take a look at this now.

gebner added 2 commits May 3, 2020
@ofborg ofborg bot requested a review from WhittlesJr May 3, 2020
@gebner
Copy link
Member

gebner commented May 3, 2020

I've reverted @FRidh's commit that adds python as a passthru attribute. There are lots of packages with an output called python that this change presumably affects. This should go in a different PR.

For now, I've just set passthru.python in octoprint and this seems to work.

@gebner gebner merged commit e5c8002 into NixOS:master May 3, 2020
16 of 17 checks passed
16 of 17 checks passed
octoprint, octoprint.passthru.tests on x86_64-darwin
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d5fb3b4"; rev="d5fb3b4e28ca3ef4222a87996fddef97521c7318"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d5fb3b4"; rev="d5fb3b4e28ca3ef4222a87996fddef97521c7318"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d5fb3b4"; rev="d5fb3b4e28ca3ef4222a87996fddef97521c7318"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d5fb3b4"; rev="d5fb3b4e28ca3ef4222a87996fddef97521c7318"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d5fb3b4"; rev="d5fb3b4e28ca3ef4222a87996fddef97521c7318"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d5fb3b4"; rev="d5fb3b4e28ca3ef4222a87996fddef97521c7318"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d5fb3b4"; rev="d5fb3b4e28ca3ef4222a87996fddef97521c7318"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
octoprint, octoprint.passthru.tests on aarch64-linux Success
Details
octoprint, octoprint.passthru.tests on x86_64-linux Success
Details
Python 2 deprecation automation moved this from Needs review to Done May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.