Skip to content

Handle conflicting resources when loading dependent projects#522

Open
chathuranga-jayanath-99 wants to merge 6 commits intowso2:mi-ext-alpha-releasefrom
chathuranga-jayanath-99:skip-download-common-artifacts
Open

Handle conflicting resources when loading dependent projects#522
chathuranga-jayanath-99 wants to merge 6 commits intowso2:mi-ext-alpha-releasefrom
chathuranga-jayanath-99:skip-download-common-artifacts

Conversation

@chathuranga-jayanath-99
Copy link
Copy Markdown
Contributor

Purpose

This PR introduce the following:

  • 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 for better visibility and debugging.
  • Also added tests for loading resources from dependent projects scenarios.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 96d201ec-e8ae-4393-aaf3-f1082b1ba3fe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@wso2-engineering wso2-engineering bot left a comment

Choose a reason for hiding this comment

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

AI Agent Log Improvement Checklist

⚠️ Warning: AI-Generated Review Comments

  • 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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.
@chathuranga-jayanath-99 chathuranga-jayanath-99 force-pushed the skip-download-common-artifacts branch from c874a51 to 1b94662 Compare April 10, 2026 10:46
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