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

Delete example code, and move prod code into functional separation #16

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

junr03
Copy link
Collaborator

@junr03 junr03 commented Jul 19, 2024

This PR deletes all the previous filter code that served as a working example and only leaves the production code for the Katanemo gateway. The only exception is the stats code.

This refactor also prepares the code to be unit tested by separating functionality into small functions.

I have a subsequent PR that starts investigating mocking proxy_wasm::host_calls. The main problem is that the linker still expects the extern C functions when compiling tests.

junr03 added 2 commits July 19, 2024 14:12
Signed-off-by: José Ulises Niño Rivera <junr03@users.noreply.github.com>
Signed-off-by: José Ulises Niño Rivera <junr03@users.noreply.github.com>
@junr03 junr03 requested a review from adilhafeez July 19, 2024 21:47
Copy link
Contributor

@adilhafeez adilhafeez left a comment

Choose a reason for hiding this comment

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

looks much clean now - let's also move llm_backend to common_types

envoyfilter/src/lib.rs Outdated Show resolved Hide resolved
}
}

fn embedding_request_worker(
Copy link
Contributor

Choose a reason for hiding this comment

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

name could be embedding_request_handler as its not a background thread

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like this. I took inspiration from Envoy conventions. But really, you are right -- and tbh I never liked that convention that much 😂

@adilhafeez adilhafeez merged commit 7ae2d91 into main Jul 22, 2024
3 checks passed
@junr03 junr03 deleted the cleanup branch September 5, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants