API call to search for all reviews where branch is a specific value

23 views
Skip to first unread message

Paul Mansfield

unread,
Oct 21, 2019, 6:04:11 AM10/21/19
to Review Board Community
Hi,
imagine I have some reviews done on a feature branch called "SCRATCH-123", and I want to search for them using the API.

is this possible?


suggests there isn't that ability, it doesn't seem to be possible filter on the branch? then I would have to get a list of all review requests on a repository and then iterate and filter myself?

thanks
Paul

Christian Hammond

unread,
Oct 23, 2019, 2:15:23 AM10/23/19
to revie...@googlegroups.com
Hi Paul,

Hmm, I thought we had this as part of the API. I'll add that for 3.0.16. We're aiming for an early-November release, trying to wrap up some work before we get that release ready, but it'll probably be the 5th or the 12th.

If need-be, extensions can always provide custom API to fill in the gaps that we're missing, if it's blocking you on something and you can't wait until the next release.

Christian

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/3b47b04e-3feb-4bec-9e84-ee749b00150d%40googlegroups.com.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Christian Hammond

unread,
Oct 23, 2019, 3:11:25 AM10/23/19
to revie...@googlegroups.com
So there's a challenge with this that I hadn't considered before.

We don't automatically create an index for the branch field. While we could push an update that adds one, this can impact upgrades to 3.0.16, potentially taking a substantially long time to complete. We try to avoid this for point releases, so I'd feel a lot more comfortable adding this index in 4.0, where we're already performing modifications to the database schema.

We could still add the query argument in 3.0.16, but performance wouldn't be ideal without manually adding an index (which may then need to be manually removed when 4.0 is out). So unfortunately, not as clear-cut as I was hoping.

Going to need to ponder this...

Christian

Paul Mansfield

unread,
Oct 23, 2019, 4:53:12 AM10/23/19
to Review Board Community
Ideally any field in a review request should be useable as a filter, but I accept that the demands of indexing would be a problem.



On Wednesday, 23 October 2019 08:11:25 UTC+1, Christian Hammond wrote:
So there's a challenge with this that I hadn't considered before.

We don't automatically create an index for the branch field. While we could push an update that adds one, this can impact upgrades to 3.0.16, potentially taking a substantially long time to complete. We try to avoid this for point releases, so I'd feel a lot more comfortable adding this index in 4.0, where we're already performing modifications to the database schema.

We could still add the query argument in 3.0.16, but performance wouldn't be ideal without manually adding an index (which may then need to be manually removed when 4.0 is out). So unfortunately, not as clear-cut as I was hoping.

Going to need to ponder this...

Christian

On Tue, Oct 22, 2019 at 11:14 PM Christian Hammond <chri...@beanbaginc.com> wrote:
Hi Paul,

Hmm, I thought we had this as part of the API. I'll add that for 3.0.16. We're aiming for an early-November release, trying to wrap up some work before we get that release ready, but it'll probably be the 5th or the 12th.

If need-be, extensions can always provide custom API to fill in the gaps that we're missing, if it's blocking you on something and you can't wait until the next release.

Christian

On Mon, Oct 21, 2019 at 3:04 AM Paul Mansfield <paul.m...@agileanalog.com> wrote:
Hi,
imagine I have some reviews done on a feature branch called "SCRATCH-123", and I want to search for them using the API.

is this possible?


suggests there isn't that ability, it doesn't seem to be possible filter on the branch? then I would have to get a list of all review requests on a repository and then iterate and filter myself?

thanks
Paul

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to revie...@googlegroups.com.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Christian Hammond

unread,
Oct 23, 2019, 5:37:53 AM10/23/19
to revie...@googlegroups.com
Yeah, and we could add queries for any field at an API level, but we've hit problems in the past. We had a code path that allowed for querying a non-indexed field, and in the vast majority of installs, it never posed a problem. However, some of the larger servers (review requests in the millions) fell over when the queries were performed. So we have to be careful about those situations.

Right now, I'm leaning toward adding a branch filter with a disclaimer that it *could* limit performance in larger deployments, and suggest an index for this case, since the query is optional in the end, and then force the index for 4.0.

Longer-term, we want to rewrite the search API, or in some way leverage search backends, to perform lookups against the search index rather than the database. This would allow for more complex filtering than we can really support in the API today, though it does of course require a working search index that's set to always be up-to-date.

Christian


To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/d10fb256-cbfb-4a93-977f-400c32ea6fc0%40googlegroups.com.

Paul Mansfield

unread,
Oct 23, 2019, 5:41:35 AM10/23/19
to Review Board Community
for searching the description and testing fields, a simple free text database like namazu would probably be a better way than using SQL to scan text fields.

Christian Hammond

unread,
Oct 23, 2019, 3:37:34 PM10/23/19
to revie...@googlegroups.com
That's where the search index comes in. You can already use the search API to find review requests based on those fields, but the API doesn't have pagination support, and needs a redesign to be useful in that way.

Christian

On Wed, Oct 23, 2019 at 2:41 AM Paul Mansfield <paul.ma...@agileanalog.com> wrote:
for searching the description and testing fields, a simple free text database like namazu would probably be a better way than using SQL to scan text fields.

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages