New issue
Advanced search Search tips

Issue 836742 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

LUCI-Scheduler: support for arbitrary regex in branches to poll

Project Member Reported by serg...@chromium.org, Apr 25 2018

Issue description

Currenly, only refglobs are supported: https://github.com/luci/luci-go/blob/4ec47573b3c7ab6fe3f01f190ab35228f7351374/scheduler/appengine/messages/cron.proto#L171, but V8 uses full regex as it was supported by Buildbot.

Related issue 836232 for Milo service also discusses creating a service shared by both Milo/LUCI-scheduler and ChromiumDash to add needed APIs unless they are already available in Gitiles.
 
Summary: LUCI-Scheduler: support for arbitrary regex in branches to poll (was: LUCI-Scheduler: support for arbitrary regex in branches to pull)
Supporting arbitrary regex today is not feasible because this would require fetching **all** refs of the repo first, which will soon cause OOM even on V8 repo.

However, we could try some things:

Short term, 
 (0) add flag to gitiles `refs` API to skip all refs/changes/**. This would buy us a lot of time.

Medium term, perhaps we can try this:
 (1) add paging to `refs` gitiles API. But it's not quite clear what the cursor and ordering would be.
 (2) add regex parameter to gitiles `refs` call itself.
Status: Ava (was: Untriaged)
Labels: Type-Feature
Status: Available (was: ava)
I guess we can also support filtering by (prefix, regexp for suffix) tuples? Then v8 config will look like [('refs/branch-heads/', '\d+\.\d+'), ('refs/heads/', '\d+\.\d+.\d+')], and this still can be done efficiently (since it just a post-filtering after already supported globs).
I've had that idea as well, but didn't suggest it because it feels somehow exposing the implementation details in the API. OTH, it may be the a feasible short-term solution.
Owner: serg...@chromium.org
Status: Started (was: Available)
CL: https://crrev.com/c/1071123/14..17
Project Member

Comment 9 by bugdroid1@chromium.org, May 30 2018

Labels: merge-merged-config
The following revision refers to this bug:
  https://chromium.googlesource.com/infra/experimental/+/2a32dfb4bc4ac43d456e2cff764a119f9950e259

commit 2a32dfb4bc4ac43d456e2cff764a119f9950e259
Author: Andrii Shyshkalov <tandrii@chromium.org>
Date: Wed May 30 23:28:31 2018

Update scheduler config to use regex.

TBR=sergiyb@chromium.org

Bug:  836742 
Change-Id: Ic29dd1c42647b5d880b7c5205969105351c4aedf
Reviewed-on: https://chromium-review.googlesource.com/1080210
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/2a32dfb4bc4ac43d456e2cff764a119f9950e259/luci-scheduler-dev.cfg

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/933b0357bcbcfd1ec309149436766007b0f0154a

commit 933b0357bcbcfd1ec309149436766007b0f0154a
Author: Sergiy Byelozyorov <sergiyb@chromium.org>
Date: Wed Jun 06 14:45:27 2018

Replace glob usage with regexp as globs are being deprecated

R=dgarrett@chromium.org, tandrii@chromium.org

No-Tree-Checks: true
Bug:  836742 
Change-Id: I5ce951a65cfb6ca826e9109b66cb56050c4e5c89
Reviewed-on: https://chromium-review.googlesource.com/1084092
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>

[modify] https://crrev.com/933b0357bcbcfd1ec309149436766007b0f0154a/luci-scheduler.cfg

Status: Fixed (was: Started)
Regexp support has been added. Glob support has been deprecated and removed in https://crrev.com/c/1078731.
Status: Started (was: Fixed)
Releasing now...
Status: Fixed (was: Started)
Released 3200-3fef15f 

Sign in to add a comment