Skip to content

Commit 48c4d24

Browse files
authored
Bug Fix change run effects to use combine latest instead of forkjoin (#6568)
## Motivation for features / changes `zip` and `forkJoin` work somewhat differently internally so these observables simply aren't emitting and thus break our sync. Googlers see cl/562877415 for the breakage and cl/cl/563214152 as proof that this works. #6566 #6488
1 parent eaab3eb commit 48c4d24

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tensorboard/webapp/runs/effects/runs_effects.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ limitations under the License.
1515
import {Injectable} from '@angular/core';
1616
import {Actions, createEffect, ofType} from '@ngrx/effects';
1717
import {Store} from '@ngrx/store';
18-
import {forkJoin, merge, Observable, of, throwError, zip} from 'rxjs';
18+
import {combineLatest, forkJoin, merge, Observable, of, throwError} from 'rxjs';
1919
import {
2020
catchError,
2121
distinctUntilChanged,
@@ -209,7 +209,7 @@ export class RunsEffects {
209209
}
210210
return this.maybeWaitForRunsAndGetRuns(experimentId);
211211
});
212-
return forkJoin(fetchOrGetRuns);
212+
return combineLatest(fetchOrGetRuns);
213213
}),
214214
map((runsAndMedataList) => {
215215
const newRunsAndMetadata = {} as ExperimentIdToRunsAndMetadata;
@@ -270,8 +270,10 @@ export class RunsEffects {
270270
private maybeFetchHparamsMetadata(
271271
experimentId: string
272272
): Observable<HparamsAndMetadata> {
273-
return this.store.select(getEnableHparamsInTimeSeries).pipe(
274-
withLatestFrom(this.store.select(getRouteKind)),
273+
return combineLatest([
274+
this.store.select(getEnableHparamsInTimeSeries),
275+
this.store.select(getRouteKind),
276+
]).pipe(
275277
switchMap(([hparamsInTimeSeries, routeKind]) => {
276278
if (hparamsInTimeSeries && isDashboardRoute(routeKind)) {
277279
return of({
@@ -291,7 +293,7 @@ export class RunsEffects {
291293
runs: Run[];
292294
metadata: HparamsAndMetadata;
293295
}> {
294-
return zip([
296+
return combineLatest([
295297
this.runsDataSource.fetchRuns(experimentId),
296298
this.maybeFetchHparamsMetadata(experimentId),
297299
]).pipe(

0 commit comments

Comments
 (0)