New issue
Advanced search Search tips

Issue 712427 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: 5
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Scheduler API

Project Member Reported by no...@chromium.org, Apr 17 2017

Issue description

https://luci-scheduler.appspot.com/rpcexplorer/services/scheduler.Scheduler/ has no methods.
We should probably provide some. This requires design.

Context: LUCI Milestone planning
 
I was planning to make API reflect the current UI, since the UI is well structured already.

The main purpose of API is to stop fuchsia-dashboard.appspot.com from scraping HTML pages :)
Cc: tandrii@chromium.org
Status: Available (was: Untriaged)

Comment 3 by efoo@chromium.org, Apr 27 2017

EstimatedDays: 5
Labels: REQBY-LUCI-M5-Migration LUCI-M0-Backlog
Status: Untriaged (was: Available)
Owner: tandrii@chromium.org
Status: Started (was: Untriaged)
I'm taking a stab at this despite REQBY-LUCI-M5-Migration because seems easy && yet educational for me.
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/github.com/luci/luci-go.git/+/4ab136ab49c856a5de394d15946eca3eb22143c0

commit 4ab136ab49c856a5de394d15946eca3eb22143c0
Author: tandrii <tandrii@chromium.org>
Date: Wed Jun 21 17:02:14 2017

scheduler: rename JobID to JobName to avoid overloading JobID meaning.

This also renames recently landed GetJobs api Job.Id to Job.Name, and
hence is backwards incompatible, but it is OK API is still experimental.

R=vadimsh@chromium.org
Bug:  712427 
Review-Url: https://codereview.chromium.org/2948103002

[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/api/scheduler/v1/pb.discovery.go
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/api/scheduler/v1/scheduler.pb.go
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/api/scheduler/v1/scheduler.proto
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/appengine/apiservers/scheduler.go
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/appengine/apiservers/scheduler_test.go
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/appengine/engine/engine.go
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/appengine/frontend/templates/includes/base.html
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/appengine/frontend/templates/pages/invocation.html
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/appengine/frontend/templates/pages/job.html
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/appengine/frontend/templates/pages/run_job_result.html
[modify] https://crrev.com/4ab136ab49c856a5de394d15946eca3eb22143c0/scheduler/appengine/ui/presentation.go

I think the last remaining CL is https://codereview.chromium.org/2946343004/
Of course, ACLs for mutation of data are still remaining, as currently they are just allowIfAdmin().

Comment 10 by efoo@chromium.org, Jun 29 2017

Labels: LUCI-M2-S5 LUCI-M2-S4 LUCI-M2-Dev2
I filed separate bug for ACLs issue 736770.

I believe, read API might be good enough for Fuchsia's case (who currently scrap data off html page). +phosek@ can you confirm this by looking at [1]? LMK if there is smth you need.

[1] https://chromium.googlesource.com/external/github.com/luci/luci-go/+/master/scheduler/api/scheduler/v1/scheduler.proto#10
Deployed to prod as version 1814-8315cf5 
Project Member

Comment 14 by bugdroid1@chromium.org, Jul 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/github.com/luci/luci-go.git/+/e39d552a742c975af28cc5a4b99dbabce6a6ef1d

commit e39d552a742c975af28cc5a4b99dbabce6a6ef1d
Author: tandrii <tandrii@chromium.org>
Date: Fri Jul 07 09:29:29 2017

scheduler: expose paused property of a Job.

Previously, I expected that whether Job is paused can be detected
from it's "current state" string.

However, I just burned 1 hour trying to understand why after calling
PauseJob job's state was still running. The answer is obvious -> latest
invocation was scheduled before my call PauseJob, and hence I just had
to wait.

I think having explicit paused field is actually a better idea, even
though it has a downside of confusing too if state="running" and
paused=true.

R=vadimsh@chromium.org
Bug:  712427 
Review-Url: https://codereview.chromium.org/2967373004

[modify] https://crrev.com/e39d552a742c975af28cc5a4b99dbabce6a6ef1d/scheduler/api/scheduler/v1/pb.discovery.go
[modify] https://crrev.com/e39d552a742c975af28cc5a4b99dbabce6a6ef1d/scheduler/api/scheduler/v1/scheduler.pb.go
[modify] https://crrev.com/e39d552a742c975af28cc5a4b99dbabce6a6ef1d/scheduler/api/scheduler/v1/scheduler.proto
[modify] https://crrev.com/e39d552a742c975af28cc5a4b99dbabce6a6ef1d/scheduler/appengine/apiservers/scheduler.go
[modify] https://crrev.com/e39d552a742c975af28cc5a4b99dbabce6a6ef1d/scheduler/appengine/apiservers/scheduler_test.go

Status: Fixed (was: Started)

Comment 16 by efoo@chromium.org, Nov 8 2017

Labels: -REQBY-LUCI-M5-Migration REQBY-LUCI-M4a-MacWinPOC

Comment 17 by efoo@chromium.org, Jan 30 2018

Labels: LUCI-Backlog

Comment 18 by efoo@chromium.org, Jan 30 2018

Labels: -LUCI-M0-Backlog -LUCI-M2-Dev2 -REQBY-LUCI-M4a-MacWinPOC luci-blocker-migration LUCI-Dev2

Comment 19 by efoo@chromium.org, Feb 13 2018

Labels: -LUCI-blocker-migration LUCI-Chromium-CQSets LUCI-Blocker-Chromium-CQSets

Sign in to add a comment