Handle conflicting resources when loading dependent projects#522
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
AI Agent Log Improvement Checklist
- The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
- Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.
✅ Before merging this pull request:
- Review all AI-generated comments for accuracy and relevance.
- Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
| Comment | Accepted (Y/N) | Reason |
|---|---|---|
| #### Log Improvement Suggestion No: 1 | ||
| #### Log Improvement Suggestion No: 2 | ||
| #### Log Improvement Suggestion No: 3 | ||
| #### Log Improvement Suggestion No: 4 |
There was a problem hiding this comment.
Pull request overview
This PR adds conflict detection while loading dependent integration-project resources, and improves user feedback + cleanup when conflicts are found.
Changes:
- Detect artifact/registry/connector conflicts while merging dependent project resources and skip+cleanup conflicting dependencies.
- Add ordering for dependency processing (oldest-first) to make conflict resolution deterministic.
- Add extensive JUnit coverage for dependent resource loading, conflict reporting, and cleanup behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/resourceFinder/AbstractResourceFinder.java | Adds conflict detection, dependency ordering, cleanup of conflicting deps, and conflict message generation during dependent resource load. |
| org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/resource/finder/LoadDependentResourcesTest.java | Adds comprehensive tests covering successful loads, conflicts (artifacts/registry/connectors), and cleanup behaviors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added validation when loading resources for dependent projects to detect conflicts with existing resources. If a conflict is found, the newly added dependency is automatically removed. A clear error message is generated, including a list of the conflicting resources.
c874a51 to
1b94662
Compare
Purpose
This PR introduce the following: