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

fix: restore wire format for /api/v0/routing/get #9639

Merged
merged 3 commits into from
Feb 10, 2023
Merged

fix: restore wire format for /api/v0/routing/get #9639

merged 3 commits into from
Feb 10, 2023

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Feb 9, 2023

Partially addresses #9638. I can only revert the wire format for routing/get. For put, we would need more information from the .Routing.Put to tell us in which peers the record was stored. However, that implies we would need to change the interface yet again. I would rather not do it, or do it in a different PR.

Closes #9638

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hacdias mind adding test/cli that executes ipfs routing get --enc=json and confirm expected JSON fields are present in the wire format?

As for Put, maybe we can return empty array for peers (or only return self, if at least one is needed) for now?
This way we don't need to change the interface, but still have old JSON response.
I don't think people care about these addrs, majority cares about Put doing the Put, and ignores the adds.

@hacdias hacdias self-assigned this Feb 9, 2023
@hacdias hacdias requested a review from lidel February 9, 2023 15:59
@hacdias
Copy link
Member Author

hacdias commented Feb 9, 2023

@lidel done and put too (with ID only).

@lidel lidel changed the title fix: revert wire format for /api/v0/routing/get fix: restore old JSON wire format for /api/v0/routing/get and put Feb 10, 2023
@lidel lidel changed the title fix: restore old JSON wire format for /api/v0/routing/get and put fix: restore wire format for /api/v0/routing/get Feb 10, 2023
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this for sure will be making smaller waves.

@lidel lidel merged commit fb7f7b1 into master Feb 10, 2023
@lidel lidel deleted the issue/9638 branch February 10, 2023 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

routing get|put: restore old JSON wire format
2 participants