Open mariacarmina opened 1 week ago
this is not a CLI issue its a bug on Provider
It does NOT set self.algo
, if not going into that IF
self.algo = get_asset_from_metadatastore(get_metadata_url(), algorithm_did)
Then it calls Serialize class with algo being None
!
and breaks here:
self.algo_asset.metadata["algorithm"]["container"]
(self.algo_asset is not defined)
It should always call the get_asset_from_metadatastore
or get it in some other way at least
OR
it should be fixed here:
class StageAlgoSerializer:
...
def serialize(self):
algorithm_meta = self.algo_data.get("meta")
algorithm_did = self.algo_data.get("documentId")
algorithm_tx_id = self.algo_data.get("transferTxId")
....
dict_template["container"] = self.algo_asset.metadata["algorithm"]["container"]
...
If algo_asset
is not defined, we should read dict_template["container"]
from algorithm_meta
instead
dict_template["container"] =algorithm_meta.get("container")
I put it here, because I tested using it. @paulo-ocean I make the issue in order to be transparent also for @alexcos20. I set here two options depending how @alexcos20 wants to move on:
Either we modify provider code, either we modify ocean-cli at
meta
field for algorithm.
We know the problem, we know both root causes. Let's see if we are ok to deply a new provider or a new ocean-cli, in both cases we need a release.
one is the correct fix, other is a workaround to make it work, taking advantage of an existing bug, 2 wrongs don't make a right :-)
Let @alexcos20 decide, he has the last word on which component we can do the change/release.
How long are we planning to support the existing provider for? It may not be worth the effort, we just tell everyone to use the node.
Currently there is a check in our as-is provider regarding algorithm metadata:
Either we modify provider code, either we modify ocean-cli at
meta
filed for algorithm. I'll let this as discussion item. Here is my run logs: