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

Stop TubeMapContainer from racing different updates or re-rendering with old data and new color schemes #357

Open
adamnovak opened this issue Oct 18, 2023 · 0 comments

Comments

@adamnovak
Copy link
Member

In https://ucsc-ci.com/vgteam/vg/-/jobs/54068/raw, some vg CI tests failed because, in the file upload test, we never got to the end of the test case.

It seems like this might have something to do with the file being uploaded, the go button being hit, and the tube map re-rendering with the old node and read data but the new color schemes, instead of/before getting the view of the uploaded file back from the server.

TubeMapContainer is based around a bunch of imperative setState-ing of one big loading flag, which isn't actually quite constrained to agree with the number of web requests in flight. The setState updates are all object-based, and not function-based, so we might e.g. clobber data requested later with data requested earlier. And the loading flag being wrong could cause an unwanted re-render of the actual tube map with stale data.

We should work out a better system for tracking whether the TubeMapContainer has the data corresponding to the view target currently in its props or not. If it doesn't, it shouldn't be rendering any tube maps, no matter how many web requests for old views are arriving.

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

No branches or pull requests

1 participant