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-904: Split find project endpoint into two endpoints find and stats #1176

Conversation

thiagohora
Copy link
Contributor

@thiagohora thiagohora commented Jan 30, 2025

Details

We are splitting this endpoint to optimize the critical path rendering

Also, two remaining orders by clause from the spans and traces queries were removed.

Issues

OPIK-904

@thiagohora thiagohora force-pushed the thiagohora/OPIK-904_split_find_project_into_find_and_stats_endpoint branch from a9805a0 to 563ff2d Compare January 30, 2025 11:27
@thiagohora thiagohora marked this pull request as ready for review January 30, 2025 11:58
@thiagohora thiagohora requested a review from a team as a code owner January 30, 2025 11:58
@thiagohora thiagohora self-assigned this Jan 30, 2025
@@ -188,7 +190,7 @@ public Response deleteById(@PathParam("id") UUID id) {
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(schema = @Schema(implementation = ErrorMessage.class))),
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(schema = @Schema(implementation = ErrorMessage.class)))
})
@JsonView({Project.View.Public.class})
@JsonView({Project.View.Detailed.class})
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no test that verifies fields marked with Detailed view, returned by this endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test remains the same since this endpoint didn't change; only the. find was affected

Copy link
Contributor

@BorisTkachenko BorisTkachenko Jan 30, 2025

Choose a reason for hiding this comment

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

Yes, old test also didn't check it. So we basically never verified that those values(now annotated with Detailed) are returned properly by this endpoint. I suppose it should be added to corresponding test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, let me check it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@thiagohora thiagohora force-pushed the thiagohora/OPIK-904_split_find_project_into_find_and_stats_endpoint branch from 563ff2d to f21e92c Compare January 30, 2025 13:39
@thiagohora thiagohora force-pushed the thiagohora/OPIK-904_split_find_project_into_find_and_stats_endpoint branch from f21e92c to 79756fe Compare January 30, 2025 13:41
andrescrz
andrescrz previously approved these changes Jan 30, 2025
@Builder(toBuilder = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public record ProjectStatsSummary(List<ProjectStatsSummaryItem> content) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor: this could be a lightweight Page object, with page, size on top of the current content and without total. But this works as FE is fine with it. We can always extend it in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, we can add in the next iteration

@thiagohora thiagohora force-pushed the thiagohora/OPIK-904_split_find_project_into_find_and_stats_endpoint branch from 3480e68 to 56099b2 Compare January 30, 2025 13:59
@thiagohora thiagohora requested a review from andrescrz January 30, 2025 14:02
@thiagohora thiagohora merged commit 7af9150 into main Jan 30, 2025
9 checks passed
@thiagohora thiagohora deleted the thiagohora/OPIK-904_split_find_project_into_find_and_stats_endpoint branch January 30, 2025 14:11
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.

3 participants