Skip to content

Support adding dependencies to the connector descriptor#223

Open
ChinthakaJ98 wants to merge 1 commit into
wso2:masterfrom
ChinthakaJ98:add-dep-to-descriptor
Open

Support adding dependencies to the connector descriptor#223
ChinthakaJ98 wants to merge 1 commit into
wso2:masterfrom
ChinthakaJ98:add-dep-to-descriptor

Conversation

@ChinthakaJ98

Copy link
Copy Markdown
Contributor

$subject

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ChinthakaJ98, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 80d4e83e-a855-4252-8c62-76cfa1f9dd19

📥 Commits

Reviewing files that changed from the base of the PR and between 3e3326b and 8329337.

📒 Files selected for processing (3)
  • vscode-car-plugin/src/main/java/org/wso2/maven/libraries/ConnectorConfigReader.java
  • vscode-car-plugin/src/main/java/org/wso2/maven/libraries/ConnectorDependencyResolver.java
  • vscode-car-plugin/src/main/java/org/wso2/maven/libraries/DependencyOverride.java
📝 Walkthrough

Walkthrough

This change adds a getOverrides method to ConnectorConfigReader for retrieving dependency overrides by connector artifactId. ConnectorDependencyResolver.resolveMavenDependencies is updated to track which overrides are consumed while processing descriptor dependencies, apply any remaining unconsumed overrides (honoring omit flags and supporting local JAR paths or Maven coordinates), and validate override fields before adding them to the dependency set. A new copyLocalJar helper centralizes local JAR file validation and copying.

Sequence Diagram(s)

sequenceDiagram
  participant Resolver as ConnectorDependencyResolver
  participant Reader as ConnectorConfigReader
  participant FS as Local filesystem
  participant Set as dependencySet

  Resolver->>Resolver: iterate descriptor.yml dependencies
  Resolver->>Resolver: mark matched overrides as consumed
  Resolver->>FS: copyLocalJar for localPath overrides
  Resolver->>Reader: getOverrides(config, connectorArtifactId)
  Reader-->>Resolver: unconsumed DependencyOverride list
  loop each remaining override
    alt omitted
      Resolver->>Resolver: skip
    else localPath present
      Resolver->>FS: copyLocalJar(override)
    else Maven coordinates
      Resolver->>Resolver: validate groupId, artifactId, version
      Resolver->>Set: add dependency coordinates
    end
  end
Loading

Related Issues: Not specified in provided information.

Related PRs: Not specified in provided information.

Suggested labels: enhancement, dependencies

Suggested reviewers: Maintainers of vscode-car-plugin dependency resolution logic

🐇 A rabbit hops through dependency trees, Tracking overrides with careful decrees, Local jars copied, coordinates checked, Nothing consumed goes unaffected. Hop, build, resolve — connectors at ease.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is only a placeholder and omits all required template sections. Replace $subject with a full PR description covering Purpose, Goals, Approach, tests, security checks, and other required sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change by describing added dependency support in the connector descriptor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@vscode-car-plugin/src/main/java/org/wso2/maven/libraries/ConnectorDependencyResolver.java`:
- Around line 423-430: The local JAR handling in ConnectorDependencyResolver
should validate the documented contract before any copy logic runs. In the path
that reads override.getLocalPath(), reject values that are not absolute or do
not point to a JAR file, and keep the LibraryResolverException message explicit
for connectorArtifactId/localPath failures. Also replace the unconditional
targetDir.mkdirs() in the connectorQName flow with a checked directory creation
so the operation fails clearly if the target directory cannot be created.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d8549fc9-5467-414e-99ea-320fd98ddf5f

📥 Commits

Reviewing files that changed from the base of the PR and between 8e9edac and 3e3326b.

📒 Files selected for processing (2)
  • vscode-car-plugin/src/main/java/org/wso2/maven/libraries/ConnectorConfigReader.java
  • vscode-car-plugin/src/main/java/org/wso2/maven/libraries/ConnectorDependencyResolver.java

@ChinthakaJ98 ChinthakaJ98 force-pushed the add-dep-to-descriptor branch from 3e3326b to c535599 Compare July 1, 2026 06:02
@ChinthakaJ98 ChinthakaJ98 force-pushed the add-dep-to-descriptor branch from c535599 to 8329337 Compare July 3, 2026 10:12
@ChinthakaJ98

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

1 participant