-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix IPFS node address parsing on Git console #725
Conversation
def test_node_addr_cleanup() -> None: | ||
"""Test node address clean up method.""" | ||
|
||
original_addr = "/dns/to/some/node" | ||
consoled_parsed_addr = f"C:/Git/bin/{original_addr}" | ||
with patch("platform.system", return_value="Windows"): | ||
assert _clean_ipfs_node_url(ipfs_node=consoled_parsed_addr) == original_addr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmoreira-valory this will take care of the corrupted node strings
if platform.system() != "Windows": | ||
return ipfs_node | ||
if not ipfs_node.startswith("C:/"): | ||
return ipfs_node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just remove this piece of code? seems the lines below would sanitize it always, even in more general cases, no?
if platform.system() != "Windows": | |
return ipfs_node | |
if not ipfs_node.startswith("C:/"): | |
return ipfs_node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem is, this issue is git console and windows specific only. If we don't have this check and sanitise always, we might end up overlooking some other issue. So for now let's keep this specific to one issue.
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
Fixes
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce to agents-aea?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply.develop
branch (left side). Also you should start your branch off ourdevelop
.