radon-h2020 / radon-functionhub-client

This command line client lets you interact with the functionHub at https://cloudstash.io
Apache License 2.0
1 stars 2 forks source link

502 when trying to upload a function #6

Closed sofusalbertsen closed 4 years ago

sofusalbertsen commented 4 years ago

Steps to reproduce:

  1. Login on cloudstash
  2. Create public repo called "saltest"
  3. Follow guide from https://functionhub-cli.readthedocs.io/en/latest/#pushing-functions-to-functionhub-using-cli config.ini looks like this:

[REPOSITORY] org = salbertsen repository = saltest [FUNCTION] name = Toy-Application version = 1.0.1 [RUNTIME] provider = aws runtime = python3

Uploading like this:


(venv) sofus@sofus-ZenBook-UX433FN-UX433FN:~/git/functionHub-client/exampleProject$ cli deploy hello.zip
deploy function Toy-Application to repository saltest
502```

End result:
No function is uploaded
naesheim commented 4 years ago

@sofusalbertsen Thank you for trying out the tool:) I have made some changes to the upload function. Please try again!

sofusalbertsen commented 4 years ago

I go the the new readme, but fail to do what it tells me to: pip install functionhub results in an error:

pip install functionhub
Collecting functionhub
  Could not find a version that satisfies the requirement functionhub (from versions: )
No matching distribution found for functionhub
sofusalbertsen commented 4 years ago

If you do not add the new description under function in config.ini you get the following bad exception:

sofus@sofus-ZenBook-UX433FN-UX433FN:~/git/functionHub-client/saltest$ fuhub upload hello.zip 
Traceback (most recent call last):
  File "/usr/lib/python3.6/configparser.py", line 789, in get
    value = d[option]
  File "/usr/lib/python3.6/collections/__init__.py", line 883, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "/usr/lib/python3.6/collections/__init__.py", line 875, in __missing__
    raise KeyError(key)
KeyError: 'description'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sofus/.local/lib/python3.6/site-packages/functionhub/main.py", line 54, in upload_function
    payload['description'] = config.get('FUNCTION','description')
  File "/usr/lib/python3.6/configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'description' in section: 'FUNCTION'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sofus/.local/bin/fuhub", line 11, in <module>
    sys.exit(fuhub())
  File "/home/sofus/.local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/sofus/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/sofus/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/sofus/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/sofus/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/sofus/.local/lib/python3.6/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/sofus/.local/lib/python3.6/site-packages/functionhub/main.py", line 64, in upload_function
    raise KeyError("unsupported key")
KeyError: 'unsupported key'
naesheim commented 4 years ago

Not a sexy error handling, I'll give you that;)