Skip to content

fix combineLatestOrDefault for builtin panels

Administrator requested to merge tjk/fix-combinelatestordefault into main

Created by: tjkandala

Fix #24535 (closed).

combineLatestOrDefault used to create Observables with fromArray, but was changed in #24487 to use from. At face value, this shouldn't affect anything - from and fromArray share the same implementation for arrays, after all - but this broke combineLatestOrDefault, which we use for our panel component.

I debugged the issue and it turns out that importing from rxjs/internal/... imports node_modules/rxjs/internal/..., whereas importing from rxjs imports from node_modules/rxjs/_esm2015/internal... for webpack. This comment suggests that webpack handles RxJS internal imports differently from esbuild, but that doesn't seem to be the case.

I (think) I've narrowed down the issue to the Observable import itself. We can recreate fromArray with a couple of internal imports to the subscribeToArray util and Observable, which breaks when we import Observable from rxjs (fortunately, since it means we're onto something).


I'm perplexed as to why importing a different variant of RxJS works, but importing from the same RxJS doesn't. I will investigate further, but for now we should revert the changes to fix this serious bug.

I should also write an integration test to protect the "link to references panel" flow. We currently only have a test for clicking "Find references"

Merge request reports

Loading