wso2 / micro-integrator

The cloud-native configuration driven runtime that helps developers implement composite microservices.
https://wso2.com/integration/
Apache License 2.0
203 stars 221 forks source link

[New Feature]: Improve dependency management for MI Connectors #3614

Open ShammiL opened 1 month ago

ShammiL commented 1 month ago

Description

The current implementations in MI for adding connectors to an integration project and resolving connector dependencies involve several complex and manual steps from both the connector developer and the user sides. To mitigate the problems in the existing implementation, the current mechanisms need to be reformed.

Describe your problem(s)

  1. The VSCode extension uses a static JSON file containing all connector metadata. Developers are required to manually update this list every time a connector is updated or a new one is developed.
  2. When a user adds a connector to an integration project, the user is required to manually add all the dependency jars.
  3. The connector is downloaded and stored inside the project long before build time, when ideally connector and its dependencies should be resolved at build time.

Describe your solution(s)

  1. Come up with a proper API spec for the connector store that allows
    • Listing connectors based on a priority algorithm
    • Searching connectors and operations
    • fetching connector metadata including operations and versions released
  2. Implement workflows to automate releasing connectors to Maven and treat connectors as Maven dependencies of a project
  3. Implement a dependency resolution mechanism to handle connector dependencies and release the users from the burden of having to manually add jars.

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

ShammiL commented 3 weeks ago

Following initial discussions with the teams overseeing the MI VSCode extension and the Connector Store, an API specification has been drafted outlining the required functionalities from the Connector Store side. The APIs will provide access to the following features:

The specification can be found here

A final specification will be prepared after reviewing the above draft

ShammiL commented 1 week ago

One goal of this feature is to automate the connector release process, which is currently done manually. At present, the procedure involves creating the connector ZIP artifacts locally and uploading them to manually created Git release tags. To streamline this process, the original plan was to implement Jenkins workflows to:

As a preliminary step, before setting these workflows up in the main connector repositories and deploying artifacts to the public Maven repository, the process was tested using a local setup and a fork of a connector repository. This involved:

However, a decision was taken to transition from Jenkins to GitHub workflows for this task, aligning with the ongoing effort to migrate all MI-related automation tasks from Jenkins to GitHub workflows.

ShammiL commented 3 days ago

After finalizing the API spec for the connector store[1], as the proposed solution would require collaboration and consensus across multiple teams, and considering the time constraints, a milestone plan has also been outlined in this design document.[2]

[1] https://gist.github.com/ShammiL/606f1bc87af66a33b391864ff6fb12e8 [2] https://docs.google.com/document/d/1XlWv_71iE2VKQtpuWPIzKNpWY66RZcb8qx39Te2R96k/edit?usp=sharing

As our next step, we will be initiating discussions with the teams we believe will be impacted by the proposed changes to ensure alignment and address any concerns.

Simultaneously, other areas highlighted in the design will also be addressed.

ShammiL commented 2 days ago

After a discussion with members of the IS team looking over IS connectors, it was concluded that the changes proposed for the connector store in Milestone 1 will have no impact on the IS connectors or their current release workflows. Along with that, we also came to the following conclusions:

  1. The new GET API will be implemented aligning with the proposed API spec and the new optional fields in the meta files will be handled from the connector store. This will have no impact on the IS connectors and their release workflows.
  2. Decisions taken regarding the query parameters are as below:

However, a concern was raised about allocating resources for the implementations proposed for the connector store, due to the limited availability of members on the internal apps team.