reanahub / reana-workflow-engine-yadage

REANA Workflow Engine Yadage
http://reana-workflow-engine-yadage.readthedocs.io/
MIT License
0 stars 32 forks source link

setup: upgrading to `adage==0.10.2` breaks yadage workflows #220

Closed mvidalgarcia closed 2 years ago

mvidalgarcia commented 2 years ago

After upgrading toadage==0.10.2, it's required to upgrade networkx>=2.4. This makes our yadage workflows fail on the workflow engine side. The jobs finished successfully but there's a problem afterward, perhaps when the visualization files are generated.

$ reana-client logs -w hello-yadage.1
==> Workflow engine logs
Workflow exited unexpectedly.
Command 'convert -delay 50 $(ls /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/*.png|sort) /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/workflow.gif' returned non-zero exit status 1.
2022-02-02 10:08:28,350 | yadage.creators | MainThread | INFO | initializing workflow with initdata: {'helloworld': 'code/helloworld.py', 'inputfile': 'data/names.txt', 'sleeptime': 0} discover: True relative: True
2022-02-02 10:08:28,350 | adage.pollingexec | MainThread | INFO | preparing adage coroutine.
2022-02-02 10:08:28,350 | adage | MainThread | INFO | starting state loop.
2022-02-02 10:08:28,387 | yadage.wflowview | MainThread | INFO | added </init:0|defined|unknown>
2022-02-02 10:08:28,562 | yadage.wflowview | MainThread | INFO | added </helloworld:0|defined|unknown>
2022-02-02 10:08:28,655 | adage.pollingexec | MainThread | INFO | submitting nodes [</init:0|defined|known>]
2022-02-02 10:08:28,709 |       pack.init.step |   INFO | publishing data: <TypedLeafs: {'helloworld': '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/code/helloworld.py', 'inputfile': '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/data/names.txt', 'sleeptime': 0}>
2022-02-02 10:08:28,709 | adage | MainThread | INFO | unsubmittable: 0 | submitted: 0 | successful: 0 | failed: 0 | total: 2 | open rules: 0 | applied rules: 2
2022-02-02 10:08:43,824 | adage.node | MainThread | INFO | node ready </init:0|success|known>
2022-02-02 10:08:43,824 | adage.pollingexec | MainThread | INFO | submitting nodes [</helloworld:0|defined|known>]
2022-02-02 10:08:44,196 | reana-workflow-engine-yadage | MainThread | INFO | Submitted job with id: ec9c6a38-5da1-4abf-92f2-1d51c8884aae
2022-02-02 10:08:44,196 | adage | MainThread | INFO | unsubmittable: 0 | submitted: 0 | successful: 1 | failed: 0 | total: 2 | open rules: 0 | applied rules: 2
2022-02-02 10:08:59,379 | adage.node | MainThread | INFO | node ready </helloworld:0|success|known>
2022-02-02 10:08:59,379 | adage | MainThread | INFO | unsubmittable: 0 | submitted: 0 | successful: 2 | failed: 0 | total: 2 | open rules: 0 | applied rules: 2
2022-02-02 10:09:14,398 | adage.controllerutils | MainThread | INFO | no nodes can be run anymore and no rules are applicable
2022-02-02 10:09:14,399 | adage.controllerutils | MainThread | INFO | no nodes can be run anymore and no rules are applicable
2022-02-02 10:09:14,399 | adage | MainThread | INFO | unsubmittable: 0 | submitted: 0 | successful: 2 | failed: 0 | total: 2 | open rules: 0 | applied rules: 2
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
Error: <stdin>: syntax error in line 1 near '{'
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_00.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_01.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_02.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_03.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_04.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_05.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_06.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_07.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_08.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_09.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_10.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_11.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_12.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_13.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_14.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_15.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_16.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_17.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_18.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_19.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_20.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_21.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_22.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_23.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_24.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_25.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_26.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_27.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_28.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_29.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_30.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_31.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_32.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_33.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_34.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_35.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_36.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_37.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_38.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_39.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: improper image header `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/track/dag_40.png' @ error/png.c/ReadPNGImage/4092.
convert-im6.q16: no images defined `/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/_yadage/adage/workflow.gif' @ error/convert.c/ConvertImageCommand/3258.
2022-02-02 10:09:15,113 | yadage.steering_api | MainThread | INFO | done. dumping workflow to disk.
Couldn't import dot_parser, loading of dot files will not be possible.

