Bug in ai-code-review plugin's topic filters

138 views
Skip to first unread message

Chris Hillery

unread,
Nov 27, 2024, 10:08:05 PM11/27/24
to Repo and Gerrit Discussion
I've found a bug in the logic the AI code review plugin uses to determine whether a change with a topic should get reviewed. The result is that with the default configuration, all changes with any topic will get skipped.

Basically the logic here is broken because the default value for `disableTopicFilter` is "" - that will match everything, so if a topic isn't empty, the change will be excluded. For the time being, a workaround is to set `disableTopicFilter` in gerrit.config to something that should never match a real topic, eg. `disableTopicFilter = NOTHING_IS_DISABLED`.

The fix should be easy, but it will be different depending on whether you want the "enabled topics" filter to trump "disabled topics" or vice-versa. The documentation doesn't make it clear what the intent is there.

Is there a public bug tracker for this plugin, or for Googlesource-supported plugins in general, where I could file a ticket with more details? Or is posting here sufficient?

Thanks,
Ceej
aka Chris Hillery

Matthias Sohn

unread,
Nov 28, 2024, 3:10:05 AM11/28/24
to Chris Hillery, Repo and Gerrit Discussion
You can report issues for the ai-code-review on this component
 
Thanks,
Ceej
aka Chris Hillery

--
--
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/8f363207-982d-4482-a30f-982b6c959c9fn%40googlegroups.com.

Aaron Smith

unread,
Jul 7, 2025, 3:05:43 PMJul 7
to Repo and Gerrit Discussion
On Thursday, November 28, 2024 at 12:10:05 AM UTC-8 Matthias Sohn wrote:
On Thu, Nov 28, 2024 at 4:08 AM Chris Hillery <ce...@lambda.nu> wrote:
I've found a bug in the logic the AI code review plugin uses to determine whether a change with a topic should get reviewed. The result is that with the default configuration, all changes with any topic will get skipped.

Basically the logic here is broken because the default value for `disableTopicFilter` is "" - that will match everything, so if a topic isn't empty, the change will be excluded. For the time being, a workaround is to set `disableTopicFilter` in gerrit.config to something that should never match a real topic, eg. `disableTopicFilter = NOTHING_IS_DISABLED`.

The fix should be easy, but it will be different depending on whether you want the "enabled topics" filter to trump "disabled topics" or vice-versa. The documentation doesn't make it clear what the intent is there.

Is there a public bug tracker for this plugin, or for Googlesource-supported plugins in general, where I could file a ticket with more details? Or is posting here sufficient?

You can report issues for the ai-code-review on this component

I hit this one today as I continued setting up the plugin in my sandbox. I didn't see any bug report, so I filed one here:
https://issues.gerritcodereview.com/issues/430048717

Trevor Getty

unread,
Jul 7, 2025, 4:42:51 PMJul 7
to Repo and Gerrit Discussion
I agree with Matthias, if you raise this on the public issue tracker, we can look at the default behaviour and make it clearer. 

Aaron Smith

unread,
Jul 7, 2025, 5:01:11 PMJul 7
to Repo and Gerrit Discussion
On Monday, July 7, 2025 at 1:42:51 PM UTC-7 Trevor Getty wrote:
I agree with Matthias, if you raise this on the public issue tracker, we can look at the default behaviour and make it clearer. 

Reply all
Reply to author
Forward
0 new messages