From c1edb27ae8bfecba8ab04ba54d246f5fecc477b5 Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Wed, 15 Nov 2023 14:01:22 +0530 Subject: [PATCH 1/9] fix: pin `openapi-core==0.15.0` and `openapi-spec-validator<0.5.0,>=0.4.0` --- Pipfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pipfile b/Pipfile index 2423afd6c0..f0d93d79fb 100644 --- a/Pipfile +++ b/Pipfile @@ -30,8 +30,8 @@ liccheck = "==0.6.0" memory-profiler = "==0.57.0" # ^ still used? numpy = ">=1.18.1" -openapi-core = "==0.13.2" -openapi-spec-validator = "==0.2.8" +openapi-core = "==0.15.0" +openapi-spec-validator = "<0.5.0,>=0.4.0" packaging = "<24.0,>=23.1" pexpect = "==4.8.0" protobuf = "<5.0.0,>=4.21.6" From 5960aed82ba1e483365040475ddcaa973c5b874f Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Wed, 15 Nov 2023 14:05:41 +0530 Subject: [PATCH 2/9] fix: pin across packages --- docs/http-connection-and-skill.md | 2 +- docs/http-echo-demo.md | 2 +- packages/open_aea/agents/http_echo/aea-config.yaml | 2 +- packages/packages.json | 4 ++-- packages/valory/connections/http_server/connection.yaml | 4 ++-- .../test_bash_yaml/md_files/bash-http-connection-and-skill.md | 4 ++-- .../test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md | 2 +- tox.ini | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/http-connection-and-skill.md b/docs/http-connection-and-skill.md index 6056867697..33037ad890 100644 --- a/docs/http-connection-and-skill.md +++ b/docs/http-connection-and-skill.md @@ -29,7 +29,7 @@ Add the http server connection package: mkdir packages aea create my_aea cd my_aea -aea add connection valory/http_server:0.22.0:bafybeid4nl6ruidpto3ynwjmc76nf42egcroqlhqq6krh2onwktu4ywpne --remote +aea add connection valory/http_server:0.22.0:bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q --remote aea push connection valory/http_server --local aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local diff --git a/docs/http-echo-demo.md b/docs/http-echo-demo.md index f90426d248..dd24a5d9b1 100644 --- a/docs/http-echo-demo.md +++ b/docs/http-echo-demo.md @@ -16,7 +16,7 @@ The easiest way to get started with the http server is to use our pre-built exam ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeiah75oosb24i3nwtbotqjd44waxg7ldmxgle4iiumemgbrvlosxsu --remote +aea fetch open_aea/http_echo:0.1.0:bafybeiei7k6gtivyh25cxlicpghcyile2yzoefmqmkaakvsyc6b5znkv3u --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install diff --git a/packages/open_aea/agents/http_echo/aea-config.yaml b/packages/open_aea/agents/http_echo/aea-config.yaml index 27ad4d6ad4..3bc58a98fc 100644 --- a/packages/open_aea/agents/http_echo/aea-config.yaml +++ b/packages/open_aea/agents/http_echo/aea-config.yaml @@ -8,7 +8,7 @@ fingerprint: README.md: bafybeibkr6ecv5efx3hwxvxposvpmr76ugrj6kydeasb7bppo3ibynnjcu fingerprint_ignore_patterns: [] connections: -- valory/http_server:0.22.0:bafybeid4nl6ruidpto3ynwjmc76nf42egcroqlhqq6krh2onwktu4ywpne +- valory/http_server:0.22.0:bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q contracts: [] protocols: - fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm diff --git a/packages/packages.json b/packages/packages.json index 5b93c1bde5..6bf9e09f61 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -9,7 +9,7 @@ "protocol/valory/ledger_api/1.0.0": "bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru", "connection/fetchai/stub/0.21.0": "bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi", "connection/valory/ledger/0.19.0": "bafybeia47rr37ianvwsh77tjjpv3nwif5sywhhy2fbdshnz4a2icwln76a", - "connection/valory/http_server/0.22.0": "bafybeid4nl6ruidpto3ynwjmc76nf42egcroqlhqq6krh2onwktu4ywpne", + "connection/valory/http_server/0.22.0": "bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q", "connection/valory/p2p_libp2p/0.1.0": "bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq", "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiajf6msadxrr2rgkgebwlzoiznxdccsyzjopm2pkommcgcamsw27m", @@ -26,7 +26,7 @@ "agent/fetchai/gym_aea/0.25.0": "bafybeif5c657r3ixuosbyihtsdzr2tqifikxgy5e6t7ur2jmhtiolina3m", "agent/fetchai/my_first_aea/0.27.0": "bafybeicrgya4gln4lqr3ba76t2cuyik37lcgr64kzna2fkoseseobytaa4", "agent/open_aea/gym_aea/0.1.0": "bafybeibyyl4wtnrfxeoed3kjnlftphkcikdqrgf76u34v4wbvwgsqfqrgy", - "agent/open_aea/http_echo/0.1.0": "bafybeiah75oosb24i3nwtbotqjd44waxg7ldmxgle4iiumemgbrvlosxsu", + "agent/open_aea/http_echo/0.1.0": "bafybeiei7k6gtivyh25cxlicpghcyile2yzoefmqmkaakvsyc6b5znkv3u", "agent/open_aea/my_first_aea/0.1.0": "bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm", "connection/fetchai/local/0.20.0": "bafybeigukufpgy2sdkv5qqde47dhigbjitxcrxwg6sl6unlpbc7wbxqyhm", "connection/valory/http_client/0.23.0": "bafybeiddrfvomrmgvh5yuv2coq7ci72wcdf663stayi3m5aawnj4srggce", diff --git a/packages/valory/connections/http_server/connection.yaml b/packages/valory/connections/http_server/connection.yaml index c48d68829a..57780d1b0d 100644 --- a/packages/valory/connections/http_server/connection.yaml +++ b/packages/valory/connections/http_server/connection.yaml @@ -35,8 +35,8 @@ dependencies: aiohttp: version: <4.0.0,>=3.8.5 openapi-core: - version: ==0.13.2 + version: ==0.15.0 openapi-spec-validator: - version: ==0.2.8 + version: <0.5.0,>=0.4.0 werkzeug: {} is_abstract: false diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md index 91df6b652a..e1604e27e6 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md @@ -3,7 +3,7 @@ aea create my_aea cd my_aea ``` ``` bash -aea add connection valory/http_server:0.22.0:bafybeid4nl6ruidpto3ynwjmc76nf42egcroqlhqq6krh2onwktu4ywpne --remote +aea add connection valory/http_server:0.22.0:bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q --remote ``` ``` bash aea config set agent.default_connection valory/http_server:0.22.0 @@ -48,7 +48,7 @@ models: mkdir packages aea create my_aea cd my_aea -aea add connection valory/http_server:0.22.0:bafybeid4nl6ruidpto3ynwjmc76nf42egcroqlhqq6krh2onwktu4ywpne --remote +aea add connection valory/http_server:0.22.0:bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q --remote aea push connection valory/http_server --local aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md index 3779cd16a7..cc002ec811 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md @@ -1,6 +1,6 @@ ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeiah75oosb24i3nwtbotqjd44waxg7ldmxgle4iiumemgbrvlosxsu --remote +aea fetch open_aea/http_echo:0.1.0:bafybeiei7k6gtivyh25cxlicpghcyile2yzoefmqmkaakvsyc6b5znkv3u --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install diff --git a/tox.ini b/tox.ini index d9f49d814b..249e45d0b0 100644 --- a/tox.ini +++ b/tox.ini @@ -17,8 +17,8 @@ deps = gym==0.15.6 hypothesis==6.21.6 numpy>=1.18.1 - openapi-core==0.13.2 - openapi-spec-validator==0.2.8 + openapi-core==0.15.0 + openapi-spec-validator<0.5.0,>=0.4.0 asn1crypto<1.5.0,>=1.4.0 tomte[tests]==0.2.13 From 77ac2b567baa1ed324eb99761ea44a31eb6d677d Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Wed, 15 Nov 2023 14:14:11 +0530 Subject: [PATCH 3/9] fix: pin `protobuf<4.25.0,>=4.21.6` --- Pipfile | 2 +- plugins/aea-ledger-ethereum-hwi/setup.py | 2 +- setup.py | 2 +- tox.ini | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Pipfile b/Pipfile index f0d93d79fb..62a5af6b8e 100644 --- a/Pipfile +++ b/Pipfile @@ -34,7 +34,7 @@ openapi-core = "==0.15.0" openapi-spec-validator = "<0.5.0,>=0.4.0" packaging = "<24.0,>=23.1" pexpect = "==4.8.0" -protobuf = "<5.0.0,>=4.21.6" +protobuf = "<4.25.0,>=4.21.6" psutil = "==5.7.0" pycryptodome = ">=3.10.1" pytest-custom-exit-code = "==0.3.0" diff --git a/plugins/aea-ledger-ethereum-hwi/setup.py b/plugins/aea-ledger-ethereum-hwi/setup.py index 98b9ffde93..b3c1f41081 100644 --- a/plugins/aea-ledger-ethereum-hwi/setup.py +++ b/plugins/aea-ledger-ethereum-hwi/setup.py @@ -44,7 +44,7 @@ "eth-account>=0.8.0,<0.9.0", "open-aea-ledger-ethereum~=1.41.0.post1", "ledgerwallet==0.1.3", - "protobuf>=4.21.6,<5.0.0", + "protobuf>=4.21.6,<4.25.0", "construct<=2.10.61", ], tests_require=["pytest"], diff --git a/setup.py b/setup.py index a6758d0a27..5bda63ec5c 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ def get_all_extras() -> Dict: "base58>=1.0.3,<3.0.0", "jsonschema<=4.19.0,>=4.16.0", "packaging>=23.1,<24.0", - "protobuf>=4.21.6,<5.0.0", + "protobuf>=4.21.6,<4.25.0", "pymultihash==0.8.2", "pyyaml==6.0.1", "requests==2.28.1", diff --git a/tox.ini b/tox.ini index 249e45d0b0..2cc2edba79 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,7 @@ deps = packaging<24.0,>=23.1 py-multibase>=1.0.0 py-multicodec>=0.2.0 - protobuf<5.0.0,>=4.21.6 + protobuf<4.25.0,>=4.21.6 requests==2.28.1 mistune==2.0.3 tomte[isort]==0.2.13 From 7ca46f8d1fa1c750febe64bb322dc9ef3ea3906a Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Fri, 17 Nov 2023 15:12:14 +0530 Subject: [PATCH 4/9] feat: port deprecated functionalities from openapi-core --- .../connections/http_server/connection.py | 43 ++++++++++++++++--- setup.cfg | 3 ++ 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/packages/valory/connections/http_server/connection.py b/packages/valory/connections/http_server/connection.py index 7d1bf33118..a814872f75 100644 --- a/packages/valory/connections/http_server/connection.py +++ b/packages/valory/connections/http_server/connection.py @@ -31,11 +31,11 @@ from typing import Any, Dict, Optional, cast from urllib.parse import parse_qs, urlparse +import attr from aiohttp import web from aiohttp.web_request import BaseRequest -from openapi_core import create_spec -from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters -from openapi_core.validation.request.shortcuts import validate_request +from openapi_core.schema.specs import Spec +from openapi_core.validation.request.datatypes import RequestParameters from openapi_core.validation.request.validators import RequestValidator from openapi_spec_validator.exceptions import ( # pylint: disable=wrong-import-order OpenAPIValidationError, @@ -115,6 +115,36 @@ def headers_to_string(headers: Dict) -> str: return msg.as_string() +@attr.s +class OpenAPIRequest: # pylint: disable=too-few-public-methods + """OpenAPI request dataclass. + + Attributes: + full_url_pattern + The matched url with scheme, host and path pattern. + For example: + https://localhost:8000/api/v1/pets + https://localhost:8000/api/v1/pets/{pet_id} + method + The request method, as lowercase string. + parameters + A RequestParameters object. + body + The request body, as string. + mimetype + Like content type, but without parameters (eg, without charset, + type etc.) and always lowercase. + For example if the content type is "text/HTML; charset=utf-8" + the mimetype would be "text/html". + """ + + full_url_pattern = attr.ib() + method = attr.ib() + body = attr.ib() + mimetype = attr.ib() + parameters = attr.ib(factory=RequestParameters) + + class Request(OpenAPIRequest): """Generic request object.""" @@ -159,7 +189,7 @@ async def create(cls, http_request: BaseRequest) -> "Request": path={}, ) - request = Request( + request = Request( # type: ignore full_url_pattern=str(url), method=method, parameters=parameters, @@ -258,7 +288,7 @@ def __init__( api_spec_dict = read_yaml_file(api_spec_path) if server is not None: api_spec_dict["servers"] = [{"url": server}] - api_spec = create_spec(api_spec_dict) + api_spec = Spec.create(data=api_spec_dict) self._validator = RequestValidator(api_spec) except OpenAPIValidationError as e: # pragma: nocover self.logger.error( @@ -282,7 +312,8 @@ def verify(self, request: Request) -> bool: return True try: - validate_request(self._validator, request) + result = self._validator.validate(request) + result.raise_for_errors() except Exception: # pragma: nocover # pylint: disable=broad-except self.logger.exception("APISpec verify error") return False diff --git a/setup.cfg b/setup.cfg index fd543d66d4..3e788dff5d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -324,6 +324,9 @@ ignore_missing_imports=True [mypy-toml.*] ignore_missing_imports=True +[mypy-attr.*] +ignore_missing_imports=True + [darglint] docstring_style=sphinx strictness=short From f7fcbebca6174abf36900ed5af2daed98920777f Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Fri, 17 Nov 2023 15:12:35 +0530 Subject: [PATCH 5/9] fix: pin jsonschema --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5bda63ec5c..64ec124869 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,6 @@ def get_all_extras() -> Dict: cli_deps = [ "click==8.0.2", "pyyaml==6.0.1", - "jsonschema<=4.19.0,>=4.16.0", "packaging>=23.1,<24.0", "pytest>=7.0.0,<7.3.0", "coverage>=6.4.4,<8.0.0", @@ -55,7 +54,7 @@ def get_all_extras() -> Dict: base_deps = [ "semver>=2.9.1,<3.0.0", "base58>=1.0.3,<3.0.0", - "jsonschema<=4.19.0,>=4.16.0", + "jsonschema<4.4.0,>=4.3.0", "packaging>=23.1,<24.0", "protobuf>=4.21.6,<4.25.0", "pymultihash==0.8.2", From af6625dee2872b6e3bb1fc544dd2ddc43b909e13 Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Fri, 17 Nov 2023 15:18:58 +0530 Subject: [PATCH 6/9] chore: hashes --- docs/http-connection-and-skill.md | 2 +- docs/http-echo-demo.md | 2 +- packages/open_aea/agents/http_echo/aea-config.yaml | 2 +- packages/packages.json | 4 ++-- packages/valory/connections/http_server/connection.yaml | 2 +- .../test_bash_yaml/md_files/bash-http-connection-and-skill.md | 4 ++-- .../test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/http-connection-and-skill.md b/docs/http-connection-and-skill.md index 33037ad890..acaf4ac7fc 100644 --- a/docs/http-connection-and-skill.md +++ b/docs/http-connection-and-skill.md @@ -29,7 +29,7 @@ Add the http server connection package: mkdir packages aea create my_aea cd my_aea -aea add connection valory/http_server:0.22.0:bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q --remote +aea add connection valory/http_server:0.22.0:bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe --remote aea push connection valory/http_server --local aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local diff --git a/docs/http-echo-demo.md b/docs/http-echo-demo.md index dd24a5d9b1..3377ea0ab7 100644 --- a/docs/http-echo-demo.md +++ b/docs/http-echo-demo.md @@ -16,7 +16,7 @@ The easiest way to get started with the http server is to use our pre-built exam ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeiei7k6gtivyh25cxlicpghcyile2yzoefmqmkaakvsyc6b5znkv3u --remote +aea fetch open_aea/http_echo:0.1.0:bafybeibf2bacu3jm7aqrw7tw3w6tnkkfq6vxtypgbe67q6u7plewnfupo4 --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install diff --git a/packages/open_aea/agents/http_echo/aea-config.yaml b/packages/open_aea/agents/http_echo/aea-config.yaml index 3bc58a98fc..5776d788cf 100644 --- a/packages/open_aea/agents/http_echo/aea-config.yaml +++ b/packages/open_aea/agents/http_echo/aea-config.yaml @@ -8,7 +8,7 @@ fingerprint: README.md: bafybeibkr6ecv5efx3hwxvxposvpmr76ugrj6kydeasb7bppo3ibynnjcu fingerprint_ignore_patterns: [] connections: -- valory/http_server:0.22.0:bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q +- valory/http_server:0.22.0:bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe contracts: [] protocols: - fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm diff --git a/packages/packages.json b/packages/packages.json index 6bf9e09f61..1ad6b965ea 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -9,7 +9,7 @@ "protocol/valory/ledger_api/1.0.0": "bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru", "connection/fetchai/stub/0.21.0": "bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi", "connection/valory/ledger/0.19.0": "bafybeia47rr37ianvwsh77tjjpv3nwif5sywhhy2fbdshnz4a2icwln76a", - "connection/valory/http_server/0.22.0": "bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q", + "connection/valory/http_server/0.22.0": "bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe", "connection/valory/p2p_libp2p/0.1.0": "bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq", "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiajf6msadxrr2rgkgebwlzoiznxdccsyzjopm2pkommcgcamsw27m", @@ -26,7 +26,7 @@ "agent/fetchai/gym_aea/0.25.0": "bafybeif5c657r3ixuosbyihtsdzr2tqifikxgy5e6t7ur2jmhtiolina3m", "agent/fetchai/my_first_aea/0.27.0": "bafybeicrgya4gln4lqr3ba76t2cuyik37lcgr64kzna2fkoseseobytaa4", "agent/open_aea/gym_aea/0.1.0": "bafybeibyyl4wtnrfxeoed3kjnlftphkcikdqrgf76u34v4wbvwgsqfqrgy", - "agent/open_aea/http_echo/0.1.0": "bafybeiei7k6gtivyh25cxlicpghcyile2yzoefmqmkaakvsyc6b5znkv3u", + "agent/open_aea/http_echo/0.1.0": "bafybeibf2bacu3jm7aqrw7tw3w6tnkkfq6vxtypgbe67q6u7plewnfupo4", "agent/open_aea/my_first_aea/0.1.0": "bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm", "connection/fetchai/local/0.20.0": "bafybeigukufpgy2sdkv5qqde47dhigbjitxcrxwg6sl6unlpbc7wbxqyhm", "connection/valory/http_client/0.23.0": "bafybeiddrfvomrmgvh5yuv2coq7ci72wcdf663stayi3m5aawnj4srggce", diff --git a/packages/valory/connections/http_server/connection.yaml b/packages/valory/connections/http_server/connection.yaml index 57780d1b0d..eabc4e80a9 100644 --- a/packages/valory/connections/http_server/connection.yaml +++ b/packages/valory/connections/http_server/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeifepluovb4so2eem34ulpcp4svegb2dqfpmtojtofhfkb3j2xanui __init__.py: bafybeifykou5sazojmc7hdqnsdp4mncd4zh3xys3mdgdzwks23mvhzu2ga - connection.py: bafybeidc6zysa47tppkvq3ddq4jgpind7h6zzpsl4s7vukbbj5y4ts2zxm + connection.py: bafybeiaaezj7bydkecqbe4kty3qqxrhjoc2ahckupey5o7tfj23xpota4u tests/__init__.py: bafybeifqaf7cnc4oczjkbwmv4ahrkbiqxrojwgowej3kbri3skz4lzt43i tests/data/certs/server.crt: bafybeiev5i3xxkvn36wflf633gkumuxexsw4y2bubwbvl7edrz4igfgv34 tests/data/certs/server.csr: bafybeicvp7xdl5w3o4bzikkudpduitss3bpp6xqfwlxbw6kabdangohy5u diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md index e1604e27e6..276fbdc0f3 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md @@ -3,7 +3,7 @@ aea create my_aea cd my_aea ``` ``` bash -aea add connection valory/http_server:0.22.0:bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q --remote +aea add connection valory/http_server:0.22.0:bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe --remote ``` ``` bash aea config set agent.default_connection valory/http_server:0.22.0 @@ -48,7 +48,7 @@ models: mkdir packages aea create my_aea cd my_aea -aea add connection valory/http_server:0.22.0:bafybeidnpomb7xalhxgvdrqpzbj2xatsjlpvc2v26xljcpmi34fiqajg5q --remote +aea add connection valory/http_server:0.22.0:bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe --remote aea push connection valory/http_server --local aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md index cc002ec811..ab0e99f5ef 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md @@ -1,6 +1,6 @@ ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeiei7k6gtivyh25cxlicpghcyile2yzoefmqmkaakvsyc6b5znkv3u --remote +aea fetch open_aea/http_echo:0.1.0:bafybeibf2bacu3jm7aqrw7tw3w6tnkkfq6vxtypgbe67q6u7plewnfupo4 --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install From 18cde968f67a5519ff4e6b0f6bb2c4dd84ad4ea2 Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Fri, 17 Nov 2023 15:49:51 +0530 Subject: [PATCH 7/9] fix: dependencies check --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 64ec124869..72bf7949c0 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,7 @@ def get_all_extras() -> Dict: "packaging>=23.1,<24.0", "pytest>=7.0.0,<7.3.0", "coverage>=6.4.4,<8.0.0", + "jsonschema<4.4.0,>=4.3.0", "semver>=2.9.1,<3.0.0", ] From bc8bcfd02002bc336411c01b2c4fb1a7d603bcce Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Fri, 17 Nov 2023 15:52:11 +0530 Subject: [PATCH 8/9] fix: define attrs as dependency --- docs/http-connection-and-skill.md | 2 +- docs/http-echo-demo.md | 2 +- packages/open_aea/agents/http_echo/aea-config.yaml | 2 +- packages/packages.json | 4 ++-- packages/valory/connections/http_server/connection.yaml | 1 + .../test_bash_yaml/md_files/bash-http-connection-and-skill.md | 4 ++-- .../test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/http-connection-and-skill.md b/docs/http-connection-and-skill.md index acaf4ac7fc..561982154f 100644 --- a/docs/http-connection-and-skill.md +++ b/docs/http-connection-and-skill.md @@ -29,7 +29,7 @@ Add the http server connection package: mkdir packages aea create my_aea cd my_aea -aea add connection valory/http_server:0.22.0:bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe --remote +aea add connection valory/http_server:0.22.0:bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe --remote aea push connection valory/http_server --local aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local diff --git a/docs/http-echo-demo.md b/docs/http-echo-demo.md index 3377ea0ab7..db2cf51ab5 100644 --- a/docs/http-echo-demo.md +++ b/docs/http-echo-demo.md @@ -16,7 +16,7 @@ The easiest way to get started with the http server is to use our pre-built exam ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeibf2bacu3jm7aqrw7tw3w6tnkkfq6vxtypgbe67q6u7plewnfupo4 --remote +aea fetch open_aea/http_echo:0.1.0:bafybeiahnlpss6zznrtxumilqtd4nxzx43gket2ntqje7uvq3j2kjzrgoy --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install diff --git a/packages/open_aea/agents/http_echo/aea-config.yaml b/packages/open_aea/agents/http_echo/aea-config.yaml index 5776d788cf..8b3d0a7a7e 100644 --- a/packages/open_aea/agents/http_echo/aea-config.yaml +++ b/packages/open_aea/agents/http_echo/aea-config.yaml @@ -8,7 +8,7 @@ fingerprint: README.md: bafybeibkr6ecv5efx3hwxvxposvpmr76ugrj6kydeasb7bppo3ibynnjcu fingerprint_ignore_patterns: [] connections: -- valory/http_server:0.22.0:bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe +- valory/http_server:0.22.0:bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe contracts: [] protocols: - fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm diff --git a/packages/packages.json b/packages/packages.json index 1ad6b965ea..734bf1c156 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -9,7 +9,7 @@ "protocol/valory/ledger_api/1.0.0": "bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru", "connection/fetchai/stub/0.21.0": "bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi", "connection/valory/ledger/0.19.0": "bafybeia47rr37ianvwsh77tjjpv3nwif5sywhhy2fbdshnz4a2icwln76a", - "connection/valory/http_server/0.22.0": "bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe", + "connection/valory/http_server/0.22.0": "bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe", "connection/valory/p2p_libp2p/0.1.0": "bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq", "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiajf6msadxrr2rgkgebwlzoiznxdccsyzjopm2pkommcgcamsw27m", @@ -26,7 +26,7 @@ "agent/fetchai/gym_aea/0.25.0": "bafybeif5c657r3ixuosbyihtsdzr2tqifikxgy5e6t7ur2jmhtiolina3m", "agent/fetchai/my_first_aea/0.27.0": "bafybeicrgya4gln4lqr3ba76t2cuyik37lcgr64kzna2fkoseseobytaa4", "agent/open_aea/gym_aea/0.1.0": "bafybeibyyl4wtnrfxeoed3kjnlftphkcikdqrgf76u34v4wbvwgsqfqrgy", - "agent/open_aea/http_echo/0.1.0": "bafybeibf2bacu3jm7aqrw7tw3w6tnkkfq6vxtypgbe67q6u7plewnfupo4", + "agent/open_aea/http_echo/0.1.0": "bafybeiahnlpss6zznrtxumilqtd4nxzx43gket2ntqje7uvq3j2kjzrgoy", "agent/open_aea/my_first_aea/0.1.0": "bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm", "connection/fetchai/local/0.20.0": "bafybeigukufpgy2sdkv5qqde47dhigbjitxcrxwg6sl6unlpbc7wbxqyhm", "connection/valory/http_client/0.23.0": "bafybeiddrfvomrmgvh5yuv2coq7ci72wcdf663stayi3m5aawnj4srggce", diff --git a/packages/valory/connections/http_server/connection.yaml b/packages/valory/connections/http_server/connection.yaml index eabc4e80a9..543544307a 100644 --- a/packages/valory/connections/http_server/connection.yaml +++ b/packages/valory/connections/http_server/connection.yaml @@ -39,4 +39,5 @@ dependencies: openapi-spec-validator: version: <0.5.0,>=0.4.0 werkzeug: {} + attrs: {} is_abstract: false diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md index 276fbdc0f3..10f3aa2340 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md @@ -3,7 +3,7 @@ aea create my_aea cd my_aea ``` ``` bash -aea add connection valory/http_server:0.22.0:bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe --remote +aea add connection valory/http_server:0.22.0:bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe --remote ``` ``` bash aea config set agent.default_connection valory/http_server:0.22.0 @@ -48,7 +48,7 @@ models: mkdir packages aea create my_aea cd my_aea -aea add connection valory/http_server:0.22.0:bafybeigdizzs7kg7y7icsjbnuc2tyr6ija7xgv6gtogsdlevdem5ni3mxe --remote +aea add connection valory/http_server:0.22.0:bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe --remote aea push connection valory/http_server --local aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md index ab0e99f5ef..8f29c177db 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md @@ -1,6 +1,6 @@ ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeibf2bacu3jm7aqrw7tw3w6tnkkfq6vxtypgbe67q6u7plewnfupo4 --remote +aea fetch open_aea/http_echo:0.1.0:bafybeiahnlpss6zznrtxumilqtd4nxzx43gket2ntqje7uvq3j2kjzrgoy --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install From 2aedc2f297032422b982ede7759b5e1bf7ae3a88 Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Mon, 20 Nov 2023 12:42:44 +0530 Subject: [PATCH 9/9] fix: request parsing --- docs/http-connection-and-skill.md | 2 +- docs/http-echo-demo.md | 2 +- .../open_aea/agents/http_echo/aea-config.yaml | 2 +- packages/packages.json | 4 +- .../connections/http_server/connection.py | 76 ++++++++----------- .../connections/http_server/connection.yaml | 2 +- .../bash-http-connection-and-skill.md | 4 +- .../md_files/bash-http-echo-demo.md | 2 +- 8 files changed, 41 insertions(+), 53 deletions(-) diff --git a/docs/http-connection-and-skill.md b/docs/http-connection-and-skill.md index 561982154f..b298e82e61 100644 --- a/docs/http-connection-and-skill.md +++ b/docs/http-connection-and-skill.md @@ -29,7 +29,7 @@ Add the http server connection package: mkdir packages aea create my_aea cd my_aea -aea add connection valory/http_server:0.22.0:bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe --remote +aea add connection valory/http_server:0.22.0:bafybeiesafy2af2wakqvsal4hz6ldycb73j5w62szhwy25iyhlf2wgyg44 --remote aea push connection valory/http_server --local aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local diff --git a/docs/http-echo-demo.md b/docs/http-echo-demo.md index db2cf51ab5..1a00b26a19 100644 --- a/docs/http-echo-demo.md +++ b/docs/http-echo-demo.md @@ -16,7 +16,7 @@ The easiest way to get started with the http server is to use our pre-built exam ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeiahnlpss6zznrtxumilqtd4nxzx43gket2ntqje7uvq3j2kjzrgoy --remote +aea fetch open_aea/http_echo:0.1.0:bafybeibph3jlsb3hmxmqf7pmaxxhlfqhf6gq6lon2yelufdy7enrlz6mkq --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install diff --git a/packages/open_aea/agents/http_echo/aea-config.yaml b/packages/open_aea/agents/http_echo/aea-config.yaml index 8b3d0a7a7e..48957ba2e1 100644 --- a/packages/open_aea/agents/http_echo/aea-config.yaml +++ b/packages/open_aea/agents/http_echo/aea-config.yaml @@ -8,7 +8,7 @@ fingerprint: README.md: bafybeibkr6ecv5efx3hwxvxposvpmr76ugrj6kydeasb7bppo3ibynnjcu fingerprint_ignore_patterns: [] connections: -- valory/http_server:0.22.0:bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe +- valory/http_server:0.22.0:bafybeiesafy2af2wakqvsal4hz6ldycb73j5w62szhwy25iyhlf2wgyg44 contracts: [] protocols: - fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm diff --git a/packages/packages.json b/packages/packages.json index 734bf1c156..58230fa0ad 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -9,7 +9,7 @@ "protocol/valory/ledger_api/1.0.0": "bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru", "connection/fetchai/stub/0.21.0": "bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi", "connection/valory/ledger/0.19.0": "bafybeia47rr37ianvwsh77tjjpv3nwif5sywhhy2fbdshnz4a2icwln76a", - "connection/valory/http_server/0.22.0": "bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe", + "connection/valory/http_server/0.22.0": "bafybeiesafy2af2wakqvsal4hz6ldycb73j5w62szhwy25iyhlf2wgyg44", "connection/valory/p2p_libp2p/0.1.0": "bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq", "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiajf6msadxrr2rgkgebwlzoiznxdccsyzjopm2pkommcgcamsw27m", @@ -26,7 +26,7 @@ "agent/fetchai/gym_aea/0.25.0": "bafybeif5c657r3ixuosbyihtsdzr2tqifikxgy5e6t7ur2jmhtiolina3m", "agent/fetchai/my_first_aea/0.27.0": "bafybeicrgya4gln4lqr3ba76t2cuyik37lcgr64kzna2fkoseseobytaa4", "agent/open_aea/gym_aea/0.1.0": "bafybeibyyl4wtnrfxeoed3kjnlftphkcikdqrgf76u34v4wbvwgsqfqrgy", - "agent/open_aea/http_echo/0.1.0": "bafybeiahnlpss6zznrtxumilqtd4nxzx43gket2ntqje7uvq3j2kjzrgoy", + "agent/open_aea/http_echo/0.1.0": "bafybeibph3jlsb3hmxmqf7pmaxxhlfqhf6gq6lon2yelufdy7enrlz6mkq", "agent/open_aea/my_first_aea/0.1.0": "bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm", "connection/fetchai/local/0.20.0": "bafybeigukufpgy2sdkv5qqde47dhigbjitxcrxwg6sl6unlpbc7wbxqyhm", "connection/valory/http_client/0.23.0": "bafybeiddrfvomrmgvh5yuv2coq7ci72wcdf663stayi3m5aawnj4srggce", diff --git a/packages/valory/connections/http_server/connection.py b/packages/valory/connections/http_server/connection.py index a814872f75..55b38e7bb2 100644 --- a/packages/valory/connections/http_server/connection.py +++ b/packages/valory/connections/http_server/connection.py @@ -31,9 +31,9 @@ from typing import Any, Dict, Optional, cast from urllib.parse import parse_qs, urlparse -import attr from aiohttp import web from aiohttp.web_request import BaseRequest +from openapi_core import validate_request from openapi_core.schema.specs import Spec from openapi_core.validation.request.datatypes import RequestParameters from openapi_core.validation.request.validators import RequestValidator @@ -64,7 +64,7 @@ REQUEST_TIMEOUT = 408 SERVER_ERROR = 500 -_default_logger = logging.getLogger("aea.packages.fetchai.connections.http_server") +_default_logger = logging.getLogger("aea.packages.valory.connections.http_server") RequestId = DialogueLabel PUBLIC_ID = PublicId.from_str("valory/http_server:0.22.0") @@ -115,39 +115,28 @@ def headers_to_string(headers: Dict) -> str: return msg.as_string() -@attr.s -class OpenAPIRequest: # pylint: disable=too-few-public-methods - """OpenAPI request dataclass. - - Attributes: - full_url_pattern - The matched url with scheme, host and path pattern. - For example: - https://localhost:8000/api/v1/pets - https://localhost:8000/api/v1/pets/{pet_id} - method - The request method, as lowercase string. - parameters - A RequestParameters object. - body - The request body, as string. - mimetype - Like content type, but without parameters (eg, without charset, - type etc.) and always lowercase. - For example if the content type is "text/HTML; charset=utf-8" - the mimetype would be "text/html". - """ - - full_url_pattern = attr.ib() - method = attr.ib() - body = attr.ib() - mimetype = attr.ib() - parameters = attr.ib(factory=RequestParameters) - - -class Request(OpenAPIRequest): +class Request: """Generic request object.""" + def __init__( + self, + host_url: str, + path: str, + full_url_pattern: str, + method: str, + parameters: RequestParameters, + body: bytes, + mimetype: str, + ) -> None: + """Initialize Request object.""" + self.host_url = host_url + self.path = path + self.full_url_pattern = full_url_pattern + self.method = method + self.parameters = parameters + self.body = body + self.mimetype = mimetype + @property def is_id_set(self) -> bool: """Check if id is set.""" @@ -172,24 +161,20 @@ async def create(cls, http_request: BaseRequest) -> "Request": :return: a request """ method = http_request.method.lower() - parsed_path = urlparse(http_request.path_qs) - url = http_request.url - body = await http_request.read() - mimetype = http_request.content_type - query_params = parse_qs(parsed_path.query, keep_blank_values=True) - parameters = RequestParameters( query=ImmutableMultiDict(query_params), # type: ignore header=headers_to_string(dict(http_request.headers)), path={}, ) - request = Request( # type: ignore + request = Request( + host_url=str(url.with_path("/")), + path=parsed_path.path, full_url_pattern=str(url), method=method, parameters=parameters, @@ -288,8 +273,8 @@ def __init__( api_spec_dict = read_yaml_file(api_spec_path) if server is not None: api_spec_dict["servers"] = [{"url": server}] - api_spec = Spec.create(data=api_spec_dict) - self._validator = RequestValidator(api_spec) + self.api_spec = Spec.create(data=api_spec_dict) + self._validator = RequestValidator(self.api_spec) except OpenAPIValidationError as e: # pragma: nocover self.logger.error( f"API specification YAML source file not correctly formatted: {str(e)}" @@ -312,8 +297,11 @@ def verify(self, request: Request) -> bool: return True try: - result = self._validator.validate(request) - result.raise_for_errors() + validate_request( + spec=self.api_spec, + request=request, + validator=self._validator, + ) except Exception: # pragma: nocover # pylint: disable=broad-except self.logger.exception("APISpec verify error") return False diff --git a/packages/valory/connections/http_server/connection.yaml b/packages/valory/connections/http_server/connection.yaml index 543544307a..05db4273df 100644 --- a/packages/valory/connections/http_server/connection.yaml +++ b/packages/valory/connections/http_server/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeifepluovb4so2eem34ulpcp4svegb2dqfpmtojtofhfkb3j2xanui __init__.py: bafybeifykou5sazojmc7hdqnsdp4mncd4zh3xys3mdgdzwks23mvhzu2ga - connection.py: bafybeiaaezj7bydkecqbe4kty3qqxrhjoc2ahckupey5o7tfj23xpota4u + connection.py: bafybeie42txykvedioambi2dq4nurktilg5v6qleo2iaesc7psmrobdhva tests/__init__.py: bafybeifqaf7cnc4oczjkbwmv4ahrkbiqxrojwgowej3kbri3skz4lzt43i tests/data/certs/server.crt: bafybeiev5i3xxkvn36wflf633gkumuxexsw4y2bubwbvl7edrz4igfgv34 tests/data/certs/server.csr: bafybeicvp7xdl5w3o4bzikkudpduitss3bpp6xqfwlxbw6kabdangohy5u diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md index 10f3aa2340..ce3e0ec1d7 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md @@ -3,7 +3,7 @@ aea create my_aea cd my_aea ``` ``` bash -aea add connection valory/http_server:0.22.0:bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe --remote +aea add connection valory/http_server:0.22.0:bafybeiesafy2af2wakqvsal4hz6ldycb73j5w62szhwy25iyhlf2wgyg44 --remote ``` ``` bash aea config set agent.default_connection valory/http_server:0.22.0 @@ -48,7 +48,7 @@ models: mkdir packages aea create my_aea cd my_aea -aea add connection valory/http_server:0.22.0:bafybeigtvbs733zwpinis7azpxhvicxenv6jbu33fernpo7kjkylfwgxfe --remote +aea add connection valory/http_server:0.22.0:bafybeiesafy2af2wakqvsal4hz6ldycb73j5w62szhwy25iyhlf2wgyg44 --remote aea push connection valory/http_server --local aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md index 8f29c177db..4d4b62b00b 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md @@ -1,6 +1,6 @@ ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeiahnlpss6zznrtxumilqtd4nxzx43gket2ntqje7uvq3j2kjzrgoy --remote +aea fetch open_aea/http_echo:0.1.0:bafybeibph3jlsb3hmxmqf7pmaxxhlfqhf6gq6lon2yelufdy7enrlz6mkq --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install