File tree Expand file tree Collapse file tree 5 files changed +14
-21
lines changed
Expand file tree Collapse file tree 5 files changed +14
-21
lines changed Original file line number Diff line number Diff line change 11# .github/workflows/e2e-tests.yml
22name : E2E Tests
33
4- on :
5- push :
6- branches : [main]
7- pull_request :
8- branches : [main]
4+ on : [pull_request]
95
106jobs :
117 rs :
Original file line number Diff line number Diff line change 11name : code
2- on :
3- push :
4- branches : ["main"]
5- pull_request :
6- branches : ["main"]
2+
3+ on : [pull_request]
74
85jobs :
96 test :
Original file line number Diff line number Diff line change 11name : reviewdog
2+
23on : [pull_request]
4+
35jobs :
46 misspell :
57 name : misspell
Original file line number Diff line number Diff line change 11name : Scan
2- on :
3- push :
4- branches : ["main"]
5- pull_request :
6- branches : ["main"]
2+
3+ on : [pull_request]
4+
75jobs :
86 scan :
97 name : Trivy
Original file line number Diff line number Diff line change @@ -245,6 +245,12 @@ func (ml *MongoLink) Status(ctx context.Context) *Status {
245245 s .Error = errors .Wrap (s .Clone .Err , "Clone" )
246246 }
247247
248+ if s .Repl .IsStarted () {
249+ intialSyncLag := max (int64 (s .Clone .FinishTS .T )- int64 (s .Repl .LastReplicatedOpTime .T ), 0 )
250+ s .InitialSyncLagTime = & intialSyncLag
251+ s .InitialSyncCompleted = s .Repl .LastReplicatedOpTime .After (s .Clone .FinishTS )
252+ }
253+
248254 if ml .state == StateFailed {
249255 return s
250256 }
@@ -266,12 +272,6 @@ func (ml *MongoLink) Status(ctx context.Context) *Status {
266272
267273 s .InitialSyncLagTime = s .TotalLagTime
268274
269- if s .Repl .IsStarted () {
270- intialSyncLag := max (int64 (s .Clone .FinishTS .T )- int64 (s .Repl .LastReplicatedOpTime .T ), 0 )
271- s .InitialSyncLagTime = & intialSyncLag
272- s .InitialSyncCompleted = s .Repl .LastReplicatedOpTime .After (s .Clone .FinishTS )
273- }
274-
275275 return s
276276}
277277
You can’t perform that action at this time.
0 commit comments