Skip to content

Commit a43563a

Browse files
Merge pull request #28294 from DennisPeriquet/trt-1267-start-stop
Limit intervals to the current phase (addresses loki upload problems)
2 parents 87a64d3 + 2ce52c2 commit a43563a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pkg/monitor/monitor.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,14 @@ func (m *Monitor) SerializeResults(ctx context.Context, junitSuiteName, timeSuff
158158
m.lock.Lock()
159159
defer m.lock.Unlock()
160160

161-
// don't bound the intervals that we return
162-
finalIntervals := m.recorder.Intervals(time.Time{}, time.Time{})
161+
// We bound the intervals by the monitor stop/start time to limit the scope to when
162+
// the monitors run (e.g., during upgrade phase and during e2e phase post upgrade).
163+
// The tests will not be able to discover intervals outside of the current phase (e.g.,
164+
// tests that check intervals for the e2e phase will not see intervals during upgrade
165+
// phase and vice versa). If it turns out visibility throughout the entire run yields
166+
// useful testing, we can comeback and tweak this accordingly.
167+
finalIntervals := m.recorder.Intervals(m.startTime, m.stopTime)
168+
163169
finalResources := m.recorder.CurrentResourceState()
164170
// TODO stop taking timesuffix as an arg and make this authoritative.
165171
//timeSuffix := fmt.Sprintf("_%s", time.Now().UTC().Format("20060102-150405"))

0 commit comments

Comments
 (0)