-
Notifications
You must be signed in to change notification settings - Fork 271
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-441] Split feedback score name endpoints #704
[OPIK-441] Split feedback score name endpoints #704
Conversation
18ae3cd
to
1880d4a
Compare
.getExperimentsFeedbackScoreNames(experimentIds) | ||
.map(names -> names.stream().map(FeedbackScoreNames.ScoreName::new).toList()) | ||
.map(FeedbackScoreNames::new) |
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 believe this logic belongs in the service layer
.getSpanFeedbackScoreNames(projectId, type) | ||
.map(names -> names.stream().map(FeedbackScoreNames.ScoreName::new).toList()) | ||
.map(FeedbackScoreNames::new) |
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 believe this logic belongs in the service layer
.getTraceFeedbackScoreNames(projectId) | ||
.map(names -> names.stream().map(FeedbackScoreNames.ScoreName::new).toList()) | ||
.map(FeedbackScoreNames::new) |
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.
Same here
private static Mono<List<String>> getNames(Statement statement) { | ||
return makeMonoContextAware(bindWorkspaceIdToMono(statement)) | ||
.flatMapMany(result -> result.map((row, rowMetadata) -> row.get("name", String.class))) | ||
.distinct() | ||
.collect(Collectors.toList()); | ||
} |
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 always prefer private methods to come after the public ones. Can you move it to be below the public methods?
|
||
webTarget = webTarget.queryParam("project_id", projectId); | ||
|
||
List<String> expectedNames = names; |
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.
Can be removed
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.
Great work. Left a few small comments
be6e39e
to
5ccdefd
Compare
Details
Issues
Resolves #
Testing
Documentation