Proposal: Splitting the owners plugin mono-repo into three components

28 views
Skip to first unread message

Luca Milanesio

unread,
Jun 9, 2026, 8:35:31 PM (14 hours ago) Jun 9
to Repo and Gerrit Discussion, Luca Milanesio

Dear Gerrit contributors and Maintainers,

After many years of using a mono-repo for the owners plugin, I would like to propose splitting the repository into three separate components. To demonstrate how this will work, I have prototyped the split into the following modules:

  • owners-common-api: Combines owners-common and owners-api. It provides the shared infrastructure for detecting and parsing OWNERS files, along with the API that allows extending it via Groovy scripts.

  • owners: Contains the legacy Prolog rules and the new Submit Requirements for enabling or disabling change submissions based on processing OWNERS files against incoming patch-sets.

  • owners-autoassign: Processes OWNERS files to automatically assign designated owners as reviewers or in CC.

Why am I proposing this split?

There are five main reasons driving this architectural change:

  1. Cross-Plugin Dependencies and Reuse: Gerrit now supports cross-plugin dependencies and communication. Splitting the repository allows these three modules to be independent and reused in different contexts. It also prevents the owners-common code from being included multiple times, ensuring it is loaded only once by Gerrit.

  2. Standardized CI Verification: Gerrit plugins can now be verified alongside their dependencies thanks to the inclusion of cross-plugin dependencies in the YAML definitions.

  3. Stepping Stone to ApiModule Evolution: By making owners-common-api a first-class citizen, it can be transformed into a dynamically loaded plugin. Subsequently, owners and owners-autoassign can be loaded as child injectors, cleanly reusing the classes of owners-common-api at runtime.

  4. Leveraging bzlmod: Encapsulating the shared dependencies within owners-common-api drastically simplifies the Bazel definitions for owners and owners-autoassign, aiding the ongoing migration to bzlmod.

  5. Easier Discovery and Setup: The three components will be clearly displayed in the plugin manager and installable with a single click, rather than being hidden inside the nested build structure of a mono-repo.

Prototypes

You can review the prototypes for the separated components here:

To move forward, I propose creating the two additional repositories under Gerrit-Review alongside the existing owners repo:

a) plugins/owners-common-api 

b) plugins/owners-autoassign

Please let me know your thoughts and feedback on this proposal.

Thank you,

Luca

Daniele Sassoli

unread,
3:29 AM (7 hours ago) 3:29 AM
to Repo and Gerrit Discussion

Makes sense to me. Currently its all pretty confusing and setting up the plugins to be build is not as trivial as other plugins.
This will standardize the owners plugin to how other plugins work. 

Thank you,

Luca

Reply all
Reply to author
Forward
0 new messages