==> Job logs
==> Step: helloworld
==> Workflow ID: 1bb4b9de-3d77-452e-8d59-c49be4086293
==> Compute backend: Kubernetes
==> Job ID: reana-run-job-d300724b-021e-4893-b276-8a18026766d5
==> Docker image: python:2.7-slim
==> Command: python "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/code/helloworld.py" --sleeptime 0 --inputfile "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/data/names.txt" --outputfile "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/helloworld/greetings.txt"
==> Status: finished
==> Finished: 2022-02-02T10:08:59
==> Logs:
job: :
 2022-02-02T10:08:44 INFO     Parameters: inputfile=/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/data/names.txt outputfile=/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/1bb4b9de-3d77-452e-8d59-c49be4086293/helloworld/greetings.txt sleeptime=0.0

Completed

With adage==0.10.1 (and networkx==1.11) everything runs as usual.

Adage release: https://github.com/yadage/adage/releases/tag/v0.10.2

mvidalgarcia commented 2 years ago

@matthewfeickert @lukasheinrich maybe you have some ideas on what's going on here?

matthewfeickert commented 2 years ago

With adage==0.10.1 (and networkx==1.11) everything runs as usual.

From the job logs it looks like you're running python:2.7-slim. We don't support Python 2, and haven't for a while, but it was only in adage v0.10.2 that this got properly reflected with python_requires (to keep from breaking Python 2 installs).

After upgrading toadage==0.10.2, it's required to upgrade networkx>=2.4

The reason for setting lower bounds on networkx is to allow for Python 3.9+ support. c.f.

for more details.

Though if you're running Python 2, I'm not sure how you ever installed adage==0.10.2. :? Is it because in https://github.com/mvidalgarcia/reana-workflow-engine-yadage/commit/b9e1eecf87ad4d357cb7e716a73b3fc9144a81cb you're using pip-tools to compile your dependencies outside of your runtime and so creating situations in which pip-tools can resolve things in a Python 3 environment but your Python 2 runtime can't?

matthewfeickert commented 2 years ago

It also looks like your install_requires has additional situations in which you'd create conflicts from pinning dependencies

https://github.com/reanahub/reana-workflow-engine-yadage/blob/ac194f6d2972ea77642ba5d3f10d2da2173fff0e/setup.py#L43-L55

so I'm not sure how pip-tools is resolving those in anyway that wouldn't give a breaking build if you installed adage==0.10.2.

mvidalgarcia commented 2 years ago

I'm not running Python 2, that's just the container where the job is being run. The Yadage workflow engine uses Python 3.8.

matthewfeickert commented 2 years ago

I'm not running Python 2, that's just the container where the job is being run. The Yadage workflow engine uses Python 3.8.

:+1: and I see that you're using pip-tools (also :+1:)

https://github.com/reanahub/reana-workflow-engine-yadage/blob/ac194f6d2972ea77642ba5d3f10d2da2173fff0e/requirements.txt#L5

to produce a requirements lockfile that has

https://github.com/reanahub/reana-workflow-engine-yadage/blob/ac194f6d2972ea77642ba5d3f10d2da2173fff0e/requirements.txt#L7 https://github.com/reanahub/reana-workflow-engine-yadage/blob/ac194f6d2972ea77642ba5d3f10d2da2173fff0e/requirements.txt#L32

So unless you're also updating your setup.py to avoid having pins like

https://github.com/reanahub/reana-workflow-engine-yadage/blob/ac194f6d2972ea77642ba5d3f10d2da2173fff0e/setup.py#L47

there's never going to be a way for you to have pip-tools properly resolve things where you're giving pip-tools a scenario with adage>=0.10.2.

