New issue
Advanced search Search tips

Issue 859222 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Task

Blocking:
issue 859310



Sign in to add a comment

Scheduler "Run now" button should emit triggers instead of starting the invocation right away.

Project Member Reported by tandrii@chromium.org, Jun 29 2018

Issue description

And maybe also renamed to "trigger now".
 
Cc: -efoo@chromium.org -no...@chromium.org
Components: -Infra>Platform Infra>Platform>Scheduler
Labels: -Restrict-View-Google Pri-2 Type-Task
Status: Available (was: Untriaged)
This has become somewhat more urgent as we've moved the Chrome PFQ to Swarming and the ChromeOS gardeners need to be able to trigger builds via "Run Now" via the Scheduler UI. I'd like to allow that without giving them OWNERS to the whole project.
Cc: mikenichols@chromium.org
Blocking: 859310
Owner: vadimsh@chromium.org
Status: Assigned (was: Available)
Summary: Scheduler "Run now" button should emit triggers instead of starting the invocation right away. (was: scheduler run now buttong should emit triggers instead.)
Also as part of this change, we should change "Run now" button ACL to require TRIGGERER role, not OWNER.
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 17

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/60b49958fbf06b6a3ee6b998460fa4696e6bdd37

commit 60b49958fbf06b6a3ee6b998460fa4696e6bdd37
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Mon Sep 17 22:08:59 2018

[scheduler] Rip out "Run now" button and ForceInvocation method.

They'll be replaced with triggers. The new implementation shares almost no code
with the one delete here.

R=tandrii@chromium.org, nodir@chromium.org
BUG= 859222 

Change-Id: Idc6be86fb2a52432757ab4fe944ad7201b1bf6fc
Reviewed-on: https://chromium-review.googlesource.com/1228262
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>

[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/apiservers/scheduler_test.go
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/engine/engine.go
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/engine/engine_test.go
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/engine/invocation.go
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/engine/job.go
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/frontend/templates/includes/base.html
[delete] https://crrev.com/3276718b44a0232680aa67c1732150540a23c659/scheduler/appengine/frontend/templates/pages/run_job_result.html
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/messages/config.pb.go
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/messages/config.proto
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/schedule/schedule.go
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/ui/common.go
[modify] https://crrev.com/60b49958fbf06b6a3ee6b998460fa4696e6bdd37/scheduler/appengine/ui/job.go

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/d301f92cf5822f2b535d4ed85cdb56a0433391b3

commit d301f92cf5822f2b535d4ed85cdb56a0433391b3
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Tue Sep 18 00:04:09 2018

[scheduler] Implement "Trigger" button.

It just submits a trigger of new WebUITrigger type (currently empty, but we
may later consider adding properties to it, that can be entered through some
Web UI form or something).

This also changes how TriggeredBy invocation property is calculated: an
invocation is considered triggered by some account if all its incoming triggers
are emitted by this account. If triggers come from the scheduler itself
(e.g. from cron or gitiles), or from multiple accounts, the invocation is not
associated with any single account.

R=tandrii@chromium.org, nodir@chromium.org
BUG= 859222 

Change-Id: I76e2fbce406726ae76b20f4cc7e9cee9397184c6
Reviewed-on: https://chromium-review.googlesource.com/1229375
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/api/scheduler/v1/pb.discovery.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/api/scheduler/v1/triggers.pb.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/api/scheduler/v1/triggers.proto
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/apiservers/scheduler.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/engine/policy/common.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/engine/policy/request_builder.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/engine/policy/request_builder_test.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/frontend/templates/includes/base.html
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/internal/pb.discovery.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/internal/triggers.pb.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/internal/triggers.proto
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/messages/config.pb.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/messages/config.proto
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/ui/common.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/ui/errors.go
[modify] https://crrev.com/d301f92cf5822f2b535d4ed85cdb56a0433391b3/scheduler/appengine/ui/job.go

Status: Fixed (was: Assigned)
Deployed this.

"Run now" button is replaced with "Trigger" button. Once clicked, it immediately adds a triggers to the pending set (it looks like "Triggered via web UI (1 minute ago by vadimsh@google.com)") and redirects to the job page.

This trigger is then triaged via regular rules (e.g. if the job was idle, a new invocation starts right away, otherwise it queues up).

Anyone with TRIGGERER role is allowed to use this button.

An example where I used this button: https://luci-scheduler.appspot.com/jobs/infra/build-recipes-tests/9100521153388653568

Sign in to add a comment