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

Add Required v1 API Features With Tests & CI #2

Merged
merged 19 commits into from
Dec 20, 2024
Merged

Add Required v1 API Features With Tests & CI #2

merged 19 commits into from
Dec 20, 2024

Conversation

brightprogrammer
Copy link
Collaborator

@brightprogrammer brightprogrammer commented Dec 18, 2024

This PR will be a huge set of changes for the creait library. Until this PR is merged, all plugins are using v1 branch of this library on checkout in their corresponding Dockerfile

Merging of this PR will also result in v1 of creait library and then I can make progress towards adding some new features from v2 of the API

brightprogrammer and others added 16 commits November 4, 2024 10:45
Local database management turned out to not be such a good idea. Why?
because now users can apply existing analysis in rizin and cutter
plugins and hence no need to track binary id or analysis id or hashes of
uploaded files.

If this new feature were not to be added, then local db management is a
very helpful feature to have IMO
- Auth Check endpoint works
- Log object management removed, Log now available globally. Logging
will be initialized as soon as the library is loaded and all logs will
be stored in tmpdir.
API key works correctly only with it's corresponding host. Auth check
now sets the host as well.
Add new endpoint to get available AI models
Plugins now don't use a static modelname-version syntax to specify
versions. All AI model information is passed into the struct of
arguments of API that requires it.
There are some bugs found during execution of these tests
Strange, I never thought they'd exist like this. While writing
the tests I thought they'd be useless.
The bug still remains unfixed.
The json string getter method does not duplicate the string
and hence ownership still remained with cJSON object. One of
the Json getter method destroyed the returned string and hence
it was a double-free bug, because in the end the cJSON object
tried to destroy it was well.

Phew!
Recently faced a RPATH issue when building and installing cJSON from
source on Mac OS. The updated README provides hints on how that can be
fixed.
Documentation for `/v1/ann/symbol/batch` seems to be incorrect.
Can't wait for getting a response and then making decision based
on that, so for now moving ahead with a hack to optionally check
for `function_matches` field the second time. I'm referring
to the JSON response parsing code in Response.c
@brightprogrammer brightprogrammer self-assigned this Dec 18, 2024
Some small non-necessary fixes to follow a proper
coding style throughout.
No need to explicitly sets variables to `NULL` after using `FREE` on
them, this is automatically done in `FREE` macro
@brightprogrammer brightprogrammer merged commit 3412096 into master Dec 20, 2024
2 checks passed
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.

1 participant