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

235 views
Skip to first unread message

Luca Milanesio

unread,
Jun 9, 2026, 8:35:31 PMJun 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,
Jun 10, 2026, 3:29:21 AMJun 10
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

David Ostrovsky

unread,
Jun 11, 2026, 4:13:22 AMJun 11
to Repo and Gerrit Discussion
+1. 

Thank you,

Luca

Fabio Ponciroli

unread,
Jun 11, 2026, 5:30:09 AMJun 11
to David Ostrovsky, Repo and Gerrit Discussion

+1 from me as well.

It would definitely make life easier and clarify the functionality of the different components.


 

Thank you,

Luca

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/fa525907-07d5-464e-ac30-a2ab6f8af88cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages