Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(951)

Unified Diff: scheduler/appengine/engine/engine.go

Issue 2998623002: scheduler ACLs: fix ACLs saving upon job config change. (Closed)
Patch Set: fix import order Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scheduler/appengine/acl/acl.go ('k') | scheduler/appengine/engine/engine_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/appengine/engine/engine.go
diff --git a/scheduler/appengine/engine/engine.go b/scheduler/appengine/engine/engine.go
index 075410e638a78129e843e52b3e247c0cb0015514..68316c21ebb1b3b360821a0b06733cc218ccef9f 100644
--- a/scheduler/appengine/engine/engine.go
+++ b/scheduler/appengine/engine/engine.go
@@ -333,6 +333,7 @@ func (e *Job) isEqual(other *Job) bool {
e.Revision == other.Revision &&
e.RevisionURL == other.RevisionURL &&
e.Schedule == other.Schedule &&
+ e.Acls.Equal(&other.Acls) &&
Vadim Sh. 2017/08/08 19:11:16 err... I remember reviewing this line. What happen
tandrii(chromium) 2017/08/08 19:20:02 you've reviewed very similar line below.
bytes.Equal(e.Task, other.Task) &&
e.State == other.State)
}
@@ -1301,7 +1302,7 @@ func (e *engineImpl) updateJob(c context.Context, def catalog.Definition) error
return errSkipPut
}
if isNew {
- // JobID is <projectID>/<name>, it's ensure by Catalog.
+ // JobID is <projectID>/<name>, it's ensured by Catalog.
chunks := strings.Split(def.JobID, "/")
if len(chunks) != 2 {
return fmt.Errorf("unexpected jobID format: %s", def.JobID)
@@ -1323,6 +1324,7 @@ func (e *engineImpl) updateJob(c context.Context, def catalog.Definition) error
job.Flavor = def.Flavor
job.Revision = def.Revision
job.RevisionURL = def.RevisionURL
+ job.Acls = def.Acls
job.Enabled = true
job.Schedule = def.Schedule
job.Task = def.Task
« no previous file with comments | « scheduler/appengine/acl/acl.go ('k') | scheduler/appengine/engine/engine_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698