Add debug print to new ref value codepath in polling logic

This commit is contained in:
2023-05-04 19:16:17 -06:00
parent 8ac90700bf
commit 8188bd391b
+1
View File
@@ -80,6 +80,7 @@ func pollJob(ctx context.Context, pipeline database.Pipeline, pipelineConf confi
prevRef, ok := prevRefs[branch.Name().String()] prevRef, ok := prevRefs[branch.Name().String()]
if ok { if ok {
if branch.Hash().String() != prevRef { if branch.Hash().String() != prevRef {
log.Debugf("Branch %v in repo %v (id: %v) has hash %v, which does not match the previously seen hash of %v", branch.Name().String(), pipeline.Name, pipeline.Id, branch.Hash().String(), prevRef)
log.Debugf("Queuing job for branch %v in repo %v (id: %v) with hash %v", branch.Name().String(), pipeline.Name, pipeline.Id, branch.Hash().String()) log.Debugf("Queuing job for branch %v in repo %v (id: %v) with hash %v", branch.Name().String(), pipeline.Name, pipeline.Id, branch.Hash().String())
prevRefs[branch.Name().String()] = branch.Hash().String() prevRefs[branch.Name().String()] = branch.Hash().String()
refsToRunFor = append(refsToRunFor, branch.Name().String()) refsToRunFor = append(refsToRunFor, branch.Name().String())