[ISSUE-66918282] after receiving a new snapshot, send the 1st changelist request with "block=0" (#68)
diff --git a/changes.go b/changes.go index 20e7f6d..b78a1d1 100644 --- a/changes.go +++ b/changes.go
@@ -153,11 +153,14 @@ scopes := findScopesForId(apidInfo.ClusterID) v := url.Values{} + blockValue := block /* Sequence added to the query if available */ if lastSequence != "" { v.Add("since", lastSequence) + } else { + blockValue = "0" } - v.Add("block", block) + v.Add("block", blockValue) /* * Include all the scopes associated with the config Id @@ -258,6 +261,12 @@ log.Panic("Timeout. Plugins failed to respond to changes.") case <-events.Emit(ApigeeSyncEventSelector, &resp): } + } else if lastSequence == "" { + select { + case <-time.After(httpTimeout): + log.Panic("Timeout. Plugins failed to respond to changes.") + case <-events.Emit(ApigeeSyncEventSelector, &resp): + } } else { log.Debugf("No Changes detected for Scopes: %s", scopes) }