(address . bug-guix@gnu.org)
- Aon 9 Aug 2022 15:23
- Lon 9 Aug 2022 23:08
- Lon 9 Aug 2022 23:17
- Lon 8 Sep 2022 21:35
- Ron 14 Sep 2022 22:34
- Mon 15 Sep 2022 18:35
- Mon 15 Sep 2022 18:37
- Lon 20 Jan 2023 12:24
- Mon 22 Jan 2023 03:02
guix-jupyter fails a test
L
Re: bug#57077: guix-jupyter fails a test
(name . Andreas Enge)(address . andreas@enge.fr)(address . 57077@debbugs.gnu.org)
878rnx2k2s.fsf@gnu.org
Hi!
Andreas Enge <andreas@enge.fr> skribis:
Toggle quote (4 lines)
> guix-jupyter currently fails to build with the error message below. While I
> noticed it when updating python-sympy, the problem was already present
> before.
It looks like the Jupyter protocol changed, probably in
d54b8754fdba52d89aafaaf80b6c8e89bcea92bd, which was merged with the
latest ‘staging’.
I’ll take a look if nobody beats me at it…
Ludo’.
L
(name . Andreas Enge)(address . andreas@enge.fr)
87tu5hek1d.fsf@gnu.org
Hi,
Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
Toggle quote (10 lines)
> Andreas Enge <andreas@enge.fr> skribis:
>
>> guix-jupyter currently fails to build with the error message below. While I
>> noticed it when updating python-sympy, the problem was already present
>> before.
>
> It looks like the Jupyter protocol changed, probably in
> d54b8754fdba52d89aafaaf80b6c8e89bcea92bd, which was merged with the
> latest ‘staging’.
To my surprise, it looks like running tests sequentially as Marius did
in d09f3f82b84c850a9639ec80af19ba3918b63368 solves the problem. That’s
good news. :-)
Thanks,
Ludo’.
Closed
R
guix-jupyter fails a test
(address . 57077@debbugs.gnu.org)
8735ctlmo2.fsf@elephly.net
Unfortunately, guix-jupyter still fails to build for me as of commit
29d52a56f2d254781b65dbec0f1009db0b9d06e6.
Toggle snippet (181 lines)
==========================================
Guix-Jupyter 0.2.2: ./test-suite.log
==========================================
# TOTAL: 36
# PASS: 33
# SKIP: 0
# XFAIL: 0
# FAIL: 3
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: tests/kernels
===================
/gnu/store/msd98spsahl2vxc2g2z2wgyai10dyr14-python-ipython-8.2.0/lib/python3.9/site-packages/IPython/paths.py:70: UserWarning: IPython parent '/homeless-shelter' is not a writable location, using a temp directory.
warn("IPython parent '{0}' is not a writable location,"
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.
To read more about this, see https://github.com/ipython/ipython/issues/2049
To connect another client to this kernel, use:
--existing /tmp/guix-build-guix-jupyter-0.2.2.drv-0/guix-jupyter-kernel.U55aZ4/conn/2031766281046451459.json
test-name: run-kernel python3
location: /tmp/guix-build-guix-jupyter-0.2.2.drv-0/source/tests/kernels.scm:44
source:
+ (test-assert
+ "run-kernel python3"
+ (let ((kernel
+ (run-kernel %context %python3-specs %kernel-key)))
+ (set! %kernel kernel)
+ (and (kernel? (pk 'kernel kernel))
+ (begin
+ (kill (kernel-pid kernel) 0)
+ (let ((greetings (read-message %kernel 5000)))
+ (or (not greetings)
+ (list (message-type greetings)
+ (kernel-status-execution-state
+ (json->kernel-status
+ (message-content greetings))))))))))
;;; (kernel #<<kernel> name: "Python 3 (ipykernel)" pid: 884 key: "secretkey" control: #<zmq-socket type: 5 7ffff3ec1cc0> shell: #<zmq-socket type: 5 7ffff3ec1cb0> stdin: #<zmq-socket type: 5 7ffff3ec1ca0> heartbeat: #<zmq-socket type: 3 7ffff3ec1c80> iosub: #<zmq-socket type: 2 7ffff3ec1c60> properties: ()>)
actual-value: #f
actual-error:
+ (wrong-type-arg
+ "string->symbol"
+ "Wrong type argument in position ~A (expecting ~A): ~S"
+ (1 "string" #f)
+ (#f))
result: FAIL
test-name: kernel_info_request
location: /tmp/guix-build-guix-jupyter-0.2.2.drv-0/source/tests/kernels.scm:61
source:
+ (test-equal
+ "kernel_info_request"
+ "python"
+ (let ((request
+ (message
+ (header "kernel_info_request" "luser" "12345")
+ "{}")))
+ (send-message %kernel request)
+ (let* ((replies
+ (unfold
+ (cut > <> 2)
+ (lambda (_) (read-message %kernel 10000))
+ #{1+}#
+ 0)))
+ (define (type-predicate type)
+ (lambda (message)
+ (string=? (message-type message) type)))
+ (and (every message? (pk 'replies replies))
+ (match (filter (type-predicate "status") replies)
+ ((busy idle)
+ (and (eq? 'busy
+ (kernel-status-execution-state
+ (json->kernel-status (message-content busy))))
+ (eq? 'idle
+ (kernel-status-execution-state
+ (json->kernel-status (message-content idle))))
+ (equal?
+ (message-parent-header busy)
+ (message-header request))
+ (equal?
+ (message-parent-header idle)
+ (message-header request)))))
+ (let ((reply (find (type-predicate "kernel_info_reply")
+ replies)))
+ (and (equal?
+ (message-parent-header reply)
+ (message-header request))
+ (let ((reply (json->kernel-info-reply
+ (message-content reply))))
+ (language-info-name
+ (kernel-info-reply-language-info reply)))))))))
;;; (replies (#<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_1" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.486528Z" type: "status" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 115 116 97 116 117 115)> parent-header: #f metadata: "{}" content: "{\"execution_state\": \"starting\"}" buffers: ()> #<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_2" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.505955Z" type: "status" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 115 116 97 116 117 115)> parent-header: #<<header> id: "7b136e32ddcbe2e226edffb116a4fca9" user: "luser" session: "12345" date: "2022-09-14T16:03:05.503986000" type: "kernel_info_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"execution_state\": \"busy\"}" buffers: ()> #<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_4" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.507374Z" type: "status" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 115 116 97 116 117 115)> parent-header: #<<header> id: "7b136e32ddcbe2e226edffb116a4fca9" user: "luser" session: "12345" date: "2022-09-14T16:03:05.503986000" type: "kernel_info_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"execution_state\": \"idle\"}" buffers: ()>))
expected-value: "python"
actual-value: #f
actual-error:
+ (match-error
+ "match"
+ "no matching pattern"
+ (#<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_1" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.486528Z" type: "status" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 115 116 97 116 117 115)> parent-header: #f metadata: "{}" content: "{\"execution_state\": \"starting\"}" buffers: ()>
+ #<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_2" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.505955Z" type: "status" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 115 116 97 116 117 115)> parent-header: #<<header> id: "7b136e32ddcbe2e226edffb116a4fca9" user: "luser" session: "12345" date: "2022-09-14T16:03:05.503986000" type: "kernel_info_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"execution_state\": \"busy\"}" buffers: ()>
+ #<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_4" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.507374Z" type: "status" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 115 116 97 116 117 115)> parent-header: #<<header> id: "7b136e32ddcbe2e226edffb116a4fca9" user: "luser" session: "12345" date: "2022-09-14T16:03:05.503986000" type: "kernel_info_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"execution_state\": \"idle\"}" buffers: ()>))
result: FAIL
test-name: execute_request
location: /tmp/guix-build-guix-jupyter-0.2.2.drv-0/source/tests/kernels.scm:100
source:
+ (test-equal
+ "execute_request"
+ 42
+ (let ((request
+ (message
+ (header "execute_request" "luser" "12345")
+ (scm->json-string
+ (execute-request->json
+ (execute-request (code "40 + 2\n")))))))
+ (send-message %kernel request)
+ (let* ((replies
+ (unfold
+ (cut > <> 4)
+ (lambda (_) (read-message %kernel 10000))
+ #{1+}#
+ 0)))
+ (define (type-predicate type)
+ (lambda (message)
+ (string=? (message-type message) type)))
+ (and (every message? (pk 'replies replies))
+ (match (filter (type-predicate "status") replies)
+ ((busy idle)
+ (and (eq? 'busy
+ (kernel-status-execution-state
+ (json->kernel-status (message-content busy))))
+ (eq? 'idle
+ (kernel-status-execution-state
+ (json->kernel-status (message-content idle))))
+ (equal?
+ (message-parent-header busy)
+ (message-header request))
+ (equal?
+ (message-parent-header idle)
+ (message-header request)))))
+ (let ((input (find (type-predicate "execute_input") replies)))
+ (equal?
+ (message-parent-header input)
+ (message-header request)))
+ (let ((reply (find (type-predicate "execute_reply") replies)))
+ (equal?
+ (message-parent-header reply)
+ (message-header request)))
+ (let ((result
+ (find (type-predicate "execute_result") replies)))
+ (and (equal?
+ (message-parent-header result)
+ (message-header request))
+ (let* ((content
+ (json-string->scm (message-content result)))
+ (data (assoc-ref content "data"))
+ (text (assoc-ref data "text/plain")))
+ (string->number text))))))))
;;; (replies (#<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_3" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.506350Z" type: "kernel_info_reply" version: "5.3" sender: #f> parent-header: #<<header> id: "7b136e32ddcbe2e226edffb116a4fca9" user: "luser" session: "12345" date: "2022-09-14T16:03:05.503986000" type: "kernel_info_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"status\": \"ok\", \"protocol_version\": \"5.3\", \"implementation\": \"ipython\", \"implementation_version\": \"8.2.0\", \"language_info\": {\"name\": \"python\", \"version\": \"3.9.9\", \"mimetype\": \"text/x-python\", \"codemirror_mode\": {\"name\": \"ipython\", \"version\": 3}, \"pygments_lexer\": \"ipython3\", \"nbconvert_exporter\": \"python\", \"file_extension\": \".py\"}, \"banner\": \"Python 3.9.9 (main, Jan 1 1970, 00:00:01) \\nType 'copyright', 'credits' or 'license' for more information\\nIPython 8.2.0 -- An enhanced Interactive Python. Type '?' for help.\\n\", \"help_links\": [{\"text\": \"Python Reference\", \"url\": \"https://docs.python.org/3.9\"}, {\"text\": \"IPython Reference\", \"url\": \"https://ipython.org/documentation.html\"}, {\"text\": \"NumPy Reference\", \"url\": \"https://docs.scipy.org/doc/numpy/reference/\"}, {\"text\": \"SciPy Reference\", \"url\": \"https://docs.scipy.org/doc/scipy/reference/\"}, {\"text\": \"Matplotlib Reference\", \"url\": \"https://matplotlib.org/contents.html\"}, {\"text\": \"SymPy Reference\", \"url\": \"http://docs.sympy.org/latest/index.html\"}, {\"text\": \"pandas Reference\", \"url\": \"https://pandas.pydata.org/pandas-docs/stable/\"}]}" buffers: ()> #<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_5" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.524608Z" type: "status" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 115 116 97 116 117 115)> parent-header: #<<header> id: "b101b0c27f41055fc03178fdce86a4f6" user: "luser" session: "12345" date: "2022-09-14T16:03:05.523517000" type: "execute_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"execution_state\": \"busy\"}" buffers: ()> #<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_6" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.524906Z" type: "execute_input" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 101 120 101 99 117 116 101 95 105 110 112 117 116)> parent-header: #<<header> id: "b101b0c27f41055fc03178fdce86a4f6" user: "luser" session: "12345" date: "2022-09-14T16:03:05.523517000" type: "execute_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"code\": \"40 + 2\\n\", \"execution_count\": 1}" buffers: ()> #<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_7" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.531062Z" type: "execute_result" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 101 120 101 99 117 116 101 95 114 101 115 117 108 116)> parent-header: #<<header> id: "b101b0c27f41055fc03178fdce86a4f6" user: "luser" session: "12345" date: "2022-09-14T16:03:05.523517000" type: "execute_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"data\": {\"text/plain\": \"42\"}, \"metadata\": {}, \"execution_count\": 1}" buffers: ()> #<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_8" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.540033Z" type: "execute_reply" version: "5.3" sender: #f> parent-header: #<<header> id: "b101b0c27f41055fc03178fdce86a4f6" user: "luser" session: "12345" date: "2022-09-14T16:03:05.523517000" type: "execute_request" version: "5.0" sender: #f> metadata: "{\"started\": \"2022-09-14T16:03:05.524836Z\", \"dependencies_met\": true, \"engine\": \"a57c1f56-41bd-4cbb-bea9-939faca877f4\", \"status\": \"ok\"}" content: "{\"status\": \"ok\", \"execution_count\": 1, \"user_expressions\": {}, \"payload\": []}" buffers: ()>))
expected-value: 42
actual-value: #f
actual-error:
+ (match-error
+ "match"
+ "no matching pattern"
+ (#<<message> header: #<<header> id: "377e5f0c-c85d2027900218a7a09c8021_884_5" user: "username" session: "377e5f0c-c85d2027900218a7a09c8021" date: "2022-09-14T16:03:05.524608Z" type: "status" version: "5.3" sender: #vu8(107 101 114 110 101 108 46 97 53 55 99 49 102 53 54 45 52 49 98 100 45 52 99 98 98 45 98 101 97 57 45 57 51 57 102 97 99 97 56 55 55 102 52 46 115 116 97 116 117 115)> parent-header: #<<header> id: "b101b0c27f41055fc03178fdce86a4f6" user: "luser" session: "12345" date: "2022-09-14T16:03:05.523517000" type: "execute_request" version: "5.0" sender: #f> metadata: "{}" content: "{\"execution_state\": \"busy\"}" buffers: ()>))
result: FAIL
--
Ricardo
M
gnu: guix-jupyter: Fix build and check phase.
(name . 57077@debbugs.gnu.org)(address . 57077@debbugs.gnu.org)
267f3da0a0d8486eb98ff58322659b08@mdc-berlin.de
Hi guys,
I didn't work too much on this 'area', but I think that I have a fix for this issue, check my patch.
Do not trow at me with stones if I am wrong ?!
All the best!
M?d?lin Ionel Patra?cu
System Administrator
The Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center (MDC)
Hannoversche Straße 28
House 101, room 1.89
10115 Berlin, Germany
Attachment: file
M
(address . 57077@debbugs.gnu.org)
20220915163740.11672-1-madalinionel.patrascu@mdc-berlin.de
Build drops warnings regarding 'guild' and the check phase does not
have write permissions for its tests.
[build]: Remove the warnings generated by the 'guild' by setting the
"GUILE_AUTO_COMPILE" to 0.
[check]: Set the homeless-shelter to /tmp for write permission.
---
gnu/packages/package-management.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
Toggle diff (40 lines)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 2d1fe914e3..454c69c8a7 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -21,6 +21,7 @@
;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2022 M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1616,6 +1617,10 @@ (define-public guix-jupyter
#:parallel-tests? #f ;kernels.scm frequently breaks in parallel
#:phases
(modify-phases %standard-phases
+ (add-before 'build 'set-GUILE_AUTO_COMPILE
+ (lambda _
+ ;; To avoid warnings relating to 'guild'.
+ (setenv "GUILE_AUTO_COMPILE" "0")))
(add-after 'install 'sed-kernel-json
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1651,7 +1656,11 @@ (define-public guix-jupyter
(("guix-jupyter-kernel.scm")
(string-append out "/share/guile/site/3.0/"
"guix-jupyter-kernel.scm")))
- #t))))))
+ #t)))
+ (add-before 'check 'change-home
+ (lambda _
+ ;; Change from /homeless-shelter to /tmp for write permission.
+ (setenv "HOME" "/tmp"))))))
(native-inputs
(list autoconf
automake
base-commit: 0624e7dbad2f53b7f752e9f1109765470f369298
--
2.37.3
L
Re: bug#57077: guix-jupyter fails a test
(name . M?d?lin Ionel Patra?cu)(address . madalinionel.patrascu@mdc-berlin.de)(address . 57077-done@debbugs.gnu.org)
877cxh8n54.fsf_-_@gnu.org
Hi M?d?lin,
M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de> skribis:
Toggle quote (6 lines)
> Build drops warnings regarding 'guild' and the check phase does not
> have write permissions for its tests.
> [build]: Remove the warnings generated by the 'guild' by setting the
> "GUILE_AUTO_COMPILE" to 0.
> [check]: Set the homeless-shelter to /tmp for write permission.
I had completely overlooked this message of yours and committed just now
a similar fix in b60f3941b95dc5351e2336cf694480d099a91233. This is
embarrassing, sorry about that!
Do feel free to ping me or whoever last touched the package or the
relevant team¹ for the package when a patch of yours gets stuck.
The good news is that Guix-Jupyter is finally fixed. :-)
I hope it’s useful to you.
My apologies again, and thank you for your work!
Ludo’.
Closed
M
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 57077-done@debbugs.gnu.org)(address . 57077-done@debbugs.gnu.org)
54ec1fb22fb0412aa672c5df39846d81@mdc-berlin.de
Hi Ludo,
No worries, these things can happen.
Good to see that the issue now is fixed.
All the best!
M?d?lin Ionel Patra?cu
System Administrator
The Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center (MDC)
Hannoversche Straße 28
House 101, room 1.89
10115 Berlin, Germany
________________________________
From: Ludovic Courtès <ludo@gnu.org>
Sent: Friday, January 20, 2023 12:24
To: Patrascu, Madalin Ionel
Cc: 57077-done@debbugs.gnu.org
Subject: [ext] Re: bug#57077: guix-jupyter fails a test
Hi M?d?lin,
M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de> skribis:
Toggle quote (5 lines)
> Build drops warnings regarding 'guild' and the check phase does not
> have write permissions for its tests.
> [build]: Remove the warnings generated by the 'guild' by setting the
> "GUILE_AUTO_COMPILE" to 0.
> [check]: Set the homeless-shelter to /tmp for write permission.
I had completely overlooked this message of yours and committed just now
a similar fix in b60f3941b95dc5351e2336cf694480d099a91233. This is
embarrassing, sorry about that!
Do feel free to ping me or whoever last touched the package or the
relevant team¹ for the package when a patch of yours gets stuck.
The good news is that Guix-Jupyter is finally fixed. :-)
I hope it’s useful to you.
My apologies again, and thank you for your work!
Ludo’.
Attachment: file
Closed
?