New issue
Advanced search Search tips

Issue 876399 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Sep 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature



Sign in to add a comment

support project-only and bucket-only filtering

Project Member Reported by no...@chromium.org, Aug 21

Issue description

SearchBuilds v2 currently requires the triple (project, bucket, builder) to be specified entirely. This feature request is to replace this restriction with "a prefix of the triple must be specified", e.g. only a project, or only project-and-bucket. CroS needs only-project filter.
 
Any update on this? It's currently making our V2 deployment difficult because we have to do 3 queries for N builds heuristically. For example, if we know that roughly 100 builds of project history would cover the last 7 days, to satisfy that request for 7 days of history, we currently have to split the request in to 3 builder requests for builds of roughly the historical, statistical percentage of the whole: 70%, 20%, 10%. So, we ask for 70, 20, and 10 builds in Prod, PreCQ, and Tryjob builders guessing that will give us about 7 days of history for each.
Status: Started (was: Assigned)
Wow, that was fast! Thanks for helping out so quickly; looks great!

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/2ed4136d08b48d23bc364699538632c4b5d6719b

commit 2ed4136d08b48d23bc364699538632c4b5d6719b
Author: Nodir Turakulov <nodir@google.com>
Date: Fri Sep 14 21:49:48 2018

[buildbucket] return project ids in config.get_buckets_async

Change config.get_buckets_async signature to return (project_id, bucket_proto)
tuples.

Bug:  876399 
Change-Id: Ice2604f03bdb72d4ead6f92bbed509bb87960f26
Reviewed-on: https://chromium-review.googlesource.com/1226118
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#17613}
[modify] https://crrev.com/2ed4136d08b48d23bc364699538632c4b5d6719b/appengine/cr-buildbucket/test/search_test.py
[modify] https://crrev.com/2ed4136d08b48d23bc364699538632c4b5d6719b/appengine/cr-buildbucket/user.py
[modify] https://crrev.com/2ed4136d08b48d23bc364699538632c4b5d6719b/appengine/cr-buildbucket/test/config_test.py
[modify] https://crrev.com/2ed4136d08b48d23bc364699538632c4b5d6719b/appengine/cr-buildbucket/test/creation_test.py
[modify] https://crrev.com/2ed4136d08b48d23bc364699538632c4b5d6719b/appengine/cr-buildbucket/swarming/swarmbucket_api.py
[modify] https://crrev.com/2ed4136d08b48d23bc364699538632c4b5d6719b/appengine/cr-buildbucket/test/user_test.py
[modify] https://crrev.com/2ed4136d08b48d23bc364699538632c4b5d6719b/appengine/cr-buildbucket/config.py
[modify] https://crrev.com/2ed4136d08b48d23bc364699538632c4b5d6719b/appengine/cr-buildbucket/test/service_test.py

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b

commit 423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b
Author: Nodir Turakulov <nodir@google.com>
Date: Fri Sep 14 21:53:19 2018

[buildbucket] return project ids in user.get_accessible_buckets

Change user.get_accessible_buckets signature to return
(project_id, bucket_proto) tuples.

Also fix a typo in the function name.

Bug:  876399 
Change-Id: I7e4b91a2ce3d1460fcdeb00aea3018bd3aae7286
Reviewed-on: https://chromium-review.googlesource.com/1226122
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#17614}
[modify] https://crrev.com/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b/appengine/cr-buildbucket/test/search_test.py
[modify] https://crrev.com/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b/appengine/cr-buildbucket/user.py
[modify] https://crrev.com/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b/appengine/cr-buildbucket/test/creation_test.py
[modify] https://crrev.com/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b/appengine/cr-buildbucket/v2/test/api_test.py
[modify] https://crrev.com/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b/appengine/cr-buildbucket/swarming/swarmbucket_api.py
[modify] https://crrev.com/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b/appengine/cr-buildbucket/test/user_test.py
[modify] https://crrev.com/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b/appengine/cr-buildbucket/search.py
[modify] https://crrev.com/423a0ce2ca89aaf3b0c7fb9dacde124a83fe796b/appengine/cr-buildbucket/test/service_test.py

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/61e0e959e3a7314ca2fb0f4df7d5f0c7a009007f

commit 61e0e959e3a7314ca2fb0f4df7d5f0c7a009007f
Author: Nodir Turakulov <nodir@google.com>
Date: Fri Sep 14 22:00:17 2018

[buildbucket] Implement search by project

Add support for searching for builds by project.

Given that we plan to change project identity from bucket name to (project id,
bucket name), do not support searching by project and bucket name at the same
time.

This reduces the problem to not accepting a list of buckets, but when listing
the buckets that user has access to, limit them to the ones in the specified
project.

R=tandrii@chromium.org

Bug:  876399 
Change-Id: I1f2057e7d840806a76495a3a89ff759b512bc23e
Reviewed-on: https://chromium-review.googlesource.com/1226123
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#17616}
[modify] https://crrev.com/61e0e959e3a7314ca2fb0f4df7d5f0c7a009007f/appengine/cr-buildbucket/test/search_test.py
[modify] https://crrev.com/61e0e959e3a7314ca2fb0f4df7d5f0c7a009007f/appengine/cr-buildbucket/search.py

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/7e336dd29c7a445189ef1e62c0f8fe18648a7e1f

commit 7e336dd29c7a445189ef1e62c0f8fe18648a7e1f
Author: Nodir Turakulov <nodir@google.com>
Date: Fri Sep 14 22:04:28 2018

[buildbucket] Expose search by project in v2 api

Expose build search by project, added in
https://chromium-review.googlesource.com/c/infra/infra/+/1226123
in v2 api. This allows predicate.builder to have only project
and only project and bucket.

Bug:  876399 
Change-Id: I74df9d0971b4a30112cff889da8578d84b84e35c
Reviewed-on: https://chromium-review.googlesource.com/1226124
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#17617}
[modify] https://crrev.com/7e336dd29c7a445189ef1e62c0f8fe18648a7e1f/appengine/cr-buildbucket/v2/test/validation_test.py
[modify] https://crrev.com/7e336dd29c7a445189ef1e62c0f8fe18648a7e1f/appengine/cr-buildbucket/v2/api.py
[modify] https://crrev.com/7e336dd29c7a445189ef1e62c0f8fe18648a7e1f/appengine/cr-buildbucket/v2/test/api_test.py
[modify] https://crrev.com/7e336dd29c7a445189ef1e62c0f8fe18648a7e1f/appengine/cr-buildbucket/v2/validation.py

Status: Fixed (was: Started)
please verify!
Status: Verified (was: Fixed)
Verified!

Sign in to add a comment