Closed Adamantios closed 1 year ago
Another issue I just came across on https://github.com/valory-xyz/apy-oracle/pull/51/commits/25cde2cfa980f19d7115c33a20dbed45591a6e63:
Running:
autonomy analyse service --public-id valory/apy_estimation_demo
Gives:
[2023-03-24 19:14:31,800][INFO] Validating service overrides
[2023-03-24 19:14:31,800][INFO] Validating (skill, valory/apy_estimation_abci:0.1.0) from the service overrides
[2023-03-24 19:14:31,800][INFO] Validating agent overrides
[2023-03-24 19:14:31,800][INFO] Validating skill overrides
[2023-03-24 19:14:31,800][INFO] Cross verifying overrides between agent and service
Error: Service config has an overrides which are not defined in the agent config; packages with missing overrides={PackageId(skill, valory/apy_estimation_abci:0.1.0)}
This does not report what is missing from the agent config, which ends up requiring manual investigation.
Moreover, the error says that the override is missing from the agent configuration, but the reported package is a skill. Which one is true?
Regarding the APY issue, as @angrybayblade correctly pointed, the skill override is incorrect and instead has to be:
public_id: valory/apy_estimation_chained_abci:0.1.0
Relevant fix is on https://github.com/valory-xyz/apy-oracle/pull/51/commits/8a1a6184c8d489a48b57517f962609addabc36b7.
Two points:
open-autonomy v0.10.0
release?Warnings should be raised in cases when degenerate rounds are not chained.
[2023-04-01 21:43:14,049][INFO] Validating skill overrides Error: ABCI skill model parameter validation failed; 'reset_pause_duration' is a required property
It's not telling me which skill...
Overall very helpful command though!
thon3.10/site-packages/aea/helpers/env_vars.py", line 144, in convert_value_str_to_type
raise KeyError(f"{type_str}
is not a valid python data type")
KeyError: 'null
is not a valid python data type'
This was not caught by the analyzer.
And one more that could have been spotted:
Error: Package loading error: An error occurred while loading skill valory/governatooorr_abci:0.1.0: Traceback (most recent call last):
File "/home/ubuntu/agent/vendor/valory/skills/abstract_round_abci/models.py", line 108, in _ensure enforce(
File "/home/ubuntu/.local/lib/python3.10/site-packages/aea/exceptions.py", line 106, in enforce raise exception_class(exception_text)
aea.exceptions.AEAEnforceError: 'use_termination' of type '<class 'bool'>' required, but it is not set in models.params.args
of skill.yaml
of valory/governatooorr_abci:0.1.0
All certificates have been issued.
`--aev` flag is deprecated and will be removed in v2.0.0, usage of envrionment varibales is default now.
[2023-04-02 09:48:16,379] [WARNING] [agent] The kwargs={'broadcast_to_server': False, 'history_end': None, 'observation_interval': 300} passed to params have not been set!
Error: Package loading error: An error occurred while loading skill valory/governatooorr_abci:0.1.0: Traceback (most recent call last):
File "/home/ubuntu/agent/vendor/valory/skills/abstract_round_abci/models.py", line 342, in _ensure_setup
check_type(key, value, type_)
File "/home/ubuntu/agent/vendor/valory/skills/abstract_round_abci/utils.py", line 455, in check_type
raise err
packages.valory.skills.abstract_round_abci.utils.AutonomyTypeError: Error in field 'safe_contract_address'. Expected type <class 'str'>, got <class 'list'> (value: ['0x0000000000000000000000000000000000000000'])
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/agent/vendor/valory/skills/abstract_round_abci/models.py", line 344, in _ensure_setup
enforce(
File "/home/ubuntu/.local/lib/python3.10/site-packages/aea/exceptions.py", line 106, in enforce
raise exception_class(exception_text)
aea.exceptions.AEAEnforceError: 'safe_contract_address' must be a <class 'str'>, but type <class 'list'> was found in `models.params.args.setup` of `skill.yaml` of `valory/governatooorr_abci:0.1.0`
Service analyser did not detect this: https://github.com/valory-xyz/governatooorr/pull/14
Subject of the issue
The service analysis command is currently difficult to use. At the moment, I have detected the following issues:
Confusing error message
Running the service analyzer:
with consensus_threshold specified on the skill configuration, gives:
That is because the service does not specify the
consensus_threshold
, but the message incorrectly reports that it is missing from the skill.Configurations required in setup are reported as missing
If we go ahead and add the
consensus_threshold
in the service configuration, but do not place it under thesetup
, then it is reported as missing, instead of mentioning that theconsensus_threshold
was not found in thesetup
configuration.Incorrectly reporting as missing
If we fix all the issues reported by the tool, then it incorrectly performs the cross-verification:
Too verbose
The tool is too verbose. Even though everything is correct in the configurations on price-oracle@e2519777a136213a9824bf8c6e0b96198b216945, the tool reports all the following:
This makes it extremely hard to understand if something is going wrong.
Not being able to run the command on CI defeats its purpose
We should add the tool to our workflows, otherwise, we can still end up deploying a problematic service by human error.