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

getAll handler is currently broken and needs fixing. #610

Closed
addievo opened this issue Oct 26, 2023 · 0 comments · Fixed by #611
Closed

getAll handler is currently broken and needs fixing. #610

addievo opened this issue Oct 26, 2023 · 0 comments · Fixed by #611
Assignees
Labels
bug Something isn't working r&d:polykey:supporting activity Supporting core activity

Comments

@addievo
Copy link
Contributor

addievo commented Oct 26, 2023

Describe the bug

The NodesGetAll handler needs to be fixed. I did a monkey patch while testing and it needs to be applied to Polykey.

// client/handlers/NodesgetAll.ts

for await (const [index, bucket] of nodeGraph.getBuckets()) {
            for (const [id, info] of bucket) {
                const encodedId = nodesUtils.encodeNodeId(id);
                // For every node in every bucket, add it to our message
                if (ctx.signal.aborted)
                    throw ctx.signal.reason;
                yield {
                    bucketIndex: index,
                    nodeIdEncoded: encodedId,
                    host: info.address.host,
                    port: info.address.port,
                };
            }
        }

Originally posted by @tegefaulkes in MatrixAI/Polykey-CLI#44 (comment)

To Reproduce

  1. Run nodes getall in Polykey-CLI.

Expected behavior

Shouldn't throw an error and succeed.

@addievo addievo added the bug Something isn't working label Oct 26, 2023
@addievo addievo self-assigned this Oct 26, 2023
@addievo addievo mentioned this issue Oct 26, 2023
8 tasks
@CMCDragonkai CMCDragonkai added the r&d:polykey:supporting activity Supporting core activity label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working r&d:polykey:supporting activity Supporting core activity
Development

Successfully merging a pull request may close this issue.

2 participants