Plugin configuration inheritance seems wrong

61 views
Skip to first unread message

Szabolcs Tolnai

unread,
Mar 3, 2026, 4:07:30 PM (14 days ago) Mar 3
to Repo and Gerrit Discussion
Hi,

I am developing a plugin for Gerrit version 3.13.1 which uses some settings which can be inherited. I have noticed that the boolean settings are not handled correctly.

My use-case:
1. My boolean configuration's default value is true.
2. I change this in the parent project's configuration to false.

Issues:
1. The projects' config page still displays the true value (slider in set position) but my plugin sees the false value. I have checked and the project.config file of the parent project contains the override, but there is nothing in the project's own project.config.
2. The project cannot override the parent's setting back to true.

I haven't checked all other possibilities but this seems to be an bug.

Kind regards,
Szabi

Daniele Sassoli

unread,
Mar 3, 2026, 4:14:19 PM (14 days ago) Mar 3
to Repo and Gerrit Discussion
On Tuesday, 3 March 2026 at 21:07:30 UTC tolnai.s...@gmail.com wrote:
Hi,

I am developing a plugin for Gerrit version 3.13.1 which uses some settings which can be inherited. I have noticed that the boolean settings are not handled correctly.

My use-case:
1. My boolean configuration's default value is true.
2. I change this in the parent project's configuration to false.

Can you replicate this in a plain Gerrit installation?
If so it'd be worth you raising an issue on the issue tracker at [1].

Issues:
1. The projects' config page still displays the true value (slider in set position) but my plugin sees the false value. I have checked and the project.config file of the parent project contains the override, but there is nothing in the project's own project.config.
2. The project cannot override the parent's setting back to true.

I haven't checked all other possibilities but this seems to be an bug.

Kind regards,
Szabi

Nasser Grainawi

unread,
Mar 3, 2026, 6:44:19 PM (14 days ago) Mar 3
to Szabolcs Tolnai, Repo and Gerrit Discussion
In your plugin code, are you using `getFromProjectConfig()` or
`getFromProjectConfigWithInheritance()`? You have to use the latter
for inherited settings.

>
> Kind regards,
> Szabi
>
> --
> --
> 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/44ec65cd-23ed-4cb2-a427-87e3a5827976n%40googlegroups.com.

Szabolcs Tolnai

unread,
Mar 4, 2026, 4:53:39 AM (13 days ago) Mar 4
to Nasser Grainawi, daniele...@gmail.com, Repo and Gerrit Discussion
Hi Dani and Nasser,

Dani, I am not sure what do you mean by "plain Gerrit installation". Plain gerrit doesn't have such plugin properties to test with. The only thing in the gerrit installation I am using is the plugin I am developing.

Nasser, I am using getFromProjectConfigWithInheritance(), that is why I see the inherited value from the All-Projects' configuration.


Kind regards,
Szabi

Daniele Sassoli

unread,
Mar 4, 2026, 5:33:21 AM (13 days ago) Mar 4
to Repo and Gerrit Discussion
On Wednesday, 4 March 2026 at 09:53:39 UTC tolnai.s...@gmail.com wrote:
Hi Dani and Nasser,

Dani, I am not sure what do you mean by "plain Gerrit installation". Plain gerrit doesn't have such plugin properties to test with. The only thing in the gerrit installation I am using is the plugin I am developing.

I guess my question was, is this happening for any boolean value or just for the one added by your plugin.
Sounds like it's only for the one from the plugin, thanks for clarifying.
 
Reply all
Reply to author
Forward
0 new messages