Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise when the dependency set size changes while fetching the agent #675

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions aea/cli/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,21 @@ def _fetch_agent_deps(ctx: Context) -> None:
"""
for item_type in (PROTOCOL, CONTRACT, CONNECTION, SKILL):
item_type_plural = "{}s".format(item_type)
required_items = getattr(ctx.agent_config, item_type_plural)
for item_id in required_items:
add_item(ctx, item_type, item_id)
required_items = cast(set, getattr(ctx.agent_config, item_type_plural))
required_items_check = required_items.copy()
try:
for item_id in required_items:
add_item(ctx, item_type, item_id)
except RuntimeError as e:
missing_deps = required_items_check.symmetric_difference(required_items)
error = "\n- ".join(
[
"Size of the dependency set changed during the iteration; "
"Following dependencies are missing from the agent configuration: ",
*map(lambda x: str(x.without_hash()), missing_deps),
]
)
raise click.ClickException(error) from e


def fetch_mixed(
Expand Down
14 changes: 0 additions & 14 deletions docs/api/crypto/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,3 @@ def hex_to_bytes_for_key(data: str) -> bytes

Convert hex string to bytes with error handling.

<a id="aea.crypto.helpers.generate_multiple_keys"></a>

#### generate`_`multiple`_`keys

```python
def generate_multiple_keys(n: int,
type_: str,
password: Optional[str] = None,
extra_entropy: Union[str, bytes, int] = "",
file: Optional[str] = None) -> None
```

Generate n key pairs.

Loading