Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outside screens don't forget teams which are no longer in the system #5

Closed
PeterJCLaw opened this issue Apr 6, 2019 · 3 comments
Closed

Comments

@PeterJCLaw
Copy link
Owner

If you accidentally deploy a compstate from a previous year, then the screens will pick up on that and when they update they'll get a bunch of extra data.
When you fix that, the wrong teams should drop out of the system, but for some reason they don't. This causes confusion to teams.

@PeterJCLaw
Copy link
Owner Author

I think this is a consequence of the way that the stream works -- when it detects a change, it emits events containing (only) the new information. Additionally, each element within a collection is emitted as a separate event.

Therefore there isn't really a way for the screens to know that a team has been removed. We perhaps could do something like detect that a set of updates has started and then clear out our list of teams, expecting that the stream will refill it, however this seems likely to cause its own issues.

A better solution here is to have the stream emit events that inform clients about the removal of a team which the stream had previously informed them about.

Alternatively, having the stream trigger the dropping of all information about teams might be a way to go. That should still be robust as the stream would know that it's going to send all new data out, which the clients cannot otherwise know. It also avoids the stream needing to keep track of the previous state it emitted events for, so is potentially simpler.

@PeterJCLaw
Copy link
Owner Author

PeterJCLaw commented Mar 26, 2023

Ah, my prior comment here isn't quite right -- the stream does handle the removal of a team. When that happens it emits an event with null data:

event: team
data: null

@PeterJCLaw
Copy link
Owner Author

Looking at this a bit more -- it turns out that this doesn't affect the arena screens since they don't rely on the stream for data, only for knowing that a change has happened. The outside screens rely on the data update in the stream event (which of course in the case of a team removal isn't usefully present), where the arena screens just clear their caches and refresh everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant