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

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

Issue 2817603002: luci-scheduler: Workaround for luci-config reporting ghost configs. (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | 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 2e6dfc4a3d7f9c7d8f01e9d6b8699f02e28bd60c..fcb3d893b4806fc180e8dac3544c032050677ba8 100644
--- a/scheduler/appengine/catalog/catalog.go
+++ b/scheduler/appengine/catalog/catalog.go
@@ -184,6 +184,22 @@ func (cat *catalog) GetAllProjects(c context.Context) ([]string, error) {
}
func (cat *catalog) GetProjectJobs(c context.Context, projectID string) ([]Definition, error) {
+ // TODO(vadimsh): This is a workaround for crbug.com/710619. Remove it once
+ // the bug is fixed.
+ projects, err := cat.GetAllProjects(c)
+ if err != nil {
+ return nil, err
+ }
+ found := false
+ for _, p := range projects {
+ if p == projectID {
+ found = true
+ }
+ }
+ if !found {
+ return nil, nil
+ }
+
configSet := cfgtypes.ProjectConfigSet(cfgtypes.ProjectName(projectID))
configSetURL, err := cfgclient.GetConfigSetURL(c, cfgclient.AsService, configSet)
switch err {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698