Giter Club home page Giter Club logo

Comments (11)

CermakM avatar CermakM commented on May 31, 2024 1

Thanks @rosscdh ! We're up with 0.1.0-rc0 https://pypi.org/project/argo-workflows-dsl/0.1.0rc0/ 👍

from argo-python-dsl.

CermakM avatar CermakM commented on May 31, 2024

Hello @Omenien,

This is strange, the spec.arguments shouldn't really be NoneType... can you please check whether you can reproduce the issue in Python 3.6?

Cheers,
M

from argo-python-dsl.

edwardrjones97 avatar edwardrjones97 commented on May 31, 2024

It looks like it's happening for me with Python 3.6 as well.
python3.6 artifact-passing.py

Traceback (most recent call last):
  File "artifact-passing.py", line 49, in <module>
    workflow_instance.submit(argo_api, "argo", parameters={"test_param": "some_value"})
  File ".../venv2/lib/python3.6/site-packages/argo/workflows/dsl/_workflow.py", line 416, in submit
    self.spec.arguments.parameters = new_parameters
AttributeError: 'NoneType' object has no attribute 'parameters'

Here's what's installed into that Python 3.6 environment:
python3.6 -m pip freeze

argo-workflows==3.0.2
argo-workflows-dsl==0.1.0.dev0
cachetools==4.0.0
certifi==2019.11.28
chardet==3.0.4
google-auth==1.11.2
idna==2.9
inflection==0.3.1
kubernetes==10.0.1
mock==4.0.1
oauthlib==3.1.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
python-dateutil==2.8.1
PyYAML==5.3
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
six==1.14.0
urllib3==1.25.8
websocket-client==0.57.0

and the specific version of Python 3.6:

Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux

from argo-python-dsl.

rosscdh avatar rosscdh commented on May 31, 2024

+1 same behaviour here.

(Pdb) dir(instance.spec.arguments)

['__bool__', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']

(Pdb) dir(instance.spec.arguments.parameters)
*** AttributeError: 'NoneType' object has no attribute 'parameters'

from argo-python-dsl.

rosscdh avatar rosscdh commented on May 31, 2024

hacked it on _workflow.py:416 but it looks like attributes is not being incarnated as V1alpha1Arguments as on line 350 arguments: V1alpha1Arguments = props.get("arguments")

props in this case appears to be None.... thus arguments is none

            if not self.spec.arguments:
                self.spec.arguments = V1alpha1Arguments(artifacts=[], parameters={})

from argo-python-dsl.

CermakM avatar CermakM commented on May 31, 2024

@Omenien just submitted a PR for it, feel free to check it out and let me know :)

The problem here was (and I did not notice it initially, sorry about that), that the Workflow doesn't expect any parameters. You should have the following in the Workflow definition:

class ArtifactPassing(Workflow):
    arguments = V1alpha1Arguments(parameters=[V1alpha1Parameter(name="test_param")])
    ...

I made some changes so that this case is checked for and an error is raised accordingly, therefore it is more informative for users.

from argo-python-dsl.

CermakM avatar CermakM commented on May 31, 2024

@rosscdh BTW, it's good to have you here, since I don't know how to contact you otherwise... I noticed that you created a package for this already: https://pypi.org/project/argo-workflows-dsl/ which is quite unfortunate for me as I am about to release 0.1 and I cannot use my standard release process for it.

Would you mind giving me ownership of that package so that I could plug it into my release pipeline along with https://pypi.org/project/argo-workflows/?

Cheers,
M

from argo-python-dsl.

rosscdh avatar rosscdh commented on May 31, 2024

Hi @CermakM absolutely! sorry I meant to raise it with you! More than happy to release!

from argo-python-dsl.

rosscdh avatar rosscdh commented on May 31, 2024

@CermakM I've deleted the PyPi project feel free to take ownership

from argo-python-dsl.

rosscdh avatar rosscdh commented on May 31, 2024

fyi pypi/warehouse#7495

from argo-python-dsl.

rosscdh avatar rosscdh commented on May 31, 2024

Thanks for this good looking project! made working with the workflows allot simpler

from argo-python-dsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.