threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

referencing a package's kwargs fails #474

Closed DylanVerstraete closed 4 years ago

DylanVerstraete commented 4 years ago

To reproduce:

Will produce following error:

--SOURCE: GEDIS SERVER 127.0.0.1:8901 SOURCE METHOD: zerobot.packagemanager.package_manager.package_add-20--
Tue 24 09:05:47 n-service/package.py -   6 - start                              : EXCEPTION:
    AttributeError("'Package' object has no attribute 'install_kwargs'",)
--TRACEBACK------------------
/sandbox/lib/jumpscale/Jumpscale/servers/gedis/handlers.py in _handle_request
    417    result = cmd_method(*params_list, user_session=user_session, **params_dict)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/Decorators.py in wrapper_action
    65    res = func(self, **kwargs)
/sandbox/code/github/threefoldtech/jumpscaleX_threebot/ThreeBotPackages/zerobot/packagemanager/actors/package_manager.py in package_add
    86    package.start()
/sandbox/lib/jumpscale/Jumpscale/tools/threebot_package/ThreeBotPackage.py in start
    315    self._package_author.start()
/sandbox/code/github/threefoldfoundation/tft-stellar/ThreeBotPackages/conversion-service/package.py in start
    6    DOMAIN = self.install_kwargs.get("domain") or "testnet.threefoldtoken.io"
-----------------------------

Tue 24 09:05:47 edisClientFactory.py -  58 - _handle_error                      : EXCEPTION:
    GEDIS SERVER 127.0.0.1:8901 SOURCE METHOD: zerobot.packagemanager.package_manager.package_add
--TRACEBACK------------------
<stdin> in <module>
    1
/sandbox/var/codegen/gedis/pm/client/zerobot.packagemanager_package_manager.py in package_add
    132    self.handle_error(e,1,cmd_name=cmd_name)
/sandbox/var/codegen/gedis/pm/client/zerobot.packagemanager_package_manager.py in handle_error
    389    return j.clients.gedis._handle_error(e,source=source,cmd_name=cmd_name,redis=self._redis)
/sandbox/lib/jumpscale/Jumpscale/clients/gedis/GedisClientFactory.py in _handle_error
    58    raise j.exceptions.RemoteException(message=msg)
-----------------------------

We try to reference install_kwargs inside a threebot package package.py file. See following statement:

https://github.com/threefoldfoundation/tft-stellar/blob/1258faf9278a7d6f0cad3600fd7acc4161a550db/ThreeBotPackages/conversion-service/package.py#L6

This used to work and now its broken.

xmonader commented 4 years ago

After editing the package.py to follow https://github.com/threefoldtech/jumpscaleX_threebot/blob/unstable/docs/packages.md#custom-configs-for-package

image

and after that image

Will put in verification and please feel free to close it

john-kheir commented 4 years ago

Verified