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

Virtualization.rst is probably showing incorrect docker commands when calling the Docker class through job.virtualization #2300

Closed
dg1223 opened this issue Feb 27, 2024 · 2 comments

Comments

@dg1223
Copy link
Contributor

dg1223 commented Feb 27, 2024

Passing arguments such as Docker("docker://fedora:latest") throws TypeError.

Steps to reproduce

j = Job(name='dockertest')
j.virtualization = Docker("docker://fedora:latest")

Error

ERROR    !!Unknown/Unexpected ERROR!!
ERROR    If you're able to reproduce this please report this to the Ganga developers!
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[30], line 1
----> 1 j.virtualization = Docker("docker://fedora:latest")

File ~/Documents/GitHub/gsoc-2024/ganga/gangaenv/lib/python3.8/site-packages/ganga/GangaCore/GPIDev/Base/Proxy.py:883, in GPIProxyClassFactory.<locals>._init(self, *args, **kwds)
    881 elif arg_len < len(getfullargspec(pluginclass.__init__)[0]):
    882     clean_args = (stripProxy(arg) for arg in args)
--> 883     instance = pluginclass(*clean_args)
    884 else:
    885     # In the future we will just pass the args to the classes directly and throw excepions, but for now we're trying to maintain old behavior
    886     logger.warning("Cannot use arguments: '%s' for constructing class type '%s'. Ignoring." %
    887                    (args, getName(pluginclass)))

TypeError: __init__() missing 1 required positional argument: 'mode'

Same issue if I run j.virtualization = Docker("fedora:latest")

The following lines in the documentation Virtualization.rst contains these instructions:

line 42
j.virtualization = Docker("docker://fedora:latest")

line 81
j.virtualization = Docker("image:tag")
e.g.: j.virtualization = Docker("fedora:latest")

The command that works is:
j.virtualization = Docker(image="fedora:latest")

If this is a simple case of updating the documentation, I can do it soon. Thanks

@egede
Copy link
Member

egede commented Feb 27, 2024

Yes, just update documentation.

@mesmith75
Copy link
Contributor

Fixed by #2314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants