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

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

Issue 2999533002: [scheduler]: ACLs phase 2 - warn if Job/Trigger don't have ACLs. (Closed)
Patch Set: 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 | « no previous file | scheduler/appengine/catalog/catalog_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/appengine/catalog/catalog.go
diff --git a/scheduler/appengine/catalog/catalog.go b/scheduler/appengine/catalog/catalog.go
index 4f9ecb48bc31590e0434d520994beea1f84e7f8b..d140aa3fe05312c214b62bbe37bf1134bd5ae06e 100644
--- a/scheduler/appengine/catalog/catalog.go
+++ b/scheduler/appengine/catalog/catalog.go
@@ -283,6 +283,10 @@ func (cat *catalog) GetProjectJobs(c context.Context, projectID string) ([]Defin
logging.Errorf(c, "Failed to compute task ACLs: %s/%s: %s", projectID, id, err)
continue
}
+ // TODO(tandrii): remove this once this warning stops firing.
+ if len(acls.Owners) == 0 || len(acls.Readers) == 0 {
+ logging.Warningf(c, "Missing some ACLs on %s/%s: R=%d O=%d", projectID, id, len(acls.Owners), len(acls.Readers))
+ }
out = append(out, Definition{
JobID: fmt.Sprintf("%s/%s", projectID, job.Id),
Acls: *acls,
@@ -322,6 +326,10 @@ func (cat *catalog) GetProjectJobs(c context.Context, projectID string) ([]Defin
logging.Errorf(c, "Failed to compute task ACLs: %s/%s: %s", projectID, id, err)
continue
}
+ // TODO(tandrii): remove this once this warning stops firing.
+ if len(acls.Owners) == 0 || len(acls.Readers) == 0 {
+ logging.Warningf(c, "Missing some ACLs on %s/%s: R=%d O=%d", projectID, id, len(acls.Owners), len(acls.Readers))
+ }
out = append(out, Definition{
JobID: fmt.Sprintf("%s/%s", projectID, trigger.Id),
Acls: *acls,
« no previous file with comments | « no previous file | scheduler/appengine/catalog/catalog_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698