-
Notifications
You must be signed in to change notification settings - Fork 223
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
[OPIK-628] Fix update LLM provider api key endpoint #901
Merged
BorisTkachenko
merged 1 commit into
main
from
boryst/OPIK-628-updating-a-provider-api-key-sends-400-error
Dec 17, 2024
+9
−9
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I assume that you just want to fix the lack of proper toString implementation.
You could have maintained the previous approach just by changing
@Getter
annotation by@Data
. The advantage is not requiring a customtoString
implementation and just relying on@ToString.Exclude
. The downside is having a mutable POJO.You record approach has the reversed pros and cons.
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.
@andrescrz Unfortunately no:)
Endpoint was failing with
{"code":400,"message":"Unable to process JSON"}
on deserialization. What's worse, integration tests were ok for the same payload. But in dev or if you run Opik locally with docker-compose issue was reproducible. I tried to play with toString and encryption, but with no result.The only thing that helped is when I changed regular Java class to record. I double checked locally and with dev deployment before merging.
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.
Ok, probably the issue is that there was no proper setter, so it couldn't be converted from Json to Java POJO.
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.
It's a weird error, Setter doesn't help here too.
And the most disturbing is that our integration tests are passing and can deserialize it properly. Also if you use
JsonUtils
, then deserialization works fine as well. Issue only happens with dockerised Opik.