Skip to content

Commit

Permalink
Merge pull request #1309 from domelz/fix/master/1308
Browse files Browse the repository at this point in the history
Add DEBUG messages to identify missing dependencies
  • Loading branch information
eikenb authored Dec 16, 2019
2 parents 09d1603 + ed592f5 commit 1e73053
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions manager/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,12 +691,20 @@ func (r *Runner) runTemplate(tmpl *template.Template, runCtx *templateRunCtx) (*
// Grab the list of used and missing dependencies.
missing, used := result.Missing, result.Used

if l := missing.Len(); l > 0 {
log.Printf("[DEBUG] (runner) missing data for %d dependencies", l)
for _, missingDependency := range missing.List() {
log.Printf("[DEBUG] (runner) missing dependency: %s", missingDependency)
}
}

// Add the dependency to the list of dependencies for this runner.
for _, d := range used.List() {
// If we've taken over leadership for a template, we may have data
// that is cached, but not have the watcher. We must treat this as
// missing so that we create the watcher and re-run the template.
if isLeader && !r.watcher.Watching(d) {
log.Printf("[DEBUG] (runner) add used dependency %s to missing since isLeader but do not have a watcher", d)
missing.Add(d)
}
if _, ok := runCtx.depsMap[d.String()]; !ok {
Expand Down

0 comments on commit 1e73053

Please sign in to comment.