Example: ```console $ docker run --rm -ti python:3.9 /bin/bash root@cb127e75ef9f:/# python -m venv venv && . venv/bin/activate (venv) root@cb127e75ef9f:/# python -m pip install --upgrade 'pip<22.0' wheel pip-tools # at time of example bug with pip and pip-tools root@cb127e75ef9f:/# printf "adage>=0.10.2\nnetworkx==1.11\n" > requirements.txt root@cb127e75ef9f:/# cat requirements.txt adage>=0.10.2 networkx==1.11 (venv) root@cb127e75ef9f:/# python -m piptools compile --generate-hashes --output-file requirements.lock requirements.txt Could not find a version that matches networkx==1.11,>=2.4 (from -r requirements.txt (line 2)) Tried: 0.34, 0.34, 0.35, 0.35, 0.35.1, 0.35.1, 0.36, 0.36, 0.37, 0.37, 0.99, 0.99, 1.0, 1.0, 1.0.1, 1.0.1, 1.1, 1.1, 1.2, 1.2, 1.3, 1.3, 1.4, 1.4, 1.5, 1.5, 1.6, 1.6, 1.7, 1.7, 1.8, 1.8, 1.8.1, 1.8.1, 1.9, 1.9, 1.9, 1.9.1, 1.9.1, 1.9.1, 1.10, 1.10, 1.11, 1.11, 1.11, 2.0, 2.1, 2.2, 2.3, 2.4, 2.4, 2.5, 2.5, 2.5.1, 2.5.1, 2.6, 2.6, 2.6.1, 2.6.1, 2.6.2, 2.6.2, 2.6.3, 2.6.3 Skipped pre-versions: 1.0rc1, 1.0rc1, 1.2rc1, 1.2rc1, 1.3rc1, 1.3rc1, 1.4rc1, 1.4rc1, 1.5rc1, 1.5rc1, 1.6rc1, 1.6rc1, 1.7rc1, 1.7rc1, 1.8rc1, 1.8rc1, 1.9rc1, 1.9rc1, 1.9rc1, 1.10rc2, 1.10rc2, 1.10rc2, 1.11rc1, 1.11rc1, 1.11rc2, 1.11rc2, 1.11rc2, 2.2rc1, 2.3rc3, 2.3rc4, 2.4rc1, 2.4rc2, 2.4rc2, 2.5rc1, 2.5rc1, 2.6rc1, 2.6rc1, 2.6rc2, 2.6rc2 There are incompatible versions in the resolved dependencies: networkx==1.11 (from -r requirements.txt (line 2)) networkx>=2.4 (from adage==0.10.2->-r requirements.txt (line 1)) root@cb127e75ef9f:/# printf "adage>=0.10.2\nnetworkx\n" > requirements.txt root@cb127e75ef9f:/# cat requirements.txt adage>=0.10.2 networkx (venv) root@cb127e75ef9f:/# python -m piptools compile --generate-hashes --output-file requirements.lock requirements.txt # # This file is autogenerated by pip-compile with python 3.9 # To update, run: # # pip-compile --generate-hashes --output-file=requirements.lock requirements.txt # adage==0.10.2 \ --hash=sha256:9327e256226070ccf69477e7689ac81a3c1a792eadad5ba45749a6a46fdfdac8 \ --hash=sha256:f03a80773f1267463f9054cca8e53108b1eefe2f9056fba643a0070d41e429a4 # via -r requirements.txt networkx==2.6.3 \ --hash=sha256:80b6b89c77d1dfb64a4c7854981b60aeea6360ac02c6d4e4913319e0a313abef \ --hash=sha256:c0946ed31d71f1b732b5aaa6da5a0388a345019af232ce2f49c766e2d6795c51 # via # -r requirements.txt # adage ```

Am I missing something here about what you're doing? Or are you saying that you're already removing the pins and then letting pip-tools do the resolution and then you're getting the bug?

mvidalgarcia commented 2 years ago

Or are you saying that you're already removing the pins and then letting pip-tools do the resolution and then you're getting the bug?

Exactly this. Sorry for the misunderstanding.

matthewfeickert commented 2 years ago

Exactly this. Sorry for the misunderstanding.

Okay cool. :+1: Can you give me a branch that has a minimal failing example? I know that you've already explained that apparently removing the networkx requirement is causing this, but it would be helpful to see exactly what is being done.

