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

[OPIK-441] Split feedback score name endpoints #704

Merged

Conversation

thiagohora
Copy link
Contributor

Details

Issues

Resolves #

Testing

Documentation

@thiagohora thiagohora self-assigned this Nov 22, 2024
@thiagohora thiagohora force-pushed the thiagohora/OPIK-441_split_feedback_score_name_endpoints branch from 18ae3cd to 1880d4a Compare November 22, 2024 17:49
@thiagohora thiagohora marked this pull request as ready for review November 24, 2024 20:18
@thiagohora thiagohora requested a review from a team as a code owner November 24, 2024 20:18
Comment on lines 263 to 265
.getExperimentsFeedbackScoreNames(experimentIds)
.map(names -> names.stream().map(FeedbackScoreNames.ScoreName::new).toList())
.map(FeedbackScoreNames::new)
Copy link
Contributor

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

Comment on lines 283 to 285
.getSpanFeedbackScoreNames(projectId, type)
.map(names -> names.stream().map(FeedbackScoreNames.ScoreName::new).toList())
.map(FeedbackScoreNames::new)
Copy link
Contributor

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

Comment on lines 314 to 316
.getTraceFeedbackScoreNames(projectId)
.map(names -> names.stream().map(FeedbackScoreNames.ScoreName::new).toList())
.map(FeedbackScoreNames::new)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Comment on lines 436 to 441
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());
}
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be removed

Copy link
Contributor

@idoberko2 idoberko2 left a 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

@thiagohora thiagohora force-pushed the thiagohora/OPIK-441_split_feedback_score_name_endpoints branch from be6e39e to 5ccdefd Compare November 25, 2024 13:15
@thiagohora thiagohora requested a review from idoberko2 November 25, 2024 13:15
@thiagohora thiagohora merged commit 5ea57cd into main Nov 25, 2024
7 checks passed
@thiagohora thiagohora deleted the thiagohora/OPIK-441_split_feedback_score_name_endpoints branch November 25, 2024 13:38
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