Merged
Conversation
…page after upload
There was a problem hiding this comment.
Pull Request Overview
This PR implements new indexing and webhook functionality for MeiliSearch while updating several configuration accessors and dependency versions. Key changes include:
- Addition of new webhook components (converter, message, and controller) for handling MeiliSearch webhook events.
- Enhancements to the MeiliService, IndexService, and IndexDAO to support index creation, document management, and search operations.
- Updates to configuration accessors and dependency versions across authentication, image processing, and CI/CD workflows.
Reviewed Changes
Copilot reviewed 199 out of 200 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| backend/src/main/java/io/papermc/hangar/components/index/webhook/* | Added webhook converter, record definitions, and controller to process webhook messages. |
| backend/src/main/java/io/papermc/hangar/components/index/MeiliService.java | Introduced a new service with methods for index management, document send/remove, and search. |
| backend/src/main/java/io/papermc/hangar/components/index/IndexService.java | Created a new service to orchestrate full updates and incremental updates for projects/versions. |
| backend/src/main/java/io/papermc/hangar/components/index/IndexDAO.java | Added complex SQL queries for retrieving project and version data for indexing. |
| backend/src/main/java/io/papermc/hangar/components/images/service/ImageService.java | Updated configuration accessor calls for image scaling and quality properties. |
| Multiple auth and config service files | Replaced legacy configuration getters with method-based accessors and updated JWT setups. |
| README.md and GitHub Workflows files | Updated documentation and CI configuration to reflect new dependencies and node version. |
Files not reviewed (1)
- backend/pom.xml: Language not supported
Comments suppressed due to low confidence (1)
backend/src/main/java/io/papermc/hangar/components/auth/service/AuthService.java:176
- Using getFirst() on a List may lead to a runtime error because the List interface does not guarantee this method. Consider reverting to get(0) or ensuring that the collection type supports getFirst().
final OffsetDateTime nextChange = userNameHistory.getFirst().date().plusDays(this.config.users().nameChangeInterval());
| try { | ||
| return objectMapper.readValue(line, Webhook.class); | ||
| } catch (JsonProcessingException e) { | ||
| throw new RuntimeException(e); |
There was a problem hiding this comment.
Rethrowing a JsonProcessingException as a generic RuntimeException may obscure the underlying error and conflict with the method signature. Consider wrapping the exception in an HttpMessageNotReadableException to provide clearer context for message conversion failures.
Suggested change
| throw new RuntimeException(e); | |
| throw new HttpMessageNotReadableException("Failed to parse JSON line into Webhook object", e); |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
smol todo list for myself