matthewfeickert commented 2 years ago

Couldn't import dot_parser, loading of dot files will not be possible.

(Thanks to @lukasheinrich for pointing out that I missed this.)

@mvidalgarcia Sorry can you also try installing pydot? pydot2 hasn't released since 2014 and doesn't support Python 3.9+ (c.f. https://github.com/yadage/adage/pull/17) so I'm now treating it as abandoned/deprecated.

My guess is from

https://github.com/reanahub/reana-workflow-engine-yadage/blob/ac194f6d2972ea77642ba5d3f10d2da2173fff0e/setup.py#L49-L50

this is because of us (or at least the yadage[viz] extra being a bit broken at the moment so everyone has been installing its extra dependencies by hand). Can you try again with adding pydot in and then if that works try removing pydot2 as well?


edit: I'm trying with

$ git diff origin/master -- setup.py
diff --git a/setup.py b/setup.py
index 0fce759..c6b6b3a 100644
--- a/setup.py
+++ b/setup.py
@@ -44,9 +44,7 @@ install_requires = [
     "checksumdir>=1.1.4,<1.2",
     "graphviz>=0.12",  # FIXME needed only if yadage visuale=True.
     "mock>=3.0,<4",
-    "networkx==1.11",
-    "packtivity==0.14.21",
-    "pydot2>=1.0.33",  # FIXME needed only if yadage visuale=True.
+    "pydot>=1.0.29",  # FIXME needed only if yadage visuale=True.
     "pydotplus>=2.0.2",  # FIXME needed only if yadage visuale=True.
     "pygraphviz>=1.5",  # FIXME needed only if yadage visuale=True.
     "reana-commons[yadage]>=0.8.0,<0.9.0",

at the moment, and then updating the requirements.txt with pip-tools

$ git diff origin/master -- requirements.txt | grep '==' | grep '+' | grep 'adage\|packtivity\|pydot'
+adage==0.10.2
+packtivity==0.14.24
+pydot==1.4.2
+pydotplus==2.0.2
+reana-commons[yadage]==0.8.2
+yadage==0.20.1
+yadage-schemas==0.10.7

which I can get to build fine with

./run-tests.sh --check-docker-build

but I'm not clear on how to run your minimal failing example.

mvidalgarcia commented 2 years ago

@matthewfeickert Your diff did the trick! Indeed it seems the error was caused by pydot2. I'm running some examples locally and they're working now, no adage pinning needed. I'll push my changes soon to this PR.

Thanks for the quick reaction!

Edit: Here are the changes: https://github.com/reanahub/reana-workflow-engine-yadage/compare/4b6e2bd8b37566ffef132291fb32ef796a3c3a7b..25d17851d37ec285c9103a15b1cf3b8c0c856623

matthewfeickert commented 2 years ago

Your diff did the trick! Indeed it seems the error was caused by pydot2. I'm running some examples locally and they're working now, no adage pinning needed. I'll push my changes soon to this PR.

@mvidalgarcia Great! :) Yeah, sorry about all of this as this is indeed the fault of recent yadage org stuff as we've been trying to clean things up. Specifically, when going to adage v0.10.2 we switched to using the networkx v2.X API (https://github.com/yadage/adage/pull/18) and the networkx v2 API change brought with it a lot of related changes for graphviz visualization (c.f. https://github.com/networkx/networkx/pull/2272).

On the upside though, I've made an adage v0.10.3 and am working on getting a yadage v0.20.2 which should have this visualization stuff sorted out in their viz extras so you won't need to mess with any of the stuff in setup.py that currently has the # FIXME needed only if yadage visuale=True. comment (c.f. https://github.com/yadage/adage/pull/25, https://github.com/yadage/yadage/pull/108). You should be able to just do yadage[viz]. :+1: I'll still work on getting pydotplus removed though in a later release (https://github.com/yadage/yadage/issues/106).

matthewfeickert commented 2 years ago

The regression seen in https://github.com/reanahub/reana-workflow-engine-yadage/pull/219 is caused by https://github.com/yadage/yadage/issues/116.