fabric8-ui / fabric8-runtime-console

DEPRECATED - the angular 2 runtime console for Builds, Pipelines, Environments and Runtime resources
https://github.com/fabric8-ui/fabric8-ui
5 stars 18 forks source link

Streams are repeating themselves #151

Open pmuir opened 7 years ago

pmuir commented 7 years ago

I'm seeing multiple identical events being sent down streams. Normally this is caused by a lack of multicast support.

jstrachan commented 7 years ago

Got an example of a stream with dupes? I have seen a few initial events with empty collections we should be able to filter out.

We do join quite a few streams together with combineLatest (e.g. Deployment + Service - or now Deployment + Service + Route) so that the main object may appear mostly similar (e.g. the Deployment) on multipole events but we enrich with the exposeUrl so we can link to how to open the web app/REST API of a deployment - so it might look a dupe but might not be if you look really close?

pmuir commented 7 years ago

For example deploymentStore.loadAll() emits about 10-15 times in quick succession, slowly building up the model. This is without any changes to anything. I would expect a single emission here. Whilst the emissions may not be technically duplicates, as a consumer of the API I shouldn't see them.

Right now I just debounce the stream for about 300ms to get the last one, but this is sucky.

jstrachan commented 7 years ago

yeah - Deployment is the trickiest one as its joining Deployments + DeploymentConfigs + Services + Routes + ActiveRoute namespace. I'm pretty sure we're unnecessarily exposing events on startup though too

pmuir commented 7 years ago

I'm just cleaning up some of the integration work I did over the weekend then I will look